CentOS下安裝XAMPP詳細教程

來源:互聯網
上載者:User

標籤:

現在php的整合運行環境越來越多,個人比較喜歡XAMPP,更新速度快,好用,安裝便捷。windows下面的安裝,就是下一步、下一步,沒什麼好說的,詳細說一下linux下面的安裝,這裡以CentOS為例進行說明。

一、 下載XAMPP

如果直接使用wget從xampp的官網上下載,由於各種牆,不能下載成功,可以在 該連結 中選擇自己需要的版本。我選擇的linux下,64位,5.6.14這個版本。

使用以下命令進行下載:

# wget http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/5.6.14/xampp-linux-x64-5.6.14-0-installer.run

下載成功後,會在目錄中看到名為:xampp-linux-x64-5.6.14-0-installer.run 的檔案。

二、 安裝

安裝前,需要先給xampp安裝包可執行檔許可權

# chmod 777 xampp-linux-x64-5.6.14-0-installer.run

運行 ./xampp-linux-x64-5.6.14-0-installer.run 進行安裝操作。根據提示進行選擇需要安裝的部分即可: 

至此,安裝步驟就已經完成了  啟動xampp:

# /opt/lampp/lampp start

停止xampp:

# /opt/lampp/lampp stop

卸載xampp:

# /opt/lampp/lampp 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 localErrorDocument 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啦!

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.