<?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://imcat.in/tag/linux/feed/" rel="self" type="application/rss+xml" /><link>http://imcat.in</link> <description>人的头脑太复杂,时间过得久,有时候连自己也被自己骗了,记下来才是最真实的……</description> <lastBuildDate>Mon, 23 Aug 2010 13:54:00 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>在Linux系统centos 上安装7-ZIP</title><link>http://imcat.in/linux-system-install-7-zip-centos/</link> <comments>http://imcat.in/linux-system-install-7-zip-centos/#comments</comments> <pubDate>Thu, 10 Jun 2010 12:22:29 +0000</pubDate> <dc:creator>Cat.</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[CentOS]]></category> <category><![CDATA[centos-install-7-ZIP]]></category><guid isPermaLink="false">http://imcat.in/?p=1297</guid> <description><![CDATA[刚刚才在centos上安装了RAR, 现在又要在centos上安装7-ZIP,真烦,还好安装步骤都简单: wget http://nchc.dl.sourceforge.net/sourceforge/p7zip/p7zip_4.65_src_all.tar.bz2 tar -xjvf p7zip_4.65_src_all.tar.bz2 cd p7zip_4.65 make make install 看见这些信息就是安装成功了 ./install.sh /usr/local/bin /usr/local/lib/p7zip /usr/local/man /usr/local/share/doc/p7zip - installing /usr/local/bin/7za - installing /usr/local/man/man1/7z.1 - installing /usr/local/man/man1/7za.1 - installing /usr/local/man/man1/7zr.1 - installing /usr/local/share/doc/p7zip/README - installing /usr/local/share/doc/p7zip/ChangeLog - installing HTML help in /usr/local/share/doc/p7zip/DOCS]]></description> <content:encoded><![CDATA[<p>刚刚才在<a href="../linux-system-install-rar-centos/" target="_blank">centos上安装了RAR</a>, 现在又要在centos上安装7-ZIP,真烦,还好安装步骤都简单:</p><div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">wget http://nchc.dl.sourceforge.net/sourceforge/p7zip/p7zip_4.65_src_all.tar.bz2<br /> tar -xjvf p7zip_4.65_src_all.tar.bz2<br /> cd p7zip_4.65<br /> make<br /> make install</div></div><p><span id="more-1297"></span></p><p>看见这些信息就是安装成功了<br /> ./install.sh /usr/local/bin /usr/local/lib/p7zip /usr/local/man  /usr/local/share/doc/p7zip<br /> - installing /usr/local/bin/7za<br /> - installing /usr/local/man/man1/7z.1<br /> - installing /usr/local/man/man1/7za.1<br /> - installing /usr/local/man/man1/7zr.1<br /> - installing /usr/local/share/doc/p7zip/README<br /> - installing /usr/local/share/doc/p7zip/ChangeLog<br /> - installing HTML help in /usr/local/share/doc/p7zip/DOCS</p> ]]></content:encoded> <wfw:commentRss>http://imcat.in/linux-system-install-7-zip-centos/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> <item><title>在Linux系统centos上安装RAR</title><link>http://imcat.in/linux-system-install-rar-centos/</link> <comments>http://imcat.in/linux-system-install-rar-centos/#comments</comments> <pubDate>Thu, 10 Jun 2010 08:33:10 +0000</pubDate> <dc:creator>Cat.</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[CentOS]]></category> <category><![CDATA[centos install RAR]]></category> <category><![CDATA[RAR]]></category><guid isPermaLink="false">http://imcat.in/?p=1296</guid> <description><![CDATA[由于最近弄了个计划,不得不使用RAR,所以要在centos上安装RAR,记录如下: wget http://www.rarsoft.com/rar/rarlinux-3.9.3.tar.gz tar -xvf rarlinux-3.9.3.tar.gz cd rar make 看见下面这些信息就是安装成功了 mkdir -p /usr/local/bin mkdir -p /usr/local/lib cp rar unrar /usr/local/bin cp rarfiles.lst /etc cp default.sfx /usr/local/lib 但是我在运行命令rar时,出现下面这个问题, rar: /lib/i686/nosegneg/libc.so.6: version `GLIBC_2.7' not found (required by rar) Google下,解决办法是 cp rar_static /usr/local/bin/rar 这样就OK了. BTW 注册RAR,可以将注册文件 key 复制到你的 /etc 目录即可就OK了]]></description> <content:encoded><![CDATA[<p>由于最近弄了个计划,不得不使用RAR,所以要在centos上安装RAR,记录如下:</p><div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">wget http://www.rarsoft.com/rar/rarlinux-3.9.3.tar.gz<br /> tar -xvf rarlinux-3.9.3.tar.gz<br /> cd rar<br /> make</div></div><p>看见下面这些信息就是安装成功了<br /> mkdir -p /usr/local/bin<br /> mkdir -p /usr/local/lib<br /> cp rar unrar /usr/local/bin<br /> cp rarfiles.lst /etc<br /> cp default.sfx /usr/local/lib<br /> <span id="more-1296"></span><br /> 但是我在运行命令rar时,出现下面这个问题,</p><div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rar: /lib/i686/nosegneg/libc.so.6: version `GLIBC_2.7' not found (required by rar)</div></div><p>Google下,解决办法是</p><div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cp rar_static /usr/local/bin/rar</div></div><p>这样就OK了.</p><p>BTW<br /> 注册RAR,可以将注册文件 key 复制到你的 /etc 目录即可就OK了</p> ]]></content:encoded> <wfw:commentRss>http://imcat.in/linux-system-install-rar-centos/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>让crontab不再发出告警邮件</title><link>http://imcat.in/let-crontab-not-to-issue-any-warning-messages/</link> <comments>http://imcat.in/let-crontab-not-to-issue-any-warning-messages/#comments</comments> <pubDate>Wed, 16 Dec 2009 13:40:23 +0000</pubDate> <dc:creator>Cat.</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[cron]]></category> <category><![CDATA[crontab]]></category><guid isPermaLink="false">http://imcat.in/%e8%ae%a9crontab%e4%b8%8d%e5%86%8d%e5%8f%91%e5%87%ba%e5%91%8a%e8%ad%a6%e9%82%ae%e4%bb%b6/</guid> <description><![CDATA[一直用自动备份mysql数据库并发送到Email , 但cron程序默认设置是,每执行一次命令就会给本地用户发送一次邮件，这个是很烦人的!!!!所以我要禁掉它，解决方法有如下一些： 1.将执行命令的信息重定向到 cron_command &#62;/dev/null 2&#62;&#38;1 2.将执行命令的信息重定向到 cron_command &#38;&#62;/dev/null 3.在crontab设置文件中指定发送到得邮件 MAILTO="" cron_command]]></description> <content:encoded><![CDATA[<p>一直用<a title="Permanent Link to 自动备份mysql数据库并发送到Email" rel="bookmark" href="http://imcat.in/backup-mysql-databases-automatically-sent-to-email/">自动备份mysql数据库并发送到Email</a> , 但cron程序默认设置是,每执行一次命令就会给本地用户发送一次邮件，这个是很烦人的!!!!所以我要禁掉它，解决方法有如下一些：</p><blockquote><p>1.将执行命令的信息重定向到<br /> cron_command &gt;/dev/null 2&gt;&amp;1</p><p>2.将执行命令的信息重定向到<br /> cron_command &amp;&gt;/dev/null</p><p>3.在crontab设置文件中指定发送到得邮件<br /> MAILTO=""<br /> cron_command</p></blockquote> ]]></content:encoded> <wfw:commentRss>http://imcat.in/let-crontab-not-to-issue-any-warning-messages/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Suhosin - 保护你的PHP</title><link>http://imcat.in/suhosin-protect-your-php/</link> <comments>http://imcat.in/suhosin-protect-your-php/#comments</comments> <pubDate>Fri, 11 Dec 2009 03:23:19 +0000</pubDate> <dc:creator>Cat.</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[debian]]></category> <category><![CDATA[php]]></category> <category><![CDATA[Suhosin]]></category><guid isPermaLink="false">http://imcat.in/suhosin-%e4%bf%9d%e6%8a%a4%e4%bd%a0%e7%9a%84php/</guid> <description><![CDATA[Suhosin 我是在无意中发现的, 上次在 debian 用自动安装PHP,安装完后发现被安装了 Hardened-PHP Project .Google下,原来这个东西叫 Suhosin ,朝鲜语,译音为 "保护神" . Suhosin的作用大概是: 保护服务器和已知或未知的缺陷,类似内存泄漏等等吧 解决php的“远程文件包含”带来的安全隐患,例如PHP禁止allow_url_fopen选项,但不能彻底禁止通过PHP的攻击,Suhosin就修补了这个缺憾. 可使用额外的配置来禁止一些php中可能带来安全隐患的功能 另外,Suhosin是兼容ZendOptimizer 的 我英语不好,如果你英语好的去官网看看:Suhosin .不废话了,说说安装方法吧 首先去下载PHP版本对应的Suhosin补丁:http://www.hardened-php.net/suhosin/download.html 我的是PHP 5.2.11 所以我下载的是 suhosin-patch-5.2.11 解压suhosin-patch-5.2.11: gzip -d ./suhosin-patch-5.2.11-0.9.7.patch.gz 进入php源代码目录打上补丁： gzip -cd php-5.2.11-fpm-0.5.13.diff.gz &#124; patch -d php-5.2.11 -p1 cd php-5.2.11 patch -p 1 -i ../suhosin-patch-5.2.11-0.9.7.patch 因为我要安装phpfpm,所以将补丁一起打上.. 接着重建php的configure脚本 ./buildconf --force 然后编译安装 ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config [...]]]></description> <content:encoded><![CDATA[<p>Suhosin 我是在无意中发现的, 上次在 <a href="http://imcat.in/debian-install-nginx-php-spawn-fcgi-mysql/">debian</a> 用自动安装PHP,安装完后发现被安装了 <a href="http://www.hardened-php.net/">Hardened-PHP Project</a> .Google下,原来这个东西叫 Suhosin ,朝鲜语,译音为 "保护神" .</p><p>Suhosin的作用大概是:</p><blockquote><p>保护服务器和已知或未知的缺陷,类似内存泄漏等等吧<br /> 解决php的“远程文件包含”带来的安全隐患,例如PHP禁止allow_url_fopen选项,但不能彻底禁止通过PHP的攻击,Suhosin就修补了这个缺憾.<br /> 可使用额外的配置来禁止一些php中可能带来安全隐患的功能<br /> 另外,Suhosin是兼容ZendOptimizer 的</p></blockquote><p>我英语不好,如果你英语好的去官网看看:<a href="http://www.hardened-php.net/suhosin.127.html">Suhosin</a> .不废话了,说说安装方法吧</p><p><span id="more-1052"></span></p><p>首先去下载PHP版本对应的Suhosin补丁:http://www.hardened-php.net/suhosin/download.html</p><p>我的是PHP 5.2.11 所以我下载的是 suhosin-patch-5.2.11</p><p>解压suhosin-patch-5.2.11:</p><blockquote><p>gzip -d ./suhosin-patch-5.2.11-0.9.7.patch.gz</p></blockquote><p>进入php源代码目录打上补丁：</p><blockquote><p> gzip -cd php-5.2.11-fpm-0.5.13.diff.gz | patch -d php-5.2.11 -p1<br /> cd php-5.2.11<br /> patch -p 1 -i ../suhosin-patch-5.2.11-0.9.7.patch</p></blockquote><p>因为我要安装phpfpm,所以将补丁一起打上..</p><p>接着重建php的configure脚本</p><blockquote><p>./buildconf --force</p></blockquote><p>然后编译安装</p><blockquote><p>./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-ftp --enable-suhosin<br /> make ZEND_EXTRA_LIBS='-liconv'<br /> make install</p></blockquote><p>等php编译完成以后，重新php进程或者重启服务器,如果你看到下面这个图，那么恭喜你，守护神已经正常工作了：<br /> <a href="http://imcat.in/wp-content/uploads/2009/12/suhosin.jpg"><img class="alignnone size-full wp-image-1051" title="suhosin" src="http://imcat.in/wp-content/uploads/2009/12/suhosin.jpg" alt="suhosin Suhosin   保护你的PHP" width="422" height="33" /></a></p><p>对于已经编译了的PHP程序,只需要重新编译一次就OK:</p><blockquote><p>./configure --enable-suhosin --with-what-you-want<br /> make ZEND_EXTRA_LIBS='-liconv'<br /> make install</p></blockquote><p><span style="color: #ff0000;">对了,转载的请注明个链接,我发现我一篇<a title="安装apc为php加速" href="../apc-for-php-installed-to-speed-up/">安装apc为php加速</a>被人转载了N次,没加链接的,虽然我不介意.</span></p> ]]></content:encoded> <wfw:commentRss>http://imcat.in/suhosin-protect-your-php/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> <item><title>vsFTPD 快速安装配置</title><link>http://imcat.in/vsftpd-quick-installation-and-configuration/</link> <comments>http://imcat.in/vsftpd-quick-installation-and-configuration/#comments</comments> <pubDate>Wed, 02 Dec 2009 07:06:34 +0000</pubDate> <dc:creator>Cat.</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Vsftpd]]></category><guid isPermaLink="false">http://imcat.in/?p=1049</guid> <description><![CDATA[安装： CentOS: yum install vsftpd Debian: apt-get install vsftpd 配置： vi /etc/vsftpd.conf 禁止匿名用户登录： anonymous_enable=NO 允许系统用户登录： local_enable=YES 开启写权限： write_enable=YES 设置掩码： local_umask=022 如果觉得默认的空闲时间太短，可以设置的久一点： idle_session_timeout=3600 data_connection_timeout=3600 把 ftp 用户限制在自己的主目录： chroot_local_user=YES 未指定用户 shell 会导致 "530 Login incorrect" 错误： vi /etc/passwd www:x:33:33:www:/home:/bin/false 把 shell 改为 /bin/sh]]></description> <content:encoded><![CDATA[<p>安装：<br /> CentOS:<br /> yum install vsftpd</p><p>Debian:<br /> apt-get install vsftpd</p><p>配置：<br /> vi /etc/vsftpd.conf</p><p>禁止匿名用户登录：<br /> anonymous_enable=NO</p><p>允许系统用户登录：<br /> local_enable=YES</p><p>开启写权限：<br /> write_enable=YES</p><p>设置掩码：<br /> local_umask=022</p><p><span id="more-1049"></span></p><p>如果觉得默认的空闲时间太短，可以设置的久一点：<br /> idle_session_timeout=3600<br /> data_connection_timeout=3600</p><p>把 ftp 用户限制在自己的主目录：<br /> chroot_local_user=YES</p><p>未指定用户 shell 会导致 "530 Login incorrect" 错误：<br /> vi /etc/passwd<br /> www:x:33:33:www:/home:/bin/false<br /> 把 shell 改为 /bin/sh</p> ]]></content:encoded> <wfw:commentRss>http://imcat.in/vsftpd-quick-installation-and-configuration/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Linux下Memcache的安装方法</title><link>http://imcat.in/memcache-installation-method-under-linux/</link> <comments>http://imcat.in/memcache-installation-method-under-linux/#comments</comments> <pubDate>Sat, 26 Sep 2009 10:57:07 +0000</pubDate> <dc:creator>Cat.</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Memcache]]></category><guid isPermaLink="false">http://imcat.in/linux%e4%b8%8bmemcache%e7%9a%84%e5%ae%89%e8%a3%85%e6%96%b9%e6%b3%95/</guid> <description><![CDATA[最近都在研究缓存的问题,先是APC,显示Memcache,目的还是要将WordPress的速度提起来. Memcache是danga.com的一个项目，最早是为 LiveJournal 服务的，目前全世界不少人使用这个缓存项目来构建自己大负载的网站，来分担数据库的压力。 它可以应对任意多个连接，使用非阻塞的网络IO。由于它的工作机制是在内存中开辟一块空间，然后建立一个HashTable，Memcached自管理这些HashTable。 Memcache官方网站：http://www.danga.com/memcached 首先去官方下载最新的版本,现在最新的是memcached-1.4.1 ,然后就编译安装了. 另外,Memcache用到了libevent这个库用于Socket的处理,所以还需要安装libevent，libevent的最新稳定版本是libevent-1.4.12 . 1.先进这个两个文件下载回来,放到临时目录下 cd /usr/local/src wget http://memcached.googlecode.com/files/memcached-1.4.1.tar.gz wget http://www.monkey.org/~provos/libevent-1.4.12-stable.tar.gz 2.先安装libevent： tar zxvf libevent-1.4.12-stable.tar.gz cd libevent-1.4.12-stable ./configure –prefix=/usr make make install 3.安装memcached，安装时还要指定libevent的安装位置： tar zxvf memcached-1.4.1.tar.gz cd memcached-1.4.1 ./configure –with-libevent=/usr make make install 4.然后就可以启动memcached的守护进程了： /usr/local/bin/memcached -d -m 10 -u root -l 127.0.0.10 -p 12000 -c 256 -P /tmp/memcached.pid -d选项是启动一个守护进程， [...]]]></description> <content:encoded><![CDATA[<p>最近都在研究缓存的问题,先是APC,显示Memcache,目的还是要将WordPress的速度提起来.</p><blockquote><p> Memcache是danga.com的一个项目，最早是为 LiveJournal 服务的，目前全世界不少人使用这个缓存项目来构建自己大负载的网站，来分担数据库的压力。<br /> 它可以应对任意多个连接，使用非阻塞的网络IO。由于它的工作机制是在内存中开辟一块空间，然后建立一个HashTable，Memcached自管理这些HashTable。<br /> Memcache官方网站：http://www.danga.com/memcached</p></blockquote><p>首先去官方下载最新的版本,现在最新的是memcached-1.4.1 ,然后就编译安装了.</p><p>另外,Memcache用到了libevent这个库用于Socket的处理,所以还需要安装libevent，libevent的最新稳定版本是libevent-1.4.12 .<br /> <span id="more-1044"></span><br /> 1.先进这个两个文件下载回来,放到临时目录下</p><div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd /usr/local/src<br /> wget http://memcached.googlecode.com/files/memcached-1.4.1.tar.gz<br /> wget http://www.monkey.org/~provos/libevent-1.4.12-stable.tar.gz</div></div><p></p><p>2.先安装libevent：</p><div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">tar zxvf libevent-1.4.12-stable.tar.gz<br /> cd libevent-1.4.12-stable<br /> ./configure –prefix=/usr<br /> make<br /> make install</div></div><p>3.安装memcached，安装时还要指定libevent的安装位置：</p><div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">tar zxvf memcached-1.4.1.tar.gz<br /> cd memcached-1.4.1<br /> ./configure –with-libevent=/usr<br /> make<br /> make install</div></div><p>4.然后就可以启动memcached的守护进程了：</p><div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/usr/local/bin/memcached -d -m 10 -u root -l 127.0.0.10 -p 12000 -c 256 -P /tmp/memcached.pid<br /> <br /> -d选项是启动一个守护进程，<br /> <br /> -m是分配给Memcache使用的内存数量，单位是MB，我这里是10MB，<br /> <br /> -u是运行Memcache的用户，我这里是root，<br /> <br /> -l是监听的服务器IP地址，如果有多个地址的话，我这里指定了服务器的IP地址192.168.0.200，<br /> <br /> -p是设置Memcache监听的端口，我这里设置了12000，最好是1024以上的端口，<br /> <br /> -c选项是最大运行的并发连接数，默认是1024，我这里设置了256，按照你服务器的负载量来设定，<br /> <br /> -P是设置保存Memcache的pid文件，我这里是保存在 /tmp/memcached.pid，<br /> <br /> 如果要结束Memcache进程，执行：</div></div><p>kill `cat /tmp/memcached.pid`</p><div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;strong&gt;下面就是安装Memcache的PHP扩展&lt;/strong&gt;<br /> <br /> 1.在http://pecl.php.net/package/memcache 选择相应想要下载的memcache版本。<br /> <br /> 2.安装PHP的memcache扩展</div></div><p>wget http://pecl.php.net/get/memcache-2.2.5.tgz<br /> tar vxzf memcache-2.2.5.tgz<br /> cd memcache-2.2.5/<br /> /usr/local/php/bin/phpize<br /> ./configure --with-php-config=/usr/local/php/bin/php-config<br /> make<br /> make install</p><p>3.上述安装完后会有类似这样的提示：</p><p>Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-2006xxxx/</p><p>4.把php.ini中的extension_dir = “./”修改为</p><p>extension_dir = “/usr/local/php/lib/php/extensions/no-debug-non-zts-2006xxxx/”</p><p>5.添加一行来载入memcache扩展：extension=memcache.so</p><p>最后重启你的phpfastcgi进程或者apache, Memcache就安装成功了.</p><p>PS.下次有空说说WordPress 怎么应用Memcache</p> ]]></content:encoded> <wfw:commentRss>http://imcat.in/memcache-installation-method-under-linux/feed/</wfw:commentRss> <slash:comments>15</slash:comments> </item> <item><title>安装apc为php加速</title><link>http://imcat.in/apc-for-php-installed-to-speed-up/</link> <comments>http://imcat.in/apc-for-php-installed-to-speed-up/#comments</comments> <pubDate>Mon, 20 Jul 2009 22:30:20 +0000</pubDate> <dc:creator>Cat.</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[APC]]></category> <category><![CDATA[install-apc]]></category> <category><![CDATA[php]]></category><guid isPermaLink="false">http://imcat.in/%e5%ae%89%e8%a3%85apc%e4%b8%baphp%e5%8a%a0%e9%80%9f/</guid> <description><![CDATA[Alternative PHP Cache（APC）是 PHP 的一个免费公开的优化代码缓存。它用来提供免费，公开并且强健的架构来缓存和优化 PHP 的中间代码。 主要是加速PHP.. WordPress是一个占用内存的大户,而且执行效率比较低.. 我安装了APC后,VPS的整体内存降了30M左右吧.. 下面是安装方法: wget http://pecl.php.net/get/APC-3.1.2.tgz tar zxvf APC-3.1.2.tgz cd APC-3.1.2/ /usr/local/php/bin/phpize ./configure --enable-apc --enable-apc-mmap --with-php-config=/usr/local/php/bin/php-config make make install php.ini 查找extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/" 下面添加extension = "apc.so" 配置php.ini 末尾加入 apc.enabled = 1 apc.cache_by_default = on apc.shm_segments = 1 apc.shm_size = 32 apc.ttl = 600 apc.user_ttl = 600 apc.num_files_hint = [...]]]></description> <content:encoded><![CDATA[<p>Alternative PHP Cache（APC）是 PHP 的一个免费公开的优化代码缓存。它用来提供免费，公开并且强健的架构来缓存和优化 PHP 的中间代码。<br /> 主要是加速PHP..<br /> WordPress是一个占用内存的大户,而且执行效率比较低..<br /> 我安装了APC后,VPS的整体内存降了30M左右吧..<br /> 下面是安装方法:</p><div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">wget http://pecl.php.net/get/APC-3.1.2.tgz<br /> tar zxvf APC-3.1.2.tgz<br /> cd APC-3.1.2/<br /> /usr/local/php/bin/phpize<br /> ./configure --enable-apc --enable-apc-mmap --with-php-config=/usr/local/php/bin/php-config<br /> make<br /> make install</div></div><p><span id="more-1027"></span><br /> php.ini<br /> 查找extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/"<br /> 下面添加extension = "apc.so"</p><p>配置php.ini 末尾加入<br /> apc.enabled = 1<br /> apc.cache_by_default = on<br /> apc.shm_segments = 1<br /> apc.shm_size = 32<br /> apc.ttl = 600<br /> apc.user_ttl = 600<br /> apc.num_files_hint = 0<br /> apc.write_lock = On</p><p>然后重启服务器就OK</p> ]]></content:encoded> <wfw:commentRss>http://imcat.in/apc-for-php-installed-to-speed-up/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> <item><title>Linux查看系统配置常用命令</title><link>http://imcat.in/view-the-system-configuration-commonly-used-linux-commands/</link> <comments>http://imcat.in/view-the-system-configuration-commonly-used-linux-commands/#comments</comments> <pubDate>Thu, 25 Jun 2009 19:17:11 +0000</pubDate> <dc:creator>Cat.</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[命令]]></category><guid isPermaLink="false">http://imcat.in/linux%e6%9f%a5%e7%9c%8b%e7%b3%bb%e7%bb%9f%e9%85%8d%e7%bd%ae%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4/</guid> <description><![CDATA[系统 # uname -a               # 查看内核/操作系统/CPU信息 # head -n 1 /etc/issue   # 查看操作系统版本 # cat /proc/cpuinfo      # 查看CPU信息 # hostname               # 查看计算机名 # lspci -tv              # 列出所有PCI设备 # lsusb -tv              # 列出所有USB设备 # lsmod                  # 列出加载的内核模块 # env                    # 查看环境变量 资源 # free -m                # 查看内存使用量和交换区使用量 # df -h                  # 查看各分区使用情况 # du -sh &#60;目录名&#62;        [...]]]></description> <content:encoded><![CDATA[<p>系统</p><p># uname -a               # 查看内核/操作系统/CPU信息<br /> # head -n 1 /etc/issue   # 查看操作系统版本<br /> # cat /proc/cpuinfo      # 查看CPU信息<br /> # hostname               # 查看计算机名<br /> # lspci -tv              # 列出所有PCI设备<br /> # lsusb -tv              # 列出所有USB设备<br /> # lsmod                  # 列出加载的内核模块<br /> # env                    # 查看环境变量</p><p>资源</p><p># free -m                # 查看内存使用量和交换区使用量<br /> # df -h                  # 查看各分区使用情况<br /> # du -sh &lt;目录名&gt;        # 查看指定目录的大小<br /> # grep MemTotal /proc/meminfo   # 查看内存总量<br /> # grep MemFree /proc/meminfo    # 查看空闲内存量<br /> # uptime                 # 查看系统运行时间、用户数、负载<br /> # cat /proc/loadavg      # 查看系统负载</p><p>磁盘和分区</p><p><span id="more-963"></span></p><p># mount | column -t      # 查看挂接的分区状态<br /> # fdisk -l               # 查看所有分区<br /> # swapon -s              # 查看所有交换分区<br /> # hdparm -i /dev/hda     # 查看磁盘参数(仅适用于IDE设备)<br /> # dmesg | grep IDE       # 查看启动时IDE设备检测状况</p><p>网络</p><p># ifconfig               # 查看所有网络接口的属性<br /> # iptables -L            # 查看防火墙设置<br /> # route -n               # 查看路由表<br /> # netstat -lntp          # 查看所有监听端口<br /> # netstat -antp          # 查看所有已经建立的连接<br /> # netstat -s             # 查看网络统计信息</p><p>进程</p><p># ps -ef                 # 查看所有进程<br /> # top                    # 实时显示进程状态</p><p>用户</p><p># w                      # 查看活动用户<br /> # id &lt;用户名&gt;            # 查看指定用户信息<br /> # last                   # 查看用户登录日志<br /> # cut -d: -f1 /etc/passwd   # 查看系统所有用户<br /> # cut -d: -f1 /etc/group    # 查看系统所有组<br /> # crontab -l             # 查看当前用户的计划任务</p><p>服务</p><p># chkconfig –list       # 列出所有系统服务<br /> # chkconfig –list | grep on    # 列出所有启动的系统服务</p><p>程序</p><p># rpm -qa                # 查看所有安装的软件包</p> ]]></content:encoded> <wfw:commentRss>http://imcat.in/view-the-system-configuration-commonly-used-linux-commands/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>解决Linux中出现Too many open files</title><link>http://imcat.in/linux-too-open-files/</link> <comments>http://imcat.in/linux-too-open-files/#comments</comments> <pubDate>Wed, 24 Jun 2009 21:29:05 +0000</pubDate> <dc:creator>Cat.</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Too many open files]]></category> <category><![CDATA[vps]]></category><guid isPermaLink="false">http://imcat.in/%e8%a7%a3%e5%86%b3linux%e4%b8%ad%e5%87%ba%e7%8e%b0too-open-files/</guid> <description><![CDATA[前几天查看VPS的php-cgi和nginx的日志都出现Too many open files这样的错误,原因是file-max默认值（1024）太小了,要解决这个问题，只要更改file-max的大小就可以. 用ulimit修改了一下： ulimit -n 10240 这样就可以将打开文件数从1024提高到了10240,但重启了VPS,就会恢复默认大小了..要永久的改变file-max值,可以root身份执行下列命令 # echo &#34;10240&#34; &#160;&#38;gt; /proc/sys/fs/file-max &#160;# 适用于2.2和2.4版内核 # echo &#34;10240&#34; &#38;gt; /proc/sys/fs/inode-max # 仅适用于2.2版内核 或将下列内容放入 /etc/sysctl.conf，做永久性的更改： fs.file-max = 10240 &#160; # 适用于 2.2 和 2.4 版内核 fs.inode-max = 10240 # 仅适用于 2.2 版内核 最正确的做法是在/etc/security/limits.conf里设置： * hard nofile 65535 * soft nofile 65535]]></description> <content:encoded><![CDATA[<p>前几天查看VPS的php-cgi和nginx的日志都出现Too many open files这样的错误,原因是file-max默认值（1024）太小了,要解决这个问题，只要更改file-max的大小就可以.</p><p>用ulimit修改了一下：</p><div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ulimit -n 10240</div></div><p>这样就可以将打开文件数从1024提高到了10240,但重启了VPS,就会恢复默认大小了..要永久的改变file-max值,可以root身份执行下列命令</p><div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># echo &quot;10240&quot; &nbsp;&amp;gt; /proc/sys/fs/file-max &nbsp;# 适用于2.2和2.4版内核<br /> # echo &quot;10240&quot; &amp;gt; /proc/sys/fs/inode-max # 仅适用于2.2版内核</div></div><p>或将下列内容放入 /etc/sysctl.conf，做永久性的更改：</p><div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">fs.file-max = 10240 &nbsp; # 适用于 2.2 和 2.4 版内核<br /> fs.inode-max = 10240 # 仅适用于 2.2 版内核</div></div><p><span style="color: #ff0000;">最正确的做法是在/etc/security/limits.conf里设置：</span></p><p><span style="font-family: 宋体;">* hard nofile 65535<br /> * soft nofile 65535</span></p> ]]></content:encoded> <wfw:commentRss>http://imcat.in/linux-too-open-files/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>最新Linux下的Nginx+MySQL+PHP+Memcache+Vsftpd一键安装包</title><link>http://imcat.in/the-latest-linux-under-nginx-mysql-php-memcache-vsftpd-one-click-installation-package/</link> <comments>http://imcat.in/the-latest-linux-under-nginx-mysql-php-memcache-vsftpd-one-click-installation-package/#comments</comments> <pubDate>Wed, 24 Jun 2009 08:07:28 +0000</pubDate> <dc:creator>Cat.</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[LNMP]]></category> <category><![CDATA[Memcache]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Nginx]]></category> <category><![CDATA[php]]></category> <category><![CDATA[Vsftpd]]></category><guid isPermaLink="false">http://imcat.in/%e6%9c%80%e6%96%b0linux%e4%b8%8b%e7%9a%84nginxmysqlphpmemcachevsftpd%e4%b8%80%e9%94%ae%e5%ae%89%e8%a3%85%e5%8c%85/</guid> <description><![CDATA[这个LANP安装包不是原创!是修改版! 我接触Linux也就一个多月而已,很多东西还是靠Google学来的!这个LANP安装包是我根据张宴和Licess的LNMP改写而成,而且经过我多次测试才发布的.测试环境为CentOS 4.0, CentOS 5.2, CentOS 5.3猫言猫语的VPS就是用这个安装包安装的.安装很简单,也就运行几个命令而已. 程序版本为: Nginx 0.7.60  PHP5.2.9  MySQL 5.1.35 1.首先登陆VPS,用SSH登陆. 2.安装LNMP,进入一个目录:cd /usr/local/src 然后就下载LNMP:wget http://imcat.in/LNMP.zip 解压缩 unzip LNMP.zip 有些VPS安装后没有unzip这个命令,那么运行 yum install unzip 进入该目录 cd LNMP 给脚本添加执行权限:chmod +x down.sh install.sh startup.sh 下载安装所需的源代码文件: ./down.sh 开始安装: ./install.sh 安装完后,请运行:passwd www 为www用户设置一个密码.这个用户和密码就是ftp的用户名和密码 修改您的MySQL的root密码 使用命令：mysqladmin -u root -p password mypasswd //mypasswd为自己的密码 如果提示没有mysqladmin命令.请运行:yum install mysql 这样你就可以上传你的网站了. 程序安装路径： MySQL : [...]]]></description> <content:encoded><![CDATA[<p><span style="color: #ff0000;">这个LANP安装包不是原创!是修改版!</span></p><p>我接触Linux也就一个多月而已,很多东西还是靠Google学来的!这个LANP安装包是我根据<a title="张宴的博客" href="http://blog.s135.com/" target="_blank">张宴</a>和<a title="Licess的博客" href="http://blog.licess.cn/lnmp/" target="_blank">Licess</a>的LNMP改写而成,而且经过我多次测试才发布的.测试环境为CentOS 4.0, CentOS 5.2, CentOS 5.3<a href="http://imcat.in/">猫言猫语</a>的VPS就是用这个安装包安装的.安装很简单,也就运行几个命令而已.</p><p>程序版本为: Nginx 0.7.60  PHP5.2.9  MySQL 5.1.35</p><p>1.首先登陆VPS,用SSH登陆.</p><p>2.安装LNMP,进入一个目录:cd /usr/local/src</p><p>然后就下载LNMP:wget http://imcat.in/LNMP.zip</p><p>解压缩 unzip LNMP.zip</p><p>有些VPS安装后没有unzip这个命令,那么运行 yum install unzip</p><p>进入该目录 cd LNMP</p><p>给脚本添加执行权限:chmod +x down.sh install.sh startup.sh</p><p>下载安装所需的源代码文件: ./down.sh</p><p>开始安装: ./install.sh</p><p>安装完后,请运行:passwd www</p><p>为www用户设置一个密码.这个用户和密码就是ftp的用户名和密码</p><p><span id="more-944"></span></p><p>修改您的MySQL的root密码<br /> 使用命令：mysqladmin -u root -p password mypasswd          //mypasswd为自己的密码<br /> 如果提示没有mysqladmin命令.请运行:yum install mysql</p><p>这样你就可以上传你的网站了.</p><p>程序安装路径：<br /> MySQL :   /usr/local/mysql<br /> PHP :     /usr/local/php<br /> Nginx :   /usr/local/nginx<br /> PHPMyAdmin /home/www/phpmyadmin<br /> Web目录    /home/www<br /> FTP根目录   /home/www</p><p>注意：MYSQL数据库用户名root密码root，登陆后进入mysql数据库，找到user表，删除除了有root密码外的所有用户。</p><p>另外:Linux系统要用32位的.64位占用的内存很大的.</p><blockquote><p><span style="color: #ff0000;">9月29日更新:更新Nginx 0.7.62  PHP5.2.10  MySQL 5.1.39 .删除APC缓存,因为和zend有冲突,改为用eaccelerator做PHP的缓存</p><p>7月21日更新:更新Nginx 0.7.61  PHP5.2.10  MySQL 5.1.35 添加APC缓存<br /> 用我这个安装包是无法安装Zend的,因为Zend和APC有冲突,如果要安装的话,就要在PHP.INI里面取消APC才可以<br /> </span></p><p>9月29日更新:<a href="../lnmp.zip" target="_blank">http://imcat.in/lnmp.zip</a></p><p>7月21日更新:<a href="../LNMP.zip" target="_blank">http://imcat.in/LNMP.zip</a></p></blockquote> ]]></content:encoded> <wfw:commentRss>http://imcat.in/the-latest-linux-under-nginx-mysql-php-memcache-vsftpd-one-click-installation-package/feed/</wfw:commentRss> <slash:comments>31</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using memcached
Page Caching using memcached
Database Caching 9/11 queries in 0.004 seconds using memcached
Object Caching 1474/1483 objects using memcached

Served from: imcat.in @ 2010-09-08 12:52:33 -->