一、首先下載XAMPP
XAMPPLinux1.6.8a:
http://jaist.dl.sourceforge.net/sourceforge/xampp/xampp-linux-1.6.8a.tar.gz
相關(guān)Linux下安裝和配置XAMPP請(qǐng)參考官網(wǎng):
http://www.apachefriends.org/zh_cn/xampp-linux.html
二、安裝之前首先確認(rèn)你服務(wù)器的80端口有沒被占用
netstat -an|grep -w 80
如果被占用了請(qǐng)先關(guān)閉相關(guān)服務(wù),XAMPP啟動(dòng)要用到80端口
三、安裝XAMPP
[root@localhost ~]#tar xvfz xampp-linux-1.6.8a.tar.gz -C /opt
然后啟動(dòng)(命令參數(shù)見XAMPP官網(wǎng)):
/opt/lampp/lampp start
您應(yīng)該能在屏幕上看到類似下面的提示信息:
Starting XAMPP 1.6.8a...
LAMPP: Starting Apache...
LAMPP: StartingMySQL...
LAMPP started.
好了。Apache 和 MySQL 正在運(yùn)行中
只需在您的瀏覽器中輸入下面的鏈接即可:http://localhost
看到一些示例程序的 XAMPP 開始頁面表示XAMPP安裝成功了
四、配置XAMPP安全性
[root@localhost ~]# /opt/lampp/lampp security
XAMPP: Quick security check...
XAMPP: Your XAMPP pages are NOT secured by a password.
XAMPP: Do you want to set a password? [yes] XAMPP: Do you want to set a password? [yes] yes
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Password protection active. Please use 'lampp' as user name!
XAMPP: MySQL is accessable via network.
XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes] yes
XAMPP: Turned off.
XAMPP: Stopping MySQL...
XAMPP: Starting MySQL...
XAMPP: The MySQL/phpMyAdmin user pma has no password set!!!
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Setting new MySQL pma password.
XAMPP: Setting phpMyAdmin's pma password to the new one.
XAMPP: MySQL has no root passwort set!!!
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Write the password somewhere down to make sure you won't forget it!!!
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Setting new MySQL root password.
XAMPP: Change phpMyAdmin's authentication method.
XAMPP: The FTP password is still set to 'lampp'.
XAMPP: Do you want to change the password? [yes] yes
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Reload ProFTPD...
XAMPP: Done.
五、設(shè)置XAMPP 隨系統(tǒng)自動(dòng)啟動(dòng)
[root@localhost ~]# ln -s /opt/lampp/lampp /etc/rc.d/rc3.d/S99lampp
[root@localhost ~]# ln -s /opt/lampp/lampp /etc/rc.d/rc4.d/S99lampp
[root@localhost ~]# ln -s /opt/lampp/lampp /etc/rc.d/rc5.d/S99lampp
自此,XAMPP已經(jīng)配置好了!