
帮网友搞了LNMP一键包,需要InnoDB,之前的lnmp0.8没有带InnoDB,所以需要重新编译安装下mysql,让mysql支持InnoDB引擎。
1、进入源码目录
cd /root/lnmp0.8/mysql-5.1.60
make clean
2、运行命令
./configure –prefix=/usr/local/mysql –enable-assembler –with-charset=utf8 –with-extra-charsets=complex –enable-thread-safe-client –with-big-tables –with-readline –with-ssl –with-embedded-server –enable-local-infile –with-pic –with-fast-mutexes –with-client-ldflags=-static –with-mysqld-ldflags=-static –with-plugins=all
3、make && make install
很多不熟悉linux的朋友,在我这里买了linode vps后,担心系统安装和环境搭建问题。有的找yqf.me安装了lnmp环境,有的找yqf.me安装了webmin/virtualmin面板,webmin面板我已经搞了不少教程了,具体参见http://www.linode.la/forum-75-1.html,今天主要写点linode vps搭建LNMP环境后安装wordpress的教程。比如我想建立一个wp.yihost.net的网站,用wordpress程序。
1、putty登陆linux系统。
2、上传或下载wordpress文件。
cd /home/wwwroot (安装wordpress的路径其实也可以随便定)
mkdir wpabc(wpabc名字随便起)
cd /home/wwwroot/wpabc (进入wpabc目录)
wget -c http://wordpress.org/latest.tar.gz (从官网下载wordpress最新版)
tar -zxvf latest.tar.gz (解压wordpress)
cp -R ./wordpress/* . (拷贝wordpress的解压文件到当前目录wpabc)
rm -rf wordpress (删除wordpress的原始文件)
rm -rf latest.tar.gz (删除wordpress的原始压缩包)
cd .. (回到上级目录)
chown -R www:www wpabc (修改wpabc用户组及用户属性)
当然,以上步骤也可以通过ftp上传压缩包,然后在服务器端解压完成。
附lnmp一键包如何新建ftp用户:
访问http://ip/ftp,会出现ftp管理面板。

3、登陆phpmyadmin,创建数据库。
Read more…
看到很多初次使用Linode的朋友老问些比较浅显的问题,我也为之着急,类似网站502之类的问题就不要问linode客服了,显然这些问题已经超出了linode的服务范围了。
Hello,
Thank you for getting back to us. Although we try to answer all questions as best we can, Linode provides an unmanaged service and software-specific questions like this are beyond the scope of our support. I’d suggest joining our active user community and asking there. You can find out more about the user community here:
http://www.linode.com/community/
Let us know if you have any service-related questions we can assist with.
Regards,
Doug
安装eAccelerator,执行如下命令:./eaccelerator.sh ,按提示选择版本,回车确认后,就会自动安装并重启web服务。
vi /usr/local/php/etc/php.ini ,eaccelerator路径是no-debug-non-zts-20060613 而不是no-debug-non-zts-20090626,参照下图更改即可:



安装ionCube,执行如下命令:./ionCube.sh 回车确认后,就会自动安装并重启web服务。
php 5.2.17 使用ioncube_loader_lin_5.2.so不是5.3,参照下图修改即可。


修改/usr/local/nginx/conf/nginx.conf 即可。
比如上图,把blog.gcpmeida.ca这个安装lnmp时候默认的域名改成你要的域名即可。
处于SEO考虑,经常要301重定向,比如把没有www的定向到www的域名。在LNMP中进行301重定向其实也很简单。下面演示一下将域名yiqingfeng.net重定向到www.yiqingfeng.net的方法:打开/usr/local/nginx/conf/vhost目录下相应的.conf文件,比如我的是/usr/local/nginx/conf/vhost/www.yiqingfeng.net.conf,修改成如下图即可,把红色的去掉,添加上绿色的一段代码。然后重启nginx:/etc/init.d/nginx restart,301重定向即可生效。
server
{
listen 80;
server_name www.yiqingfeng.net yiqingfeng.net;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/www.yiqingfeng.net;
include wordpress.conf;
location ~ .*\.(php|php5)?$
{
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log off;
}
server{
server_name yiqingfeng.net;
rewrite ^(.*) http://www.yiqingfeng.net$1 permanent;
}
最新评论