xampp套件下载地址:XAMPP Installers and Downloads for Apache Friends
# 安全性及FTP/MYSQL密码设置
/opt/lampp/lampp security
# 关闭443端口
/opt/lampp/lampp disablessl
apache修改http/https默认端口:
/opt/lampp/etc/httpd.conf
Listen 81
/opt/lampp/etc/extra/httpd-ssl.conf
Listen 8443
root@A01-R06-I30-17-1Z54352:~# /opt/lampp/lampp enablessl XAMPP: XAMPP: Enable SSL...ok. XAMPP: Stopping Apache...ok. XAMPP: Starting Apache...fail. XAMPP: Another web server with SSL is already running.
上述问题,需要修改/opt/lampp/lampp中的校验:改成81/8443
function startApache() { ... if testport 81 then $GETTEXT -s "fail." echo "XAMPP: " $($GETTEXT 'Another web server is already running.') return 1 fi if test $ssl -eq 1 && testport 8443 then $GETTEXT -s "fail." echo "XAMPP: " $($GETTEXT 'Another web server with SSL is already running.') return 1 fi
/opt/lampp/lampp startapache
mysql配置:
1、支持远程访问phpmyadmin工具
vim /opt/lampp/etc/extra/httpd-xampp.conf
# since XAMPP 1.4.3 <Directory "/opt/lampp/phpmyadmin"> AllowOverride AuthConfig Limit #Require local Require all granted ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </Directory>
2、修复问题:
vim /opt/lampp/phpmyadmin/config.inc.php
/** * This is needed for cookie based authentication to encrypt password in * cookie. Needs to be 32 chars long. */ $cfg['blowfish_secret'] = 'xamppasdfghjklpoiuytrewqazxcvbnm'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */
修改root权限支持远程操作数据库:
在有的机器上mysql起不来,报错如下:
> chmod 777 -R /opt/lampp
最新版的 phpMyAdmin 会提示:
服务器和客户端上指示的 HTTPS 之间不匹配。这可能导致 phpMyAdmin 无法正常工作或存在安全风险。请修复您的服务器配置以正确指示 HTTPS。
上述问题解决方案:在 phpMyAdmin 的配置文件中添加:
vim /opt/lampp/phpmyadmin/config.inc.php
$cfg['PmaAbsoluteUri'] = 'https://pma.xxx.com';