64 位ubuntu 安装 32位兼容包
apt-get install ia32-libs刚看了一下,wordpress才11个表太神奇了,这么复杂的系统,amazing参考以下文章
http://9hills.us/2011/01/wordpress/http://dueam.org/2010/09/ubuntu-server-%E5%AE%89%E8%A3%85%E4%B8%8E%E9%85%8D%E7%BD%AElnmp%E5%B9%B6%E5%AE%89%E8%A3%85wordpress/(主要)
安装的过程还算顺利,只是在几个server间切换,搞混了php-fpm在10.04上没有进官方源,我们添加ppa源。
service php5-fpm start
在nginx.conf中加入下面一段代码
server { listen 80 ; server_name blog.geilibuy.com; #access_log /var/log/nginx/localhost.access.log; index index.php index.htm index.html; root /var/www/wordpress; expires 7d; location ~ .php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param APPLICATION_ENV production; include fastcgi.conf; expires off; } }
在/usr/local/nginx/conf/fastcgi.conf中(其实这里原来的就可以,是一样的,只是代码的顺序不一样而已)
将内容替换为
fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param SERVER_SOFTWARE nginx; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param script_FILENAME $document_root$fastcgi_script_name; fastcgi_param script_NAME $fastcgi_script_name; fastcgi_param REQUEST_URI $request_uri; fastcgi_param document_URI $document_uri; fastcgi_param document_ROOT $document_root; fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param REMOTE_ADDR $remote_addr; fastcgi_param REMOTE_PORT $remote_port; fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; # PHP only, required if PHP was built with enable-force-cgi-redirect fastcgi_param REDIRECT_STATUS 200;
完成之后通过:
root@lnmp:/home/windonly# nginx -t
the configuration file /etc/nginx/nginx.conf syntax is ok
configuration file /etc/nginx/nginx.conf test is successful
来测试配置文件是否正确。
最后通过 service nginx reload 重启nginx
wget http://cn.wordpress.org/wordpress-3.0.5-zh_CN.tar.gz
tar -zxvf https://www.cnblogs.com/lexus/archive/2011/02/11/wordpress-3.0.5-zh_CN.tar.gz
通过:
vi /var/www/index.php
<? php
phpinfo();
?>
然后访问这个页面来测试是否配置成功了。
mysql -uroot -p
show databases;
create database b2c2_blog;
use mysql;
create user 'user'@'localhost' identified by 'password';
grant all on b2c2_blog.* to 'user'@'localhost';
根据向导会生成wp-config.php文件
主题推荐
http://www.wpmes.cn/archive/red-wordpress-theme-hibeetle.html
http://www.os80.info/archives/72.html(不错)
改wordpress的footer.php来去掉一些信息
使用capistrano来部署wordpress
http://devblog.imedo.de/2008/06/23/wordpress-deployment-with-capistrano-2-and-git/
http://whomwah.com/2006/05/21/deploying-wordpress-using-capistrano/
http://whomwah.com/2009/02/01/deploying-wordpress-to-slicehost-using-capistrano-and-git/(主要是这篇)
mkdir wordpress
cd wordpress
capify .
cap deploy:setup#进行初始化
部署代码的机子要向github所在的server提交公钥,参考http://help.github.com/linux-key-setup/
在我的测试中并不是把公钥提交就可以了,还要再连接一遍先
Testing if our new key works is simple, we just ssh to github. If this is the first time you’re connecting you’ll have to save the server’s key. You can confirm the fingerprint on the keys tab of the account settings page
原因是在~/.ssh下同时有公钥和密钥,把公钥移走就好了reference http://www.microsuncn.com/index.php?title=Fixed_Permission_denied_(publickey,gssapi-with-mic)本文地址:http://ww.kub2b.com/tnews/4184.html 企库往 http://ww.kub2b.com/ , 查看更多If you have some problems likes Permission denied (publickey,gssapi-with-mic), or the error 'Not a RSA1 key file' when using ssh remote login, try to fix issues as below:
- get more information with ssh -vvv username@yourhost.com, it's more important.
- check the permissions of your private and public keys, id_rsa should 600, id_rsa.pub should 644
- check if your id_rsa matched with id_rsa.pub.
For the 3rd, it looks very strange, I am not sure it's a bug of openssh or something. The id_rsa.pub is the public key for my windows host (I have ssh server on windows), the id_rsa is the private key for remote linux host, I put them to the .ssh folder.