天天看點

wordpress簡單配置

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

1. 本來打算在CentOS 5.5 裡面安裝,但是php版本低,還得重新編譯,就換到CentOS 6.0,反正在虛拟機裡面

需要安裝的包: httpd, mysql ,php(注意要把php-mysql安上)

開機啟動

chkconfig mysqld –levels 345 on chkconfig httpd –levels 345 on

開啟程序(注意把/etc/httpd/conf.d/welcome.conf裡面的配置注釋掉)

/etc/init.d/mysqld start /etc/init.d/httpd start

打開iptables的80端口

修改/etc/sysconfig/iptables,在合适位置插入一條規則

<a href="http://blog.51cto.com/attachment/201204/103254574.png" target="_blank"></a>

/etc/init.d/iptables restart

2.建立mysql賬戶并且賦予權限

直接在終端輸入mysql

3.建立資料庫

mysql -u username -p 然後輸入密碼 create database word_press

4.将wordpress解壓,(我重命名為blog),上傳到/var/www/html,将wp-config-sample.php重命名為wp-config.php,修改配置,包括資料庫使用者名等

// ** MySQL settings – You can get this info from your web host ** // /** The name of the database for WordPress */ define(‘DB_NAME’, ‘word_press’); /** MySQL database username */ define(‘DB_USER’, ‘username’); /** MySQL database password */ define(‘DB_PASSWORD’, ‘password’); /** MySQL hostname */ define(‘DB_HOST’, ‘localhost’);

5.在浏覽器上輸入伺服器位址,傻瓜式安裝

6.下載下傳主題插件等

我用了zbench主題,下了一個wp-code-highlight插件,效果如下

<a target="_blank" href="http://blog.51cto.com/attachment/201202/151520686.png"></a>

本文轉自nxlhero 51CTO部落格,原文連結:http://blog.51cto.com/nxlhero/781297,如需轉載請自行聯系原作者