盈彩体育注册(中国)有限公司
盈彩体育注册(中国)有限公司 您所在的位置:网站首页 盈彩体育注册(中国)有限公司 linux应用之xampp集成环境的安装及配置(centos)

linux应用之xampp集成环境的安装及配置(centos)

2024-04-24 23:12:49| 来源: 网络整理

1.xampp集成环境的下载

在xampp的官网上选择对应系统的版本进行下载,官网地址:https://www.apachefriends.org/zh_cn/index.html

#wget https://downloadsapachefriends.global.ssl.fastly.net/xampp-files/5.6.30/xampp-linux-x64-5.6.30-1-installer.run?from_af=true

#ls -al ./xampp-linux-x64-5.6.30-1-installer.run

2.xampp的安装

#赋执行权限

#chmod 755 xampp-linux-x64-5.6.30-1-installer.run

#开始安装,默认装在/opt目录下

#./xampp-linux-x64-5.6.30-1-installer.run

#尝试启动xampp

#/opt/lampp/lampp start

出现如下消息表示成功:

Starting XAMPP for Linux 5.6.30-1...XAMPP: Starting Apache...already running.XAMPP: Starting MySQL...already running.XAMPP: Starting ProFTPD...ok.

#尝试停止xampp

#/opt/lampp/lampp stop

#可以为lampp创建软链接,也可以自己在/etc/init.d中加入相应的启动脚本,具体的根据需要选择

#ln -s /opt/lampp/lampp /usr/local/bin/lampp

#vi /etc/init.d/lampp

#chmod 755 /etc/init.d/lampp

#chkconfig lampp on  

#service lampp restart

脚本内容可以参考vsftpd的启动脚本。

3.配置

#在默认的安装过程中,xampp所有均是没有密码的,为了安全,我们应该为xampp设置密码。具体的设置过程可根据提示操作。

#/opt/lampp/lampp security

4.常见问题以及解决办法

(1)安装完成后,很多时候用locahost来访问时,是没有问题的,但是同一局域网里其它主机用域名访问时,常常不能访问,这里情况大概分为两种: a. xampp的配置文件:/opt/lampp/etc/extra/httpd-xampp.conf中将以下内容屏蔽

#Require local

ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var

b. 如果按照以上修改后,还是不能访问,则可能是防火墙把80端口给干掉了,要么把防火墙关闭,要么配置一下80端口允许访问。

若存在端口冲突,就修改端口:

vi  /etc/httpd/conf/httpd.conf

Listen的值改为8080或其他

ServerName的值也改为8080或其他

 修改/opt/lampp/etc/extra/httpd-ssl.conf

Listen的值改为8080或其他

ServerName的值也改为8080或其他

 



【本文地址】 转载请注明 

最新文章

推荐文章

CopyRight 2018-2019 盈彩体育注册(中国)有限公司 版权所有 豫ICP备16040606号-1