Centos 5.5上搭建Wordpress平台

來源:互聯網
上載者:User

一,搭建Wordpress實體環境需求:

WordPress 3.3.2的伺服器需求

php 5.2.4 或者更高版本

MySQL 5.0 或者更高版本

二,搭建Wordpress步驟  

1.擷取Wordpress軟體包

Wordpress的簡體中文官方網站http://cn.wordpress.org/

2.安裝Wordpress

解壓:tar -zxvf wordpress-3.3.2-zh_CN.tar.gz -C /data/

cd /data/wordpress

cp wp-config-sample.php wp-config.php (只能用cp不能用 mv)

3.Mysql資料庫的配置

mysql>grant all privileges on wordpress.* to wordpress@'Wordpress伺服器IP地址' identified by "wordpress";

4.vim wp-config.php,修改資料庫名,使用者名稱,密碼及其資料庫伺服器的IP地址

// ** MySQL 設定 - 具體資訊來自您正在使用的主機 ** //
/** WordPress 資料庫的名稱 */
define('DB_NAME', 'wordpress');

/** MySQL 資料庫使用者名稱 */
define('DB_USER', 'wordpress');

/** MySQL 資料庫密碼 */
define('DB_PASSWORD', 'wordpress');

/** MySQL 主機 */
define('DB_HOST', 'mysql資料庫的IP地址');

在Apache的主設定檔裡面添加Wordpress虛擬機器主機

5.配置Apache的虛擬機器主機

vim /usr/local/httpd/conf/httpd.conf

<VirtualHost *:8080>

ServerAdmin  shifeng_zhang88@163.com

DocumentRoot /data/wordpress

ServerName test.wordpress.com
</VirtualHost>

重啟Apache服務的服務,在用戶端進行測試

6.Wordpress環境測試,如果test.wordpress.com的網域名稱沒有註冊,需要修改原生hosts檔案,在hosts檔案裡面添加如下內容

Wordpress伺服器的IP地址   test.wordpress.com

在瀏覽器輸入下面地址http://test.wordpress.com:8080出現下面的錯誤,初步判斷是沒有許可權訪問。

查看Apache的錯誤記錄檔資訊如下:

聯繫我們

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