Thursday, September 9, 2010

wordpress安裝備忘錄

為了使用wordpress
要先有mysql-server
裝完後service mysqld start
chkconfig mysqld on
接著進入mysql, 首先為mysql的root建立密碼
mysqladmin -r root password 'my-password進入mysql產生資料庫並授權
mysql -u root -p
create database wordpress;
grant all privileges on wordpress.* to bob@localhost identified by 'another-password';
show databased;
驗證完後就從mysql離開, quit
修改/etc/wordpress/wp-config.php裡面的
database-name
user-name
database-password
之後把/usr/share/wordpress整個移到/var/www/html之下
不過此時的/var/www/html/wordpress/wp-config.php連結失效
重新製作, 連到/etc/wordpress/wp-config.php
不知為啥
把wordpress整個複製到/var/www/html
resotrecon -R /var/www/html/wordpress
想要以瀏覽器開啟
http://localhost/wordpress/wp-admin/install.php
總是失敗
http://localhost/index.html可以
http://localhost/wordpress/index.html就不行
後來
把它整個移到~/public_html之下就可以了
ps: 如果wordpress的資料庫密碼忘了或錯了, 以root進入後,
前面講的grant blabla重打一次即可
照理說
之後wordpress備份
應該就是家目錄和wordpress資料庫就可以了

No comments:

Post a Comment