一、xampp下載地址:
二、我下載的是xampp-linux-x64-5.5.19-0-installer.run (備注 wget下載文件后默認存放在當前目錄下)
三、下載完以后,給該文件添加執行權限:
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
啟動:
/opt/lampp/lampp start
然后打開瀏覽器,輸入http://localhost 就可以看到默認頁面了,說明安裝成功了。
另外它附帶安裝的phpmyadmin也非常好用,網址是:http://localhost/phpmyadmin 。
自己的php項目,只需要通過ln -s 軟鏈接到 /opt/lampp/htdocs 就好了
####################### 擴展閱讀 ##################################
安全問題(必讀!)
如前所述,XAMPP 並不適用於生產環境,而僅供開發環境使用。XAMPP 被設置為盡量開放,並提供開發者任何他/她想要的功能。這對於開發環境來說是很棒的,但對於生產環境來說卻可能是致命的。
這兒有一份 XAMPP 缺乏安全防護的列表:
1 MySQL 管理員(root)沒有密碼。
2 MySQL 可通過網絡訪問。
3 ProFTPD 使用“lampp”作為用戶名“nobody”的密碼。
4 PhpMyAdmin 可以通過網絡訪問。
5 示例程序可以通過網絡訪問。
6 MySQL 和 Apache 在同一個用戶名(nobody)下運行。
要修正絕大部分的安全薄弱環節,只需執行以下命令:
/opt/lampp/lampp security
它會啟用一個小小的安全檢查功能,使您安裝的 XAMPP 更安全。
|
||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
|