CentOS下配置typecho

来源:互联网 发布:淘宝儿童电动车 编辑:程序博客网 时间:2024/05/24 06:41

初始环境按照我的另一文章基于CentOS 6.4 搭建 WordPress 个人博客,将Nginx、Mysql和Php环境搭建完成。至少让相对健壮的Wordpress能跑起来。

这么说,是因为我每次只有先跑通wordpress,再搭建Typecho才能成功。单独搞Typecho一次都没有成功过,搞不清楚原因。

到这里,Wordpress已经OK了,接下来,配置Typecho。

先修改配置文件

mv /etc/nginx/conf.d/wordpress.conf  /etc/nginx/conf.d/blog.conf vim /etc/nginx/conf.d/blog.conf 

配置文件内容

server {    listen 80;    root /var/www/html;    location / {        index index.php index.html index.htm;        try_files $uri $uri/ /index.php index.php;    }    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000    location ~ .*\.php(\/.*)*$ {        fastcgi_pass   127.0.0.1:9000;        fastcgi_index  index.php;        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;        include        fastcgi_params;    }}

Nginx加载配置文件

nginxnginx -s reload

官网下载typecho,解压后放入/var/www/html下。

tar -zxvf 1.0.14.10.10.-release.tar.gz 

浏览器的地址栏输入地址:

localhost/build 

或者

<你的IP>/build

填写数据库参数,即可安装看到效果。