linux之centos安裝xampp

來源:互聯網
上載者:User

標籤:style   http   io   ar   os   使用   sp   for   strong   

一、xampp:

http://downloads.sourceforge.net/project/xampp/XAMPP%20Linux/5.5.19/xampp-linux-x64-5.5.19-0-installer.run

二、我下載的是xampp-linux-x64-5.5.19-0-installer.run   (備忘 wget下載檔案後預設存放在目前的目錄下)

32位系統:wget http://downloads.sourceforge.net/project/xampp/XAMPP%20Linux/5.5.19/xampp-linux-5.5.19-0-installer.run

64位系統:wget http://downloads.sourceforge.net/project/xampp/XAMPP%20Linux/5.5.19/xampp-linux-x64-5.5.19-0-installer.run

三、下載完以後,給該檔案添加執行許可權:

chmod a+x xampp-linux-x64-1.8.3-a-installer.run

四、安裝xampp過程如下:

[[email protected] 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

[[email protected] 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:

[[email protected] 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:

[[email protected] 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 更安全。

 

進階的啟動與停止參數

0.9.4 版以前的 /opt/lampp/lampp 只能簡單地啟動或停止 XAMPP。自從 0.9.5 版開始,它學會了很多新的東西。

進階的啟動與停止參數

參數

描述

start

啟動 XAMPP。

stop

停止 XAMPP。

restart

重新啟動 XAMPP。

startapache

只啟動 Apache。

startssl

啟動 Apache 的 SSL 支援。該命令將持續啟用 SSL 支援,例如:執行該命令後,如果您關閉並重新啟動 XAMPP,SSL 仍將處於啟用狀態。

startmysql

只啟動 MySQL 資料庫。

startftp

啟動 ProFTPD 伺服器。通過 FTP,您可以上傳檔案到您的網路伺服器中(使用者名稱“nobody”,密碼“lampp”)。該命令將持續啟用 ProFTPD,例如:執行該命令後,如果您關閉並重新啟動 XAMPP,FTP 仍將處於啟用狀態。

stopapache

停止 Apache。

stopssl

停止 Apache 的 SSL 支援。該命令將持續停止 SSL 支援,例如:執行該命令後,如果您關閉並重新啟動 XAMPP,SSL 仍將處於停止狀態。

stopmysql

停止 MySQL 資料庫。

stopftp

停止 ProFTPD 伺服器。該命令將持續停止 ProFTPD,例如:執行該命令後,如果您關閉並重新啟動 XAMPP,FTP 仍將處於停止狀態。

security

啟動一個小型安全檢查程式。

例如:想啟用帶 SSL 支援的 Apache,只需輸入如下命令(以 root 身份):

/opt/lampp/lampp startssl

 

現在您可以通過 SSL 形式的 https://localhost 訪問 Apache 伺服器了。

 什麼東西放在哪裡?

什麼東西放在哪裡?一個很大的問題哦,這裡有部分答案!;)

重要的檔案和目錄

檔案/目錄

用途

/opt/lampp/bin/

XAMPP 命令庫。例如 /opt/lampp/bin/mysql 可執行 MySQL 監視器。

/opt/lampp/htdocs/

Apache 主目錄。

/opt/lampp/etc/httpd.conf

Apache 配製檔案。

/opt/lampp/etc/my.cnf

MySQL 配製檔案。

/opt/lampp/etc/php.ini

PHP 配製檔案。

/opt/lampp/etc/proftpd.conf

ProFTPD 配製檔案。(從 0.9.5 版開始)

/opt/lampp/phpmyadmin/config.inc.php

phpMyAdmin 配製檔案。

 停止 XAMPP

想停止 XAMPP,只需輸入如下命令:

/opt/lampp/lampp stop

您現在應該能看到:

Stopping LAMPP 1.7.3a...
LAMPP: Stopping Apache...
LAMPP: Stopping MySQL...
LAMPP stopped.


然後 XAMPP 的 Linux 版就停止運行了。

 卸載

想卸載 XAMPP,只需輸入如下命令:

rm -rf /opt/lampp

卸載完成。:)

linux之centos安裝xampp

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.