1. 下载最新的wordpress
wget http://wordpress.org/latest.tar.gz
2. 解压
tar -xzvf latest.tar.gz
移动到:/data/wordpress
3. 创建数据库
mysql -u root -p
提示输入密码
create database wordpress_db;
创建数据库用户
GRANT ALL ON wordpress_db.* TO user@localhost identified by "password";
4. 修改配置文件
cd /opt/webapps/www/wp/wp
mv wp-config-sample.php wp-config.php.
5. 配置nginx
server {
listen 80;
server_name www.myblog.com;
access_log /var/log/nginx/myblog.com-access.log;
location / {
root /data/wordpress;
index index.php;
try_files $uri /index.php;
}
location /wp-admin {
root /data/wordpress;
index index.php;
try_files $uri /wp-admin/index.php;
}
location ~ \.php$ {
root /data/wordpress;
fastcgi_pass 127.0.0.1:8888;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
6. 安装 访问http://www.myblog.com/wp-admin/install.php
posted on 2009-10-30 11:49
冰是没有未来的,因为它的永恒 阅读(151)
评论(0) 编辑 收藏 所属分类:
开源blog