QT软件园:海量软件绿色下载.

系统教程 | 新闻热点 | 软件教程 | 软件资讯 | 游戏攻略 | 游戏资讯 | 游戏问答

当前位置: 首页软件教程 → 在liunx安装xampp并且设置xampp运行远程访问

在liunx安装xampp并且设置xampp运行远程访问

时间:2021-01-06 17:47:43 人气:23 作者:QT

在liunx安装xampp

一、下载xmapp:

  1. wget wget https://nchc.dl.sourceforge.net/project/xampp/XAMPP%20Linux/7.3.11/xampp-linux-x64-7.3.11-0-installer.run

二、以root用户对xampp-linux-x64-7.3.11-0-installer.run赋权并执行

  1. chmod 777 xampp-linux-x64-7.3.11-0-installer.run

三、执行安装命令:

  1. [root@localhost wordpress]# ./xampp-linux-x64-7.3.11-0-installer.run

  2. ----------------------------------------------------------------------------

  3. Welcome to the XAMPP Setup Wizard.

  4. ----------------------------------------------------------------------------

  5. Select the components you want to install; clear the components you do not want

  6. to install. Click Next when you are ready to continue.

  7. XAMPP Core Files : Y (Cannot be edited)

  8. XAMPP Developer Files [Y/n] :y

  9. Is the selection above correct? [Y/n]: y

  10. ----------------------------------------------------------------------------

  11. Installation Directory

  12. XAMPP will be installed to /opt/lampp

  13. Press [Enter] to continue:

  14. ----------------------------------------------------------------------------

  15. Setup is now ready to begin installing XAMPP on your computer.

  16. Do you want to continue? [Y/n]: y

  17. ----------------------------------------------------------------------------

  18. Please wait while Setup installs XAMPP on your computer.

  19. Installing

  20. 0% ______________ 50% ______________ 100%

  21. ----------------------------------------------------------------------------

  22. Setup has finished installing XAMPP on your computer.

  23. [root@localhost wordpress]#

注意:如果不是root会提示如下信息

  1. [wordpress@localhost ~]$ ./xampp-linux-x64-7.3.11-0-installer.run

  2. Error: There has been an error.

  3. This installer requires root privileges. Please become superuser before

  4. executing the installer

  5. Press [Enter] to continue:

至此安装成功。

配置xampp服务

查看xampp服务的命令选项
  1. [root@localhost wordpress]# /opt/lampp/lampp -h

  2. Usage: lampp <action>

  3. start Start XAMPP (Apache, MySQL and eventually others)

  4. startapache Start only Apache

  5. startmysql Start only MySQL

  6. startftp Start only ProFTPD

  7. stop Stop XAMPP (Apache, MySQL and eventually others)

  8. stopapache Stop only Apache

  9. stopmysql Stop only MySQL

  10. stopftp Stop only ProFTPD

  11. reload Reload XAMPP (Apache, MySQL and eventually others)

  12. reloadapache Reload only Apache

  13. reloadmysql Reload only MySQL

  14. reloadftp Reload only ProFTPD

  15. restart Stop and start XAMPP

  16. security Check XAMPP's security

  17. enablessl Enable SSL support for Apache

  18. disablessl Disable SSL support for Apache

  19. backup Make backup file of your XAMPP config, log and data files

  20. oci8 Enable the oci8 extenssion

  21. panel Starts graphical XAMPP control panel

  22. [root@localhost wordpress]#

启动xampp服务
  1. [root@localhost wordpress]# /opt/lampp/lampp start

  2. Starting XAMPP for Linux 7.3.11-0...

  3. XAMPP: Starting Apache...fail.

  4. XAMPP: Another web server is already running.

  5. XAMPP: Starting MySQL...ok.

  6. XAMPP: Starting ProFTPD...ok.

  7. [root@localhost wordpress]#

Apache端口服务启动失败,执行下面命令发现80端口被占用:

  1. [root@localhost wordpress]# netstat -anp | grep 80

  2. tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 3280/master

  3. tcp6 0 0 :::80 :::* LISTEN 12680/httpd

调整端口

一、编辑文档:vi /opt/lampp/etc/httpd.conf把内容 Listen80改为 Listen8080

