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

软件教程| 软件资讯| 游戏攻略| 游戏资讯| 游戏问答

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

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

时间:2021/01/06 17:47:43 人气:5 作者:QT 我要评论(0)

在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 ~]#

xamppv8.0.0
xampp v8.0.0
  • 类型:编程开发 大小:188M 语言:中文 评分:1
  • 标签:
立即下载

相关文章 更多+

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

    小编为大家带来服务器是liunx如何安装xampp,并且设置xampp运行远程访问,搭建我们自己的web应用的整个流程,相信在看完这篇文章之后,你一定能够学会!
  • win10 安装配置xampp

    xampp是一款非常方便php初学者的工具,他集成了php、mysql、和apache,能够一键安装搭建web应用的所有工具,下面带你实践win10如何安装配置xampp

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

Copyright 2012-2020 QTVCD.COM 【QT软件园】版权所有皖ICP备18012845号-4

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