在Centos上安裝wordpress

方健發表於2015-01-16

參考: http://ahmed.amayem.com/installing-wordpress-step-1a-installing-the-wordpress-directory-using-yum-on-linux-centos-6/

  1. yum install wordpress
  2. cat /usr/share/doc/wordpress-4.1/README.fedora(按照裡面的步驟建立資料庫)
  3. 訪問http://host/wordpress 發現這個錯誤 "client denied by server configuration: /usr/share/wordpress/"
  4. 檢查 vi /etc/httpd/logs/error_log 發現 "client denied by server configuration: /usr/share/wordpress/" 說明apache已經把請求轉到指定目錄,但是由於apache的設定被禁止了
  5. 檢查 vi /etc/httpd/conf/httpd.conf 沒找到wordpress設定,但是發現"Include conf.d/*.conf"
  6. 進一步檢查 vi /etc/httpd/conf.d/wordpress.conf 發現預設選項是 "Deny from All" 只允許本機的。所以改成 "Allow from All"就好
  7. service httpd reload

http://ahmed.amayem.com/installing-wordpress-step-2-setting-up-mysql-for-wordpress-using-command-line-mysql-client-on-linux-centos-6/
1. sudo vi /etc/wordpress/wp-config.php 設定資料庫名和使用者名稱
2. mysql> grant all privileges on wordpress.* to wordpress@localhost identified by 'wordpress';
3. http://tt/wordpress/wp-admin/install.php

解決 /usr/share/wordpress/.htaccess: RewriteEngine not allowed here
http://stackoverflow.com/questions/6995545/htaccess-rewriteengine-not-allowed-here

相關文章