二、编辑文档:vi /opt/lampp/lampp把内容 testport80改为`testport 8080

三、重启服务:

  1. [root@localhost ~]# /opt/lampp/lampp restart

  2. Restarting XAMPP for Linux 7.3.11-0...

  3. XAMPP: Stopping Apache...ok.

  4. XAMPP: Stopping MySQL...ok.

  5. XAMPP: Stopping ProFTPD...ok.

  6. XAMPP: Starting Apache...ok.

  7. XAMPP: Starting MySQL...ok.

  8. XAMPP: Starting ProFTPD...ok.

  9. [root@localhost ~]#

四、如果服务端口正常,但页面无法访问,检查防火墙是否关闭

下面是centos 7.4操作:

  1. [root@localhost ~]# systemctl status firewalld

  2. [root@localhost ~]# systemctl stop firewalld

  3. [root@localhost ~]# systemctl disable firewalld

  4. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

  5. Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.

  6. [root@localhost ~]# systemctl disable firewalld

设置随系统启动

  1. [root@localhost ~]# ln -s /opt/lampp/lampp /etc/rc.d/rc3.d/S99lampp

  2. [root@localhost ~]# ln -s /opt/lampp/lampp /etc/rc.d/rc4.d/S99lampp

  3. [root@localhost ~]# ln -s /opt/lampp/lampp /etc/rc.d/rc5.d/S99lampp

设置密码

用户名密码描述
pmprootMySQL/phpMyAdmin 用户 pma设置密码
rootrootMysql的root密码
daemonrootFTP用户daemon密码

操作记录如下:

  1. [root@localhost ~]# /opt/lampp/lampp security

  2. XAMPP: Quick security check...

  3. XAMPP: MySQL is accessable via network.

  4. XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes] y

  5. XAMPP: Turned off.

  6. XAMPP: Stopping MySQL...ok.

  7. XAMPP: Starting MySQL...ok.

  8. XAMPP: The MySQL/phpMyAdmin user pma has no password set!!!

  9. XAMPP: Do you want to set a password? [yes] yes

  10. XAMPP: Password:

  11. XAMPP: Password (again):

  12. XAMPP: Setting new MySQL pma password.

  13. XAMPP: Setting phpMyAdmin's pma password to the new one.

  14. XAMPP: MySQL has no root passwort set!!!

  15. XAMPP: Do you want to set a password? [yes] yes

  16. XAMPP: Write the password somewhere down to make sure you won't forget it!!!

  17. XAMPP: Password:

  18. XAMPP: Password (again):

  19. XAMPP: Setting new MySQL root password.

  20. XAMPP: Change phpMyAdmin's authentication method.

  21. XAMPP: The FTP password for user 'daemon' is still set to 'xampp'.

  22. XAMPP: Do you want to change the password? [yes] yes

  23. XAMPP: Password:

  24. XAMPP: Password (again):

  25. XAMPP: Reload ProFTPD...ok.

  26. XAMPP: Done.

  27. [root@localhost ~]#

设置xampp运行远程访问

编辑文件:

  1. [root@localhost ~]# vi /opt/lampp/etc/extra/httpd-xampp.conf

Require local调整为 Require all granted

重启服务:

  1. [root@localhost ~]# /opt/lampp/lampp restart

  2. Restarting XAMPP for Linux 7.3.11-0...

  3. XAMPP: Stopping Apache...ok.

  4. XAMPP: Stopping MySQL...ok.

  5. XAMPP: Stopping ProFTPD...ok.

  6. XAMPP: Starting Apache...ok.

  7. XAMPP: Starting MySQL...ok.

  8. XAMPP: Starting ProFTPD...ok.

  9. [root@localhost ~]#

相关文章 更多+

  • 元梦之星变装对决玩法介绍

    变装对决是元梦之星游戏中新增加的一种玩法模式,这个玩法中可以提高至24人同居对战,但是很多玩家都还不知道这个玩法该怎么玩,下面小编就为大家带来变装对决的玩法介绍,还不知道怎么玩的玩家一起来看看吧。
  • 元梦之星舞狮少女获取方法

    舞狮少女是元梦之星中的一个新春时装,很多玩家都还不知道这个时装该怎么获取,下面小编就为大家带来舞狮少女的获取方法,还不知道怎么获得的星宝们一起来看看吧。

关于QT软件园| 联系方式| 发展历程| 版权声明| 下载帮助(?)| 广告联系

Copyright 2012-2022 QTVCD.COM 【QT软件园】版权所有桂ICP备2023009844号-1

声明:本站所有软件和文章来自互联网 如有异议 请与本站联系 本站为非赢利性网站 不接受任何赞助和广告