一、xampp下載地址:
http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/1.8.3/
二、我下載的是xampp-linux-x64-1.8.3-1-installer.run
wget http://jaist.dl.sourceforge.net/project/xampp/XAMPP%20Linux-x64-1.8.3-1-installer.run/
wget http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/5.6.23/xampp-linux-x64-5.6.23-0-installer.run
(最新版本)
注意:系統可能提示網址不安全,則加上--no-check-certificate參數即可
三、下載完以后,給該文件添加執行權限:
chmod a+x xampp-linux-x64-1.8.3-a-installer.run
四、安裝xampp過程如下:
[root@nginxone src]# sh xampp-linux-x64-1.8.3-1-installer.run
xampp-linux-x64-1.8.3-1-installer.run: xampp-linux-x64-1.8.3-1-installer.run: cannot execute binary file
[root@nginxone src]# ./xampp-linux-x64-1.8.3-1-installer.run
----------------------------------------------------------------------------
Welcome to the XAMPP Setup Wizard.
----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want
to install. Click Next when you are ready to continue.
XAMPP Core Files : Y (Cannot be edited)
XAMPP Developer Files [Y/n] :y
Is the selection above correct? [Y/n]: y
----------------------------------------------------------------------------
Installation Directory
XAMPP will be installed to /opt/lampp
Press [Enter] to continue :
----------------------------------------------------------------------------
Setup is now ready to begin installing XAMPP on your computer.
Do you want to continue? [Y/n]: y
----------------------------------------------------------------------------
Please wait while Setup installs XAMPP on your computer.
Installing
0% ______________ 50% ______________ 100%
#########################################
----------------------------------------------------------------------------
Setup has finished installing XAMPP on your computer.
Launch XAMPP [Y/n]: y
五、安裝后的文件在 /opt/lamp
六、啟動xampp:
[root@nginxone lampp]# /opt/lampp/xampp start
Starting XAMPP for Linux 1.8.3-1...
XAMPP: Starting Apache...fail.
XAMPP: Another web server is already running.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...fail.
XAMPP: Another FTP daemon is already running.
七、停止xampp:
[root@nginxone lampp]# /opt/lampp/xampp stop
Stopping XAMPP for Linux 1.8.3-1...
XAMPP: Stopping Apache...not running.
XAMPP: Stopping MySQL...ok.
XAMPP: Stopping ProFTPD...not running.
八、添加開機啟動:
溫習一下ln命令,使用方式:
#ln [option] source dist
#ln –s /opt/lampp/xampp /etc/rc.d/init.d/xampp
九、如果執行完上面這條還不能開機自動啟動,再執行下面3條語句。
#chkconfig –add xampp
#chkconfig –list | grep xampp
#chkconfig –level 3 xampp on
linux下xampp如何開機自動啟動
centos下:
1.首先檢查默認啟動文件在那個文件下:
egrep :initdefault: /etc/inittab
2.如果結果是:rc3.d則如下(如果是rc5.d則將3改成5即可),
cd /etc/rc.d/rc3.d
3.執行命令
ln -s /opt/lampp/lampp S99lampp
ln -s /opt/lampp/lampp K01lampp
xampp的界面:

十、卸載xampp
#/opt/lampp/xampp stop
#rm -rf /opt/lampp
三、 讓局域網均可訪問
安裝完成后,很多時候用locahost來訪問時,是沒有問題的,但是同一局域網里其它主機用域名訪問時,常常不能訪問,這里情況大概分為兩種: 1. xampp的配置文件:/opt/lampp/etc/extra/httpd-xampp.conf中將一下內容屏蔽
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
#Require local
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
2. 如果按照以上修改后,還是不能訪問,則可能是防火牆把80端口給干掉了,要么把防火牆關閉,要么配置一下80端口允許訪問。
四、 安裝設置
在默認的安裝過程中,xampp所有均是沒有密碼的,為了安全,我們應該為xampp設置密碼。該如何操作呢?
# /opt/lampp/lampp security
- 1
設置xampp的密碼: XAMPP: Quick security check… XAMPP: Your XAMPP pages are NOT secured by a password. XAMPP: Do you want to set a password? [yes] yew XAMPP: Do you want to set a password? [yes] yes XAMPP: Password: XAMPP: Password (again):
用戶名默認是:xampp
設置phpMyAdmin的密碼: 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.
設置mysql的root賬戶: 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.
設置ftp密碼: XAMPP: The FTP password for user ‘daemon’ is still set to ‘xampp’. XAMPP: Do you want to change the password? [yes] yes XAMPP: Password: XAMPP: Password (again):
通過以上步驟,基本的設置就搞定了,已經達到可用的程度。想要了解更多的,可用google啦!