简单搭建WordPress
下载wordpress. http://cn.wordpress.org/
在ubuntu下面用apt-get安装下面这些组件
- sudo apt-get install mysql-server mysql-client mysql-common apache2 php5 php5-mysql libapache2-mod-php5 php5-gd vsftpd
- vsftpd是ftp服务器,可以用来方便修改主题
配置mysql
- 启动mysql sudo /etc/init.d/mysql restart
- 登陆 mysql -u root -p<password>
- 创建数据库 create database wordpress;
- 配置权限 GRANT ALL PRIVILEGES ON wordpress.* TO '<user>'@localhost IDENTIFIED BY '<password>';
配置apache
- 修改/etc/apache2/sites-enabled/000-default
- ServerName <domain>
- DocumentRoot <wordpress-path>
- 启动apache sudo /etc/init.d/apache2 restart
配置ftp
- 修改/etc/vsftpd.conf
- #anonymous_enable=YES
- local_enable=YES # 允许本地账户
- write_enable=YES # 允许写权限
- 启动ftp sudo /etc/init.d/vsftpd restart
配置插件
- SI CHAPTCHA http://wordpress.org/plugins/si-captcha-for-wordpress/ 可以用来阻止垃圾评论等