﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>尘缘的博客 &#187; linux</title>
	<atom:link href="http://www.4wei.cn/archives/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://www.4wei.cn</link>
	<description>PHP+Redis+ThinkPHP+LocoySpider+Discuz!+DEDE+PHPCMS</description>
	<lastBuildDate>Fri, 03 Feb 2012 04:20:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>发布接口不能正常使用的常见问题，Zend Guard加密的文件出现500错误的解决办法</title>
		<link>http://www.4wei.cn/archives/1001577</link>
		<comments>http://www.4wei.cn/archives/1001577#comments</comments>
		<pubDate>Thu, 29 Dec 2011 03:08:19 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1001577</guid>
		<description><![CDATA[尘缘的发布接口（http://my.4wei.cn/）采用服务器自动生成授权并打包的，默认使用Linux + Zend Guard 5.5 进行加密，7z进行打包。 包括免费接口和收费接口，如果你的接口上传到服务器上，不能正常访问，请对照以下错误现象和解决办法。 1，Zend Optimizer not installed 最常见的问题，“Zend Optimizer”没有安装，请根据以下两篇文章安装Zend Optimizer或者Zend Loader http://www.4wei.cn/archives/1001038 http://www.4wei.cn/archives/1001397 2，接口报“500 Internal Server Error” 如果你的接口访问时，是空白页面，或者没有内容，或者没有报异常错误，那应该就是出现了“500 Internal Server Error”，经常出现在Linux主机上。 错误原因有两个： 你的服务器上的php版本是5.3，而你的接口使用了5.2的版本，请在购买时正确选择你的php版本，已经购买生成授权的用户，请联系尘缘更换php版本信息并重新生成授权. 同上，用户版用户请正确选择对应版本的接口压缩包，并上传 接口没有使用二进制上传，或者ftp软件上传时出错，请换一个ftp上传软件试试 3，接口报“This file has expired” 您使用的接口版本太老，不能再继续使用了，需要更新一下接口。 下载免费接口、购买收费接口、更新收费接口的用户请直接前往http://my.4wei.cn 尘缘版接口 提示This file has expired的解决办法：http://www.4wei.cn/archives/1001548 4，接口提示“Fatal error: Incompatible file format: The encoded file has format major ID 65540, whereas the [...]]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1001577/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 11.10中安装fcitx 4.0.1版本小企鹅输入法</title>
		<link>http://www.4wei.cn/archives/1001510</link>
		<comments>http://www.4wei.cn/archives/1001510#comments</comments>
		<pubDate>Tue, 25 Oct 2011 07:35:49 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1001510</guid>
		<description><![CDATA[最新版本的Ubuntu 11.10 于昨天正式发布了，今天抽空将机器上的系统换成了最新的版本了，遇到第一个问题就是配置Fcitx的五笔拼音输入法。 首先通过官方源安装Fcitx，默认已经是Fcitx4.0.1版本了，命令如下： 重启X后，通过Ctrl+Space可以调出来输入界面，可意外的是只鹅拼音输入和双拼，急煞我也，后来通过官方网站得知，这个版本的Fcitx已经不默认安装所有库表了，而需要单独安装，执行命令安装五笔拼音混合输入的库表： 另：安装单独的五笔库表需要执行命令： 这样重启X 后，即可享用五笔拼音混合输入了。 如果重启系统以后还没有自动启动输入法，可以执行命令手工启动 若需要Fcitx的其它资源，可以访问http://code.google.com/p/fcitx/downloads/list 来享用现代化的输入法吧，哈]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1001510/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux mail/mailx命令使用外部smtp(网易163的SMTP)来发送邮件</title>
		<link>http://www.4wei.cn/archives/1001468</link>
		<comments>http://www.4wei.cn/archives/1001468#comments</comments>
		<pubDate>Fri, 07 Oct 2011 06:32:28 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1001468</guid>
		<description><![CDATA[bin/mail会默认使用本地sendmail发送邮件，这样要求本地的机器必须安装和启动Sendmail服务，配置非常麻烦，而且会带来不必要的资源占用。 我觉得更重要的是，发送的邮件成功率会高一些。 而通过修改配置文件可以使用外部SMTP服务器，可以达到不使用sendmail而用外部的smtp服务器发送邮件的目的。 我使用了国内速度最快的网易邮箱，是为了保证邮件发送的及时性，如果是比较重要的邮件，一般建议使用tx的邮箱。 说明： from是发送的邮件地址 smtp是发生的外部smtp服务器的地址 smtp-auth-user是外部smtp服务器认证的用户名 smtp-auth-password是外部smtp服务器认证的用户密码 smtp-auth是邮件认证的方式 配置成功后，就可以使用了 可以发送一封邮件测试一下： user@sohu.com是收件人地址，content.txt里面是邮件正文. 接下来，使用Shell或者PHP发送邮件就比较方便呐！]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1001468/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下PHP调用7za压缩时出现乱码的解决方法</title>
		<link>http://www.4wei.cn/archives/1001464</link>
		<comments>http://www.4wei.cn/archives/1001464#comments</comments>
		<pubDate>Wed, 05 Oct 2011 12:57:16 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1001464</guid>
		<description><![CDATA[这个问题折腾了很久，面临的问题总结出来就是“Windows下的文件编码和LINUX不一样，中文系统为GB，LINUX为UTF-8编码”。 使用7za来压缩和解压文件，可以有效的解决Windows和Linux文件传输出现乱码的问题。 俺的某套程序需要实现批量打包下载的功能，也使用了7z来进行压缩，发现PHP运行在Apache默认的语言下，会造成Apache+PHP+7za生成的文件乱码。 经过一段时间的研究，发现可以修改配置文件，修改Apache的运行环境，以实现Locale编码的修改 修改/etc/sysconfig/httpd 改成 其中，zh_CN.UTF-8可以改成zh_CN.GB2312等编码。 运行结果： 为了测试效果，可以打印出WEB运行用户的locale 修改以前的结果 修改以后的结果： httpd默认使用C作为locale，而不是象以前一样是用root的locale作为locale，可以通过修改/etc/sysconfig/httpd里的环境变量HTTPD_LANG来自定义。]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1001464/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>英文Ubuntu系统安装中文支持，中文UTF-8</title>
		<link>http://www.4wei.cn/archives/1001458</link>
		<comments>http://www.4wei.cn/archives/1001458#comments</comments>
		<pubDate>Sat, 24 Sep 2011 04:46:03 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1001458</guid>
		<description><![CDATA[海哥没事折腾了一个国外的VPS做实验，发现通过VPS管理后台安装的操作系统全部不支持中文，这才意识到在国内用光盘安装Ubuntu真是太方便了。 网上搜了一把，发现设置中文环境也比较简单，需要三步。 第一步，安装中文包： sudo apt-get install language-pack-zh language-pack-zh-base 第二步，配置相关环境变量： sudo vim /etc/environment 在文件中增加语言和编码的设置： LANG="zh_CN.UTF-8" LANGUAGE="zh_CN:zh:en_US:en" 我的配置文件显示如下： PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" LANG="zh_CN.UTF-8" UNZIP="-O CP936" ZIPINFO="-O CP936" 第三步，重新设置本地配置： sudo dpkg-reconfigure locales 第四步，就是要有一个支持utf8的终端软件，可参考文档SSH Secure Shell Client的替代方案，这是解决ssh命令行登录和sftp文件传输的。我喜欢用SecureCRT，sz和rz命令异常好用，当然，这只是客户端和服务器之间的交互。服务器与服务器之间还是scp来得方便。 到今天为止，vps拿到手上一周了，连个PHP+nginx+mysql的环境都没有折腾起来。买这么个VPS，能从头折腾到尾，大呼超值呀。]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1001458/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 11.04 安装nginx + fpm + php-cgi +mysql</title>
		<link>http://www.4wei.cn/archives/1001436</link>
		<comments>http://www.4wei.cn/archives/1001436#comments</comments>
		<pubDate>Sat, 17 Sep 2011 05:41:33 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1001436</guid>
		<description><![CDATA[这几年的项目全用Apache开发的，主要是对Windows+Linux+WAMP+NavicatMySql产生了严重依赖。所有项目均是Windows开发，Linux运行，开发环境效率高。 这段时间公司里的几个项目感觉速度忒慢，果断开始迷信LNMP了。于是开始了Nginx环境编译的各种纠结。我和公司的其它同事不一样，不喜欢把时间花在环境的折腾上，哈哈。 不过好在Ubuntu下安装PHP环境也越来越简单了，一条命令就可以完成整个过程的安装，比较适合像我这类喜欢CentOS YUM命令的同学。 本文折腾期间经过几个修改，哈哈，最终折腾出一个PHP5.3.5+Nginx1.0+FPM+eAcc+Mysql+ZendGuard Loader的环境。 安装nginx 运行： sudo apt-get install nginx Ubuntu安装之后的文件结构大致为： * 所有的配置文件都在/etc/nginx下，并且每个虚拟主机已经安排在了/etc/nginx/sites-available下 * 程序文件在/usr/sbin/nginx * 日志放在了/var/log/nginx中 * 并已经在/etc/init.d/下创建了启动脚本nginx * 默认的虚拟主机的目录设置在了/var/www/nginx-default 下面可以启动nginx来看看效果（请确保80端口没有其他服务在使用）： Ubuntu请运行： sudo /etc/init.d/nginx start 然后打开浏览器，查看http://localhost/ 看看是否看到了“Welcome to nginx!” 如果看到了，说明安装成功。 安装php 这里使用的是php5，安装以后的PHP版本是PHP5.3，对PHP版本有需求的同学可以搜索一下其它的安装方法。运行： sudo apt-get install php5 php5-cgi php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-pspell php5-recode php5-snmp php5-tidy [...]]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1001436/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS重装YUM，YUM安装PHP升级到PHP5.2，瞎折腾之笔记</title>
		<link>http://www.4wei.cn/archives/1001432</link>
		<comments>http://www.4wei.cn/archives/1001432#comments</comments>
		<pubDate>Tue, 13 Sep 2011 10:25:20 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1001432</guid>
		<description><![CDATA[支持的镜像有 http://ftp.sjtu.edu.cn http://mirrors.163.com http://mirrors.sohu.com wget /centos/5/os/x86_64/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm chmod 755 python-iniparse-0.2.3-4.el5.noarch.rpm rpm -ivh python-iniparse-0.2.3-4.el5.noarch.rpm # setup yum-metadata-parser wget http://ftp.sjtu.edu.cn/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm chmod 755 yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm rpm -e --nodeps yum-metadata-parser-1.0-8.fc6 rpm -ivh yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm # setup yum wget http://ftp.sjtu.edu.cn/centos/5/os/x86_64/CentOS/yum-3.2.22-33.el5.centos.noarch.rpm chmod 755 yum-3.2.22-33.el5.centos.noarch.rpm rpm -ivh --nodeps yum-3.2.22-33.el5.centos.noarch.rpm 一键安装LAMP环境 yum -y install httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd php-xml [...]]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1001432/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu下安装LAMP的步骤</title>
		<link>http://www.4wei.cn/archives/1001429</link>
		<comments>http://www.4wei.cn/archives/1001429#comments</comments>
		<pubDate>Sat, 10 Sep 2011 04:12:21 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1001429</guid>
		<description><![CDATA[Ubuntu下apt-get安装与CentOS下YUM安装果然有区别，都很方便，但软件包名就很不一样了。 安装 Apache2： sudo apt-get install apache2 安装PHP模块： sudo apt-get install php5 编辑测试页：（） sudo gedit /var/www/testphp.php 安装Mysql sudo apt-get install mysql-server mysqladmin -u root password db_user_password #db_user_password替换为密码 安装Mysql模块 sudo apt-get install libapache2-mod-auth-mysql sudo apt-get install php5-mysql sudo apt-get install php5-gd sudo /etc/init.d/apache2 restart 配置php.ini: sudo gedit /etc/php5/apache2/php.ini 把文件在文件后面的： #extension=mysql.so #extension=gd.so 的＃去掉。 安装phpmyadmin sudo apt-get install [...]]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1001429/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wget 下载命令实例</title>
		<link>http://www.4wei.cn/archives/1001418</link>
		<comments>http://www.4wei.cn/archives/1001418#comments</comments>
		<pubDate>Sat, 27 Aug 2011 05:37:09 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1001418</guid>
		<description><![CDATA[Linux wget是一个下载文件的工具，它用在命令行下。对于Linux用户是必不可少的工具，尤其对于网络管理员，经常要下载一些软件或从远程服务器恢复备份到本地服务器。如果我们使用虚拟主机，处理这样的事务我们只能先从远程服务器下载到我们电脑磁盘，然后再用ftp工具上传到服务器。这样既浪费时间又浪费精力，那不没办法的事。而到了Linux VPS，它则可以直接下载到服务器而不用经过上传这一步。wget工具体积小但功能完善，它支持断点下载功能，同时支持FTP和HTTP下载方式，支持代理服务器和设置起来方便简单。下面我们以实例的形式说明怎么使用wget。 1、使用wget下载单个文件 以下的例子是从网络下载一个文件并保存在当前目录 wget http://cn.wordpress.org/wordpress-3.1-zh_CN.zip 在下载的过程中会显示进度条，包含（下载完成百分比，已经下载的字节，当前下载速度，剩余下载时间）。 2、使用wget -O下载并以不同的文件名保存 wget默认会以最后一个符合“/”的后面的字符来命令，对于动态链接的下载通常文件名会不正确。 错误：下面的例子会下载一个文件并以名称download.php?id=1080保存 wget http://www.4wei.cn/download?id=1 即使下载的文件是zip格式，它仍然以download.php?id=1080命令。 正确：为了解决这个问题，我们可以使用参数-O来指定一个文件名： wget -O wordpress.zip http://www.4wei.cn/download.php?id=1080 3、使用wget --limit -rate限速下载 当你执行wget的时候，它默认会占用全部可能的宽带下载。但是当你准备下载一个大文件，而你还需要下载其它文件时就有必要限速了。 wget --limit-rate=300k http://cn.wordpress.org/wordpress-3.1-zh_CN.zip 4、使用wget -c断点续传 使用wget -c重新启动下载中断的文件： wget -c http://cn.wordpress.org/wordpress-3.1-zh_CN.zip 对于我们下载大文件时突然由于网络等原因中断非常有帮助，我们可以继续接着下载而不是重新下载一个文件。需要继续中断的下载时可以使用-c参数。 5、使用wget -b后台下载 对于下载非常大的文件的时候，我们可以使用参数-b进行后台下载。 wget -b http://cn.wordpress.org/wordpress-3.1-zh_CN.zip Continuing in background, pid 1840. Output will be written to `wget-log‘。 你可以使用以下命令来察看下载进度 tail -f [...]]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1001418/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu 11.04U盘安装终极解决办法！</title>
		<link>http://www.4wei.cn/archives/1001373</link>
		<comments>http://www.4wei.cn/archives/1001373#comments</comments>
		<pubDate>Tue, 21 Jun 2011 02:26:54 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1001373</guid>
		<description><![CDATA[公司的Ruby on Rails配置在Windows上真是一种灾难呀，不得已，在笔记本分了一区用来做Linux，在安装Ubuntu10.10没有问题的，但安装Ubuntu11.04却总出问题，找了无数解决办法，终于在高人指引下解决。 使用UltraISO（９.2以上的版本）把ＩＳＯ刻录到Ｕ盘里。 １、下载好ＩＳＯ镜像。 ２、使用ＵltraISO打开，选择启动－将镜像刻录到硬盘。 ３、刻录的时候选择ＵＳＢ－ＨＤＤ＋或ＵＳＢ－ＺＩＰ＋根据你的主板所支持的类型。 ４、这个很重要，从Ubuntu 10.10的iso或者光盘目录isolinux文件夹中提取出vesamenu.c32。覆盖已经刻录好的Ｕ盘里的该文件。否则会出现：“start booting from USB device… SYSLINUX 3.84 2009-12-18 EBIOS COPYRIGHT (C) 1994-2009 H.Peter Anvin et al _”会死在这里。 如果没有这个文件可以到这个兄弟的网盘里去下载：http://dl.dbank.com/c0kkrtdit2 当然，好心的我已经上传到我的博客了，悲剧解决。 vesamenu]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1001373/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>error: Autoconf version 2.58 or higher is required的解决办法</title>
		<link>http://www.4wei.cn/archives/1001287</link>
		<comments>http://www.4wei.cn/archives/1001287#comments</comments>
		<pubDate>Tue, 26 Apr 2011 05:51:18 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1001287</guid>
		<description><![CDATA[字面上看错误原因就是目前的automake2.13版本太低，那重新安装一下automake应该能解决问题。 第一步，卸载automake。 apt-get remove automake 这样并不能卸载2.13，需要sudo  rm /usr/local/bin/autoconf 才行。一开始没有删除配置文件进行重装，死活装不上。 第二步，重新安装一个automake高版本 wget http://files.directadmin.com/services/custombuild/autoconf-2.64.tar.gz tar xzf autoconf-2.64.tar.gz cd autoconf-2.64 ./configure --prefix=/usr make make install OK，问题解决。]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1001287/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>张宴的LNMP安装时，Mysql无法make install的解决办法</title>
		<link>http://www.4wei.cn/archives/1001284</link>
		<comments>http://www.4wei.cn/archives/1001284#comments</comments>
		<pubDate>Tue, 26 Apr 2011 04:05:36 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1001284</guid>
		<description><![CDATA[下载mysql-5.5.3-m3源码后，执行configure无错误，在make的时候却报: make[2]: *** [do_abi_check] 错误 1 make[2]: Leaving directory `/tmp/mysql-5.5.3-m3' make[1]: *** [abi_check] 错误 2 make[1]: Leaving directory `/tmp/mysql-5.5.3-m3' make: *** [all-recursive] 错误 1 摆渡，谷歌了一圈，居然是mysql的bug，貌似是mysql 5.1.14以上版本跟gcc 4.5不太兼容导致的。 解决方法： 在configure完成之后，打开Makefile，删掉1146行至1163行，即do_abi_check:目标后的所有语句。 再执行make &#038;&#038; make install 就OK了。]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1001284/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx启用gzip模块优化网页</title>
		<link>http://www.4wei.cn/archives/1001271</link>
		<comments>http://www.4wei.cn/archives/1001271#comments</comments>
		<pubDate>Thu, 21 Apr 2011 01:19:30 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1001271</guid>
		<description><![CDATA[http { : include conf/mime.types; : gzip on; : gzip_min_length 1000; : gzip_buffers 4 8k; : gzip_http_version 1.1; : gzip_types text/plain application/x-javascript text/css text/html application/xml; } 详细使用手册：http://wiki.nginx.org/NginxChsHttpGzipModule 曾看到有人说百度对Gzip的支持不够好，担心影响收录和SEO，后面发现百度专门针对这个问题作过报告，声明百度是支持Gzip的。 百度说：服务器开启gzip压缩影响蜘蛛抓取和收录量? 服务器开启gzip压缩是否会影响蜘蛛抓取和收录量? 服务器开启gzip压缩，不会对spider抓取产生影响，我们会以压缩的方式来抓取。并且也能够节省站点的网络流量。]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1001271/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LNMP服务器安全及优化指南</title>
		<link>http://www.4wei.cn/archives/1001184</link>
		<comments>http://www.4wei.cn/archives/1001184#comments</comments>
		<pubDate>Thu, 31 Mar 2011 04:05:02 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1001184</guid>
		<description><![CDATA[LNMP的安全问题真是多呀，网站一迁移到LNMP就出了娄子，讨厌。 这是给集团运维写的PHP安全优化，配合着做下WebServer的安全，估计其它人也用得着，所以整理成手册了，请各位领导过目。 By the way，我发现做机房运维的工程师，在Web服务器安全和优化的经验，可能会比较短缺，建议和PHP软件工程师做正面沟通，共同制定整体的安全策略。 作者：杨树海 QQ：130775 博客：www.4wei.cn 点击下载手册版：服务器安全及优化建议.docx 目录 Linux权限配置... 2 PHP安全配置... 3 NginX安全配置... 4 Mysql安全配置... 5 其它优化建议... 6 Linux权限配置 合理分配SSH管理及用户间的权限，记录登陆日志，如果可能，可以配置防火墙，只开放某些IP进行管理 合理分配FTP权限，如果可能，可以关闭FTP 功能 所有网站统一放置于某一WEB目录，设置适当目录权限（根据网站程序，分配不同网站不同目录的读写权限，除需要写入文件的目录授予777权限以外，其它目录均可以考虑只给555权限） 定期扫描或者记录网站目录下，新建、修改过的PHP文件，认真进行记录分析 定期扫描或者记录网站目录下大小超过100KB或小于1KB的PHP文件，这类文件通常都是木马    PHP安全配置 禁用高危函数 disable_functions=exec,passthru,shell_exec,system,popen,proc_open,proc_close, curl_exec,curl_multi_exec,parse_ini_file,show_source,dl,passthru,escapeshellarg,escapeshellcmd 禁用高位类库 disable_classes = "com" Php.ini中，请将open_basedir限制为网站所在Web目录，禁止跨目录请求 PHP6以下的版本，请设置register_globals = Off    NginX安全配置 禁用Nginx文件类型错误解析漏洞 参考：http://www.80sec.com/nginx-securit.html 启用网站目录隔离，不同网站配置不同对应权限，防止跨站 参考：http://www.xpb.cn/blog/665.html Nginx配置虚拟主机的功能尚不完善，网站权限控制比较复杂，建议认真分配网站各目录的读、写、执行权限 文件上传所在的存放目录，一定要禁止PHP程序运行 记录PHP运行日志和错误日志，认真分析异常访问请求    Mysql安全配置 关闭除跳转服务器以外的其它远程链接 每个网站设置不同的数据库管理账号并分配最低权限 禁用Mysql 除Root账户以外其它用户的以下权限： [...]]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1001184/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu下快速安装Lamp环境</title>
		<link>http://www.4wei.cn/archives/1000976</link>
		<comments>http://www.4wei.cn/archives/1000976#comments</comments>
		<pubDate>Mon, 01 Nov 2010 06:36:01 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1000976</guid>
		<description><![CDATA[版本：Ubuntu 10.10 1，安装Lamp-server 2，安装mcrypt加密器 3，安装xcache，可选项 如果php.ini中没有引入/etc/php5/conf.d下的配置文件，则需要把xcache.ini的内容加入到php.ini，xcache配置文件路径是/etc/php5/conf.d/xcache.ini 重启apache2 4，安装Zend Optimizer 编辑php.ini 最末尾加入以下代码，注意标点符号要英文。 [常用命令]]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1000976/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows下可视化安装ubuntu</title>
		<link>http://www.4wei.cn/archives/1000971</link>
		<comments>http://www.4wei.cn/archives/1000971#comments</comments>
		<pubDate>Sun, 31 Oct 2010 08:43:47 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1000971</guid>
		<description><![CDATA[首先下载ubuntu-10.10-desktop-i386.iso，目前最新版是10.10，官方网站：http://www.ubuntu.org.cn/。 下载以后得到一个ISO文件，用Winrar解压此ISO文件，或者直接将ISO中的wubi.exe提取出来，将wubi.exe和ubuntu-10.10-desktop-i386.iso放到同一目录，但不能放在要安装的目录中。 然后运行wubi.exe，根据提示设置要安装的路径，用户名和密码等，按提示重启就行。 重启系统会在开机的系统选择里提示Buntu选项，选择进入，就开始自动安装过程了。比较方便。 提示： 安装时，尽量选择联网模式，可以自动下载安装一些语言包等； 笔记本安装不要忘了插上电源线，过程不用值守，但时间也比较长！]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1000971/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS下的Nginx+Apache+Subversion Server安装笔记</title>
		<link>http://www.4wei.cn/archives/1000501</link>
		<comments>http://www.4wei.cn/archives/1000501#comments</comments>
		<pubDate>Tue, 23 Mar 2010 16:00:34 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1000501</guid>
		<description><![CDATA[我的Linux服务器均为CentOS，这两天刚刚折腾完LNMP的配置，接下来继续折腾SVN的环境配置。 在编译SVN时，发现Nginx尚不支持Subversion，查了相关资料，发现只有Apache可以支持SVN，无可奈何，看来只能做一个Apache与Nginx共存的服务器，用Nginx proxy把发向Nginx的SVN请求转到Apache上去。 如何安装Nginx，可以去参考张宴的Nginx教程，这应该是国内最早最全最详细的Nginx教程了，至于如何安装Apache，估计也挺简单的，我这里已经配置好了一个Nginx+Apache的服务器了。 按买醉的说法，nginx处理静态页的效率是apache的N倍，但在动态程序，特别是Java和PHP的处理上，Apache具有相当的优势。 这按Nginx官方的说法，短期内不会有可能支持SVN，至于两者之间的权衡，各位看官可得留意了。 说一下，Subversion Server并没有专门针对CentOS的版本，下载编译的话，用RH的即可。 我刚刚也找到了下载地址：http://www.collab.net/downloads/subversion/redhat.html 现在开始CentOS的安装过程。 除了下载软件包以外，还可以使用YUM安装： $ sudo yum install httpd subversion mod_dav_svn 建立版本库（Repository）： $ sudo mkdir -p /var/lib/subversion/repositories $ sudo chown -R apache:apache /var/lib/subversion 如果版本库的增改次数很频繁，可以写一个简单的脚本来实现快速调用： #!/bin/sh if [ $# -ne 1 ]; then echo 1&#62;&#38;2 Usage: $0 repository_name exit 127 fi echo "Sudoing..."; sudo svnadmin create --fs-type fsfs /var/lib/subversion/repositories/${1} [...]]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1000501/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>让Snoopy也支持HTTPS的解决办法</title>
		<link>http://www.4wei.cn/archives/1000499</link>
		<comments>http://www.4wei.cn/archives/1000499#comments</comments>
		<pubDate>Sun, 21 Mar 2010 04:40:02 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Snoopy]]></category>
		<category><![CDATA[curl]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1000499</guid>
		<description><![CDATA[How to make Snoopy work with https, we will find out! Class Name:Snoopy.class.php Snoopy version:1.2.4 如何让Snoopy这个PHP支持HTTPS，即SSL安全协议，我们今天就来解决这个问题。 First of all, look at the comment of $curl_path in Snoopy.class.php. Snoopy will use cURL for fetching SSL content if a full system path to the cURL binary is supplied here. set to false if you do not have [...]]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1000499/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>编译Mysql时出现configure: error: No curses/termcap library found的解决办法</title>
		<link>http://www.4wei.cn/archives/1000431</link>
		<comments>http://www.4wei.cn/archives/1000431#comments</comments>
		<pubDate>Wed, 20 Jan 2010 10:53:34 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1000431</guid>
		<description><![CDATA[在CentOS和Ubuntu下均提示以下错误，有时在PHP的安装时，也会遇到类似错误，百思不得其解，网上一些高人说可能是当前的Linux发行版缺少必要模块，都会出现以下错误： checking for tgetent in -ltermcap... no checking for termcap functions library... configure: error: No curses/termcap library found 有的朋友建议先安装ncurses，后来发现不安装也可以，主要是错误在配置参数上。 遇到的朋友可以在配置时，加上这样一条参数：--with-named-curses-libs=/usr/lib/libncursesw.so.5 最后的参数就是： ./configure --with-named-curses-libs=/usr/lib/libncursesw.so.5 到此，问题解决。]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1000431/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux中Vi不能高亮显示行号的解决办法</title>
		<link>http://www.4wei.cn/archives/1000335</link>
		<comments>http://www.4wei.cn/archives/1000335#comments</comments>
		<pubDate>Fri, 25 Dec 2009 15:40:05 +0000</pubDate>
		<dc:creator>尘缘</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.4wei.cn/?p=1000335</guid>
		<description><![CDATA[适用版本：CentOS，RedHat，UBUNTU，Fedora 解决办法如下： 在UBUNTU中vim的配置文件存放在/etc/vim目录中，配置文件名为vimrc 在Fedora中vim的配置文件存放在/etc目录中，配置文件名为vimrc 在CentOS和RH是在/etc目录中，配置文件名为virc 在终端 输入以下命令来编辑vimrc配置文件： sudo vim /etc/vim/vimrc 或 sudo gedit /etc/vim/vimrc 或 vi /etc/virc 以下是详细解决过程： 显示行号在文件末端添加一新行，输入 set nu 语法高亮 在文件中找到 "syntax on   这一行，去掉前面的双引号"，双引号是注释的意思 如果没有找到，则在配置文件后面加上，我测试CentOS发现没有。 自动缩进 在文件末尾添加一行，输入  set autoindent 在添加一行，输入 set cindent 其中 autoindent 是自动缩进； cindent是特别针对 C语言语法自动缩进 一般来说，直接打开文档就可以看到效果了，CentOS有点奇怪，需要登出再登陆以后才有效果。 当然，有的哥们是重启后登陆的，我先笑笑。 注意：如果设置好以上设置后，VIM没有作出相应的动作，那么请你把你的VIM升级到最新版，一般只要在终端输入以下命令即可：sudo apt-get install vim CentOS可以用yum安装 #yum install vim 这里需要说明的是，我用的是CenTOS5.x，执行以上操作以后，问题还没有解决，原因在于我的VIM还差一个软件包，看样子很像是高亮的主程序包。 于是请继续执行以下命令： [root@localhost ~]# rpm -qa &#124; grep vim vim-minimal-7.0.109-3.el5.3 vim-common-7.0.109-3.el5.3 vim-X11-7.0.109-3.el5.3 [...]]]></description>
		<wfw:commentRss>http://www.4wei.cn/archives/1000335/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

