在CentOS上搭建PHP伺服器環境

來源:互聯網
上載者:User

標籤:style   blog   c   code   tar   http   

1、您也可以使用一鍵自動部署環境的工具,請參見網友開發的這個工具

http://www.centos.bz/2013/08/ezhttp-tutorial/2、

安裝:

wget -c http://lamp.phpstudy.net/phpstudy.bin 
chmod +x phpstudy.bin    #使用權限設定
./phpstudy.bin     #運行安裝

3、安裝apache:yum install httpd httpd-devel 啟動apache:/etc/init.d/httpd start此時輸入伺服器的IP地址,應該看到apache的服務頁面,連接埠不用輸,apache預設就是使用80連接埠 安裝mysql:yum install mysql mysql-server啟動mysql:/etc/init.d/mysqld start 安裝phpyum install php php-devel重啟apache使php生效/etc/init.d/httpd restart此時可以在目錄:/var/www/html/下建立一個PHP檔案代碼:
然後訪問這個檔案,就能看到PHP的一些資訊,php.ini設定檔的路徑可以在這個頁面上看到
 安裝php的擴充yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc安裝完擴充之後需要再次重啟apache/etc/init.d/httpd restart 原文地址:http://www.cnblogs.com/liulun/p/3535346.html

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.