本文整理自网络,侵删。
typecho比wordpress更轻,更专注于写的享受。
现在大多的虚拟机运行环境都是lnmp,安装教程安装typecho可能会遇到404,数据配置错误问题。
把这两天安装typecho的步骤写下来给大家参考.
typecho安装方法
1.下载
#网站目录 cd /usr/local/nginx/html/ wget https://github.com/typecho/typecho/releases/download/v0.9-13.12.12-release/0.9.13.12.12.-release.tar.gz -O typecho.tar.gz tart -zxvf typecho.tar.gz
这样typecho的源代码放到了/usr/local/nginx/html/build
2.配置nginx的虚拟机(修改www.cxy.cc为你的域名),nginx配置typecho伪静态
upstream php { server 127.0.0.1:9000; } server { server_name www.cxy.cc; root html/build; access_log logs/wcxy.access.log main; error_log logs/wcxy.error.log; index index.php list.php; location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } if ( !-e $request_filename ) { rewrite ^(.*)$ /index.php$1 last; } location ~ .*.php(/.*)*$ { fastcgi_index index.php; include fastcgi.conf; fastcgi_split_path_info ^((?U).+.php)(/?.+)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; fastcgi_intercept_errors on; fastcgi_pass php; } location /status { #stub_status on; access_log off; } location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*.(js|css)?$ { expires 12h; } }
3.登陆phpmyadmin,新建数据库,一定要提前建立数据库,如果直接安装typecho会提示“对不起,无法连接数据库,请先检查数据库配置再继续进行安装”
相关阅读 >>
自己做wordpress评论插件修改评论样式(两步美化评论内容)
在centos 6 中安装wordpress(一) 安装apache,mysql, php环境
优化wordpress的google字体以加速国内服务器上的运行
更多相关阅读请进入《wordpress》频道 >>