Xampp下载地址:https://www.apachefriends.org/download.html
Xampp帮助文档:https://www.apachefriends.org/faq_linux.html
1、安装Xampp# chmod u+x xampp-linux-x64-7.2.19-2-installer.run# ./xampp-linux-x64-7.2.19-2-installer.run
一贯next
2、修正配置
2.1.如果远程访问xampp报下面缺点
Access forbidden!New XAMPP security concept:Access to the requested object is only available from the local network.This setting can be configured in the file \"大众httpd-xampp.conf\"大众.
注释掉下面一行
# vim extra/httpd-xampp.conf#Require local
2.2.配置启用虚拟目录
打开下面的注释
# Virtual hosts
Include etc/extra/httpd-vhosts.conf
2.3.默认WEB代码上传目录:
/opt/lampp/htdocs/
3、配置环境变量# vi /etc/profile
export PATH=$PATH:/opt/lampp/binexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/lampp/libexport C_INCLUDE_PATH=$C_INCLUDE_PATH:/opt/lampp/include
#source /etc/profile
4、启动LAMP# /opt/lampp/lampp startStarting XAMPP for Linux 5.5.38-3...XAMPP: Starting Apache...ok.XAMPP: Starting MySQL...ok.XAMPP: Starting ProFTPD...ok.
PS:lampp命令支持stop、status、start、restart命令。
让xampp开机自动启动
$ ln -s /opt/lampp/lampp /etc/init.d/lampp$ chkconfig --add lampp5、XAMPP组件配置
# HTTPD主配置文件;/opt/lampp/etc/httpd.conf# PHP主配置文件;/opt/lampp/etc/php.ini# MariaDB主配置文件;/opt/lampp/etc/my.cnf# MariaDB数据目录;/opt/lampp/var/mysql# 所有日志目录;/opt/lampp/logs/
篇幅有限,这块内容就先容到这了,实在也可以命令行安装的,只是我这边自动调出来图形而已,以是就用了图形界面安装。后面会分享更多devops和DBA方面的内容,感兴趣的朋友可以关注一下~