<?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://cocobear.info/blog/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://cocobear.info/blog</link>
	<description>K.I.S.S</description>
	<lastBuildDate>Tue, 17 Aug 2010 10:26:58 +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>局域网邮件服务器配置</title>
		<link>http://cocobear.info/blog/2009/03/16/use-sendmail-and-dovecot-in-company/</link>
		<comments>http://cocobear.info/blog/2009/03/16/use-sendmail-and-dovecot-in-company/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 05:02:56 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[sendmail]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=566</guid>
		<description><![CDATA[首先安装必要的软件：sendmail,dovecot sendmail只支持SMTP发信，dovecot可以支持POP3，IMAP等。 把自己的机器名改为一个你想使用的域名，例如coco.com（vi /etc/sysconfig/network）。配置sendmail，修改以/etc/mail/sendmail.mc下一行： -O DaemonPortOptions=Port=smtp,Addr=127.0.0.1 , Name=MTA +O DaemonPortOptions=Port=smtp,Addr=192.168.1.112 , Name=MTA 同时修改/etc/mail/access,添加： Connect:192.168.1 RELAY 编辑/etc/mail/local-host-names文件，添加你想在内部使用的一个域名，如： coco.com 这样局域网内的用户就可以使用你的SMTP了，别人在发邮件时在SMTP服务器地址中填写你的IP地址，或者域名(需要改更hosts中coco.com的指向)。帐户就直接使用Linux系统的用户，因为在一个公司使用，所以安全问题就不需要考虑了。 安装好后先测试sendmail，可以使用 mail -s ‘your subject&#8217; somebody@coco.com命令来发邮件。也可以使用claws-mail等客户端来发邮件。 dovecot安装好后也很简单，启动后就可以使用POP3收邮件了。]]></description>
			<content:encoded><![CDATA[<p>首先安装必要的软件：<a href="http://cocobear.info/blog/tag/sendmail/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sendmail">sendmail</a>,<a href="http://cocobear.info/blog/tag/dovecot/" class="st_tag internal_tag" rel="tag" title="Posts tagged with dovecot">dovecot</a><br />
<a href="http://cocobear.info/blog/tag/sendmail/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sendmail">sendmail</a>只支持SMTP发信，<a href="http://cocobear.info/blog/tag/dovecot/" class="st_tag internal_tag" rel="tag" title="Posts tagged with dovecot">dovecot</a>可以支持POP3，IMAP等。</p>
<p>把自己的机器名改为一个你想使用的域名，例如coco.com（vi /etc/sysconfig/network）。配置<a href="http://cocobear.info/blog/tag/sendmail/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sendmail">sendmail</a>，修改以/etc/mail/<a href="http://cocobear.info/blog/tag/sendmail/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sendmail">sendmail</a>.mc下一行：</p>
<blockquote><p>-O DaemonPortOptions=Port=smtp,Addr=127.0.0.1 , Name=MTA<br />
+O DaemonPortOptions=Port=smtp,Addr=192.168.1.112 , Name=MTA</p></blockquote>
<p>同时修改/etc/mail/access,添加：<br />
Connect:192.168.1                       RELAY</p>
<p>编辑/etc/mail/local-host-names文件，添加你想在内部使用的一个域名，如：<br />
coco.com</p>
<p>这样局域网内的用户就可以使用你的SMTP了，别人在发邮件时在SMTP服务器地址中填写你的IP地址，或者域名(需要改更hosts中coco.com的指向)。帐户就直接使用<a href="http://cocobear.info/blog/tag/linux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Linux">Linux</a>系统的用户，因为在一个公司使用，所以安全问题就不需要考虑了。</p>
<p>安装好后先测试<a href="http://cocobear.info/blog/tag/sendmail/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sendmail">sendmail</a>，可以使用 mail -s ‘your subject&#8217; somebody@coco.com命令来发邮件。也可以使用claws-mail等客户端来发邮件。</p>
<p><a href="http://cocobear.info/blog/tag/dovecot/" class="st_tag internal_tag" rel="tag" title="Posts tagged with dovecot">dovecot</a>安装好后也很简单，启动后就可以使用POP3收邮件了。</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2009/03/16/use-sendmail-and-dovecot-in-company/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>折腾Archlinux</title>
		<link>http://cocobear.info/blog/2009/03/11/play-with-archlinux/</link>
		<comments>http://cocobear.info/blog/2009/03/11/play-with-archlinux/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 07:37:14 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[archlinux]]></category>
		<category><![CDATA[xorg]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=567</guid>
		<description><![CDATA[公司新拿来几台电脑，头让俺换一台用用，趁这个机会就想装个Archlinux试试，没想到折腾两天了，还是用不起来。 整个硬盘用ghost对拷了一下，Windows分区拷过去都正常，以前用的主Linux分区无法使用，以前这个分区就有问题，使用正常，但从Windows下无法访问，而且引导文件也放在另一个ext3分区上。 用光盘安装的Archlinux，300多M，base很快就安装好了，pacman也用的挺顺手，不过记得要加几个国内速度快一点的源，然后使用rankmirrors来重排一下源的顺序。不过在安装X的时候出问题了（我主板集成HD3200显卡），折腾了好久，手动改了几次xorg.conf文件，最后显卡驱动用xf86-video-ati，在xorg.conf文件里加上了1680&#215;1050这个分辩率。好不容易(openbox+fbpanel+rox)启动后分辩率正常了，也可以自由切换到其它终端，但是安装ibus的时候又出问题了，使用的是yaourt，实在是折腾累了，浏览器里的字体也很不好看，uxvrt不好用，不能粘贴，不能用标签，字体怪怪的也不知道怎么改，问题一大堆啊，有点像刚用Fedora的时候，要真正能使用系统得折腾好久，但现在实在是懒得折腾了，看着人家漂亮的Archlinux桌面，只能叹息了。 俺自己的那台电脑更是郁闷，是Intel GMA 3100的显卡，本来说Linux应该支持挺好的，但在Archlinux里安装xf86-video-intel驱动后，X启动报错，如果使用vesa驱动能进入X，但是切换到终端再切换回X后就花屏了，昨天折腾了一晚上也不搞定，看来只能回到Fedora了。 不过话说回来，Archlinux速度确实挺快的，连启动X估计就10秒多点，Archlinux+openbox这样轻量级的组合确实不错，如果能在细节上完美些的话还真不想换回Fedora了。 切换到Windows下写的这篇文章，一会儿再整整Archlinux，不过俺自己那台机器要能让X在Archlinux上跑起来估计悬！]]></description>
			<content:encoded><![CDATA[<p>公司新拿来几台电脑，头让俺换一台用用，趁这个机会就想装个<a href="http://cocobear.info/blog/tag/archlinux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with archlinux">Archlinux</a>试试，没想到折腾两天了，还是用不起来。</p>
<p>整个硬盘用ghost对拷了一下，Windows分区拷过去都正常，以前用的主<a href="http://cocobear.info/blog/tag/linux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Linux">Linux</a>分区无法使用，以前这个分区就有问题，使用正常，但从Windows下无法访问，而且引导文件也放在另一个ext3分区上。</p>
<p>用光盘安装的<a href="http://cocobear.info/blog/tag/archlinux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with archlinux">Archlinux</a>，300多M，base很快就安装好了，pacman也用的挺顺手，不过记得要加几个国内速度快一点的源，然后使用rankmirrors来重排一下源的顺序。不过在安装X的时候出问题了（我主板集成HD3200显卡），折腾了好久，手动改了几次<a href="http://cocobear.info/blog/tag/xorg/" class="st_tag internal_tag" rel="tag" title="Posts tagged with xorg">xorg</a>.conf文件，最后显卡驱动用xf86-video-ati，在<a href="http://cocobear.info/blog/tag/xorg/" class="st_tag internal_tag" rel="tag" title="Posts tagged with xorg">xorg</a>.conf文件里加上了1680&#215;1050这个分辩率。好不容易(openbox+fbpanel+rox)启动后分辩率正常了，也可以自由切换到其它终端，但是安装ibus的时候又出问题了，使用的是yaourt，实在是折腾累了，浏览器里的字体也很不好看，uxvrt不好用，不能粘贴，不能用标签，字体怪怪的也不知道怎么改，问题一大堆啊，有点像刚用Fedora的时候，要真正能使用系统得折腾好久，但现在实在是懒得折腾了，看着<a href="http://picasaweb.google.com/kekenba/Openbox#5263326767131605058">人家</a>漂亮的<a href="http://cocobear.info/blog/tag/archlinux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with archlinux">Archlinux</a>桌面，只能叹息了。</p>
<p>俺自己的那台电脑更是郁闷，是Intel GMA 3100的显卡，本来说<a href="http://cocobear.info/blog/tag/linux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Linux">Linux</a>应该支持挺好的，但在<a href="http://cocobear.info/blog/tag/archlinux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with archlinux">Archlinux</a>里安装xf86-video-intel驱动后，X启动报错，如果使用vesa驱动能进入X，但是切换到终端再切换回X后就花屏了，昨天折腾了一晚上也不搞定，看来只能回到Fedora了。</p>
<p>不过话说回来，<a href="http://cocobear.info/blog/tag/archlinux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with archlinux">Archlinux</a>速度确实挺快的，连启动X估计就10秒多点，<a href="http://cocobear.info/blog/tag/archlinux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with archlinux">Archlinux</a>+openbox这样轻量级的组合确实不错，如果能在细节上完美些的话还真不想换回Fedora了。</p>
<p>切换到Windows下写的这篇文章，一会儿再整整<a href="http://cocobear.info/blog/tag/archlinux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with archlinux">Archlinux</a>，不过俺自己那台机器要能让X在<a href="http://cocobear.info/blog/tag/archlinux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with archlinux">Archlinux</a>上跑起来估计悬！</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2009/03/11/play-with-archlinux/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>高效的使用bash</title>
		<link>http://cocobear.info/blog/2009/02/06/working-more-productively-with-bash/</link>
		<comments>http://cocobear.info/blog/2009/02/06/working-more-productively-with-bash/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 08:19:35 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash，shell]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=504</guid>
		<description><![CDATA[以前在用bash的时候觉得TAB补齐如果能做得更智能一些就好了，比如我使用evince ，bash就会自动列出目录下所有的pdf文件，我还想着自己动修改bash来实现，不过偶然发现了bash-completion这个东西，它不仅可以实现上面的功能，而且还可以补全sudo，补全命令的参数，下面这个图可以很好的代表bash-completion http://www.caliban.org/bash/]]></description>
			<content:encoded><![CDATA[<p>以前在用bash的时候觉得TAB补齐如果能做得更智能一些就好了，比如我使用evince ，bash就会自动列出目录下所有的pdf文件，我还想着自己动修改bash来实现，不过偶然发现了<a href="http://www.caliban.org/bash/">bash-completion</a>这个东西，它不仅可以实现上面的功能，而且还可以补全sudo，补全命令的参数，下面这个图可以很好的代表bash-completion<br />
<img src="http://c.fsdn.com/fm/screenshots/19041.jpg?1010030819" alt="bash-completion" /></p>
<p>http://www.caliban.org/bash/</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2009/02/06/working-more-productively-with-bash/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Oracle你就不能简单点吗</title>
		<link>http://cocobear.info/blog/2008/12/12/could-you-be-simple-oracle/</link>
		<comments>http://cocobear.info/blog/2008/12/12/could-you-be-simple-oracle/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 09:17:33 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=418</guid>
		<description><![CDATA[今天折腾了一天的Oracle，在Suse上安装Oracle，太麻烦了，虽然有详细的文档，但是问题还是有很多，就连创建个数据库都一都问题，管理数据库还分一堆用户，再想想MySQL，真是方便，一篇文章就可以完全把MySQL的基本东西讲明白。 再看看Oracle里面一堆乱七八糟的东西，真不明白有必要搞这么复杂吗，就不能简单点吗？ &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;split&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; 还想着这两天换系统，试试ArchLinux，看来暂时是没什么时间，又到周末了，回去还是不能上网，房子里待着也挺冷&#8230;&#8230; 要做的事情太多了，都觉得无从下手了。 这几天觉得有点累，好想休息下，运动一下，都好久没有运动了，哎，就这样慢慢老了，失去了活力。 天黑了，回去吃饭了。]]></description>
			<content:encoded><![CDATA[<p>今天折腾了一天的Oracle，在Suse上安装Oracle，太麻烦了，虽然有详细的文档，但是问题还是有很多，就连创建个数据库都一都问题，管理数据库还分一堆用户，再想想<a href="http://cocobear.info/blog/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MySQL">MySQL</a>，真是方便，一篇文章就可以完全把<a href="http://cocobear.info/blog/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MySQL">MySQL</a>的基本东西讲明白。<br />
再看看Oracle里面一堆乱七八糟的东西，真不明白有必要搞这么复杂吗，就不能简单点吗？</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;split&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>还想着这两天换系统，试试<a href="http://cocobear.info/blog/tag/archlinux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with archlinux">ArchLinux</a>，看来暂时是没什么时间，又到周末了，回去还是不能上网，房子里待着也挺冷&#8230;&#8230;<br />
要做的事情太多了，都觉得无从下手了。<br />
这几天觉得有点累，好想休息下，运动一下，都好久没有运动了，哎，就这样慢慢老了，失去了活力。<br />
天黑了，回去吃饭了。</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2008/12/12/could-you-be-simple-oracle/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>工作上的一些事</title>
		<link>http://cocobear.info/blog/2008/12/11/something-about-work/</link>
		<comments>http://cocobear.info/blog/2008/12/11/something-about-work/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 07:05:04 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=412</guid>
		<description><![CDATA[SCO Unix,Informix可能是银行以前经常会用到的，不过这几年随着Unix的落末，Linux逐渐进入了银行，比如工行现在就用到了Suse Linux（还有Solaris），我们公司也打算从Unix迁移到Linux平台，软件方面可能不会有太大的问题，主要是标准C的东西，目前要做数据库的迁移。以前公司用的数据库也比较多，有Informix,postgresql,oracle,这几天要把以前用到Informix的程序迁移到Oracle上面（目前银行在PC机上大多都要求使用Oracle）。因为以前用Informix的时候用到了CDR，作为双机热备来使用（两台机器同时提供服务，连续备份对方数据），这几天得折腾Oracle的这个东西。 在小公司接触到的东西比较多，也比较全面，例如目前公司的新业务从前台到后台，从驱动到数据库都会接触到；做的东西也多，有可能修改Web（PHP），做个HA（high availability），写个驱动（PCI），做个数据库迁移（Informix,Oracle），写个PC/SC读卡器的测试工具&#8230;&#8230; （都是在Linux下） 不过学得东西杂了也很难精通，也是个麻烦事。]]></description>
			<content:encoded><![CDATA[<p>SCO Unix,Informix可能是银行以前经常会用到的，不过这几年随着Unix的落末，<a href="http://cocobear.info/blog/tag/linux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Linux">Linux</a>逐渐进入了银行，比如工行现在就用到了Suse <a href="http://cocobear.info/blog/tag/linux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Linux">Linux</a>（还有Solaris），我们公司也打算从Unix迁移到<a href="http://cocobear.info/blog/tag/linux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Linux">Linux</a>平台，软件方面可能不会有太大的问题，主要是标准C的东西，目前要做数据库的迁移。以前公司用的数据库也比较多，有Informix,postgresql,oracle,这几天要把以前用到Informix的程序迁移到Oracle上面（目前银行在PC机上大多都要求使用Oracle）。因为以前用Informix的时候用到了CDR，作为双机热备来使用（两台机器同时提供服务，连续备份对方数据），这几天得折腾Oracle的这个东西。</p>
<p>在小公司接触到的东西比较多，也比较全面，例如目前公司的新业务从前台到后台，从驱动到数据库都会接触到；做的东西也多，有可能修改Web（PHP），做个HA（high availability），写个驱动（PCI），做个数据库迁移（Informix,Oracle），写个PC/SC读卡器的测试工具&#8230;&#8230;<br />
                                                       （<strong>都是在<a href="http://cocobear.info/blog/tag/linux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Linux">Linux</a>下</strong>）</p>
<p>不过学得东西杂了也很难精通，也是个麻烦事。</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2008/12/11/something-about-work/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>想换一个Linux发行版</title>
		<link>http://cocobear.info/blog/2008/12/04/want-a-new-linux-distribute/</link>
		<comments>http://cocobear.info/blog/2008/12/04/want-a-new-linux-distribute/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 02:01:38 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Fedora]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=406</guid>
		<description><![CDATA[用了Fedora也有不少时间了，总的感觉还不错，但是我想要一个可以掌握在手里的系统，比较干净一些，不想有一些我从来用不到的东西，比如Java，我很讨厌系统里面有这些个东西，Fedora安装下来有不少没用的东西，即使使用很小的安装也得占大概2G的空间。 我希望的这个发型版： 比较干净（没用的东西尽量少，需要的时候才安装） 定制性比较强，安装软件比较容易（但也不可以因为我想听个歌而让我折腾半天的时间去装个播放器，也不可以让我花大量时间去折腾显卡配置等系统问题，我需要专注做事情，而不是折腾系统，系统只是个工具） 很方便使用X，我大部分时间还是需要X的； 比较适合做开发，比如Python，SDL，OpenGL，wxPython&#8230;&#8230; 速度比较快，Fedora开机的时候会加载很多没用的东西，当然这些可以自己手动去掉，俺还是不喜欢； 升级不能太频繁，Fedora从5开始用，现在都10了，才两年多的时间，太快了，虽然系统确实一直在进步，或者至少可以平滑的升级，Fedora在这方面做的不好； 稳定性比较好，说实话用这么长时间Fedora，还是有不少时间莫名的死掉； 暂时就想到这么多，最近把大部份的Linux发型版介绍都看了看，目前觉得以下几个比较合适的我需要： ArchLinux Slackware Gentoo 现在还拿不定主意，路过的给个选择，或者还有别的发型版更合适我？]]></description>
			<content:encoded><![CDATA[<p>用了Fedora也有不少时间了，总的感觉还不错，但是我想要一个可以掌握在手里的系统，比较干净一些，不想有一些我从来用不到的东西，比如Java，我很讨厌系统里面有这些个东西，Fedora安装下来有不少没用的东西，即使使用很小的安装也得占大概2G的空间。</p>
<p>我希望的这个发型版：</p>
<li>比较干净（没用的东西尽量少，需要的时候才安装）</li>
<li>定制性比较强，安装软件比较容易（但也不可以因为我想听个歌而让我折腾半天的时间去装个播放器，也不可以让我花大量时间去折腾显卡配置等系统问题，我需要专注做事情，而不是折腾系统，系统只是个工具）</li>
<li>很方便使用X，我大部分时间还是需要X的；</li>
<li>比较适合做开发，比如Python，SDL，OpenGL，wxPython&#8230;&#8230;</li>
<li>速度比较快，Fedora开机的时候会加载很多没用的东西，当然这些可以自己手动去掉，俺还是不喜欢；</li>
<li>升级不能太频繁，Fedora从5开始用，现在都10了，才两年多的时间，太快了，虽然系统确实一直在进步，或者至少可以平滑的升级，Fedora在这方面做的不好；</li>
<li>稳定性比较好，说实话用这么长时间Fedora，还是有不少时间莫名的死掉；</li>
<p>暂时就想到这么多，最近把大部份的<a href="http://cocobear.info/blog/tag/linux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Linux">Linux</a>发型版介绍都看了看，目前觉得以下几个比较合适的我需要：</p>
<p><a href="http://cocobear.info/blog/tag/archlinux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with archlinux">ArchLinux</a><br />
Slackware<br />
Gentoo</p>
<p>现在还拿不定主意，路过的给个选择，或者还有别的发型版更合适我？</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2008/12/04/want-a-new-linux-distribute/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>代码高亮插件&#8211;使用黑色背景</title>
		<link>http://cocobear.info/blog/2008/11/21/ig_syntax_hilite-use-black-background/</link>
		<comments>http://cocobear.info/blog/2008/11/21/ig_syntax_hilite-use-black-background/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 09:11:56 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ig_syntax_hilite]]></category>
		<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=398</guid>
		<description><![CDATA[ig_syntax_hilite这个代码高亮的插件默认使用的是白色背景，所以小林子同学说看不清楚代码，俺就试着把ig_syntax_hilite插件所有颜色代码全部反转了一下，例如： #ffffff黑色转换为#000000 ig_syntax_hilite使用的是geshe，在geshe目录下有很多与语言相关的php加亮文件，颜色代码就在这里生成，使用sed命令进行替换： 代码一 BASH: sed -r '/color *: *#[0-9a-f]{6};/{h;s/.*#([^;]+);.*/\1/;y/0123456789abcdef/fedcba9876543210/;G;s/(.*)\n(.*#)[^;]+(;.*)/\2\1\3/}' urfile 代码二 BASH: find ./ -iname abap.php &#124; &#123; while read i;do sed -rn 'h;s/.*color[ \t]*[=:][ \t]*#([a-fA-F0-9]+).*/\1/;ta;p;d;:a y/0123456789abcdefABCDEF/fedcba9876543210543210/;G;s/(.*)\n(.*color[ \t]*[=:][ \t]*#)([a-fA-F0-9]+)(.*)/\2\1\4/p' $i&#62;/tmp/tmp__;echo fuck;\cp -f /tmp/tmp__ $i;echo fuck;rm -f /tmp/tmp__;done; &#125; 上面的代码不是俺写的，具体可以查看CU论坛 俺什么时候也能把sed用到这种境界也就满足了:-) 上面简单的一句话脚本还是很有用的，上次俺花了一天的时间去修改主题的配色，其实如果要求不高的话用这脚本一下就搞定了:-) update:08-12-31 还得把一个颜色表示为单词的也换一下: sed -i 's/black/white/g' *]]></description>
			<content:encoded><![CDATA[<p><a href="http://cocobear.info/blog/tag/ig_syntax_hilite/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ig_syntax_hilite">ig_syntax_hilite</a>这个代码高亮的插件默认使用的是白色背景，所以<a href="http://windflush.cn/blog/">小林子</a>同学说看不清楚代码，俺就试着把<a href="http://cocobear.info/blog/tag/ig_syntax_hilite/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ig_syntax_hilite">ig_syntax_hilite</a>插件所有颜色代码全部反转了一下，例如：<br />
#ffffff黑色转换为#000000</p>
<p><a href="http://cocobear.info/blog/tag/ig_syntax_hilite/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ig_syntax_hilite">ig_syntax_hilite</a>使用的是<a href="http://qbnz.com/highlighter/">geshe</a>，在geshe目录下有很多与语言相关的php加亮文件，颜色代码就在这里生成，使用sed命令进行替换：</p>
<p><a href="#" onclick="xcollapse('X5853');return false;"> 代码一 </a><br />
</p>
<div id="X5853" style="display: none; border 1px solid=#0000cc; padding: 10px; background-color: transparent;">
<div class="syntax_hilite"><span class="langName">BASH:</span>
<div id="bash-3">
<div class="bash" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3df346; font-weight: bold;">sed</span> <span style="color: #99ffcc;">-r</span> <span style="color: #00ffff;">'/color *: *#[0-9a-f]{6};/{h;s/.*#([^;]+);.*/\1/;y/0123456789abcdef/fedcba9876543210/;G;s/(.*)\n(.*#)[^;]+(;.*)/\2\1\3/}'</span> urfile</div>
</li>
</ol>
</div>
</div>
</div>
<p>
</div>
<p><a href="#" onclick="xcollapse('X2424');return false;"> 代码二 </a><br />
</p>
<div id="X2424" style="display: none; border 1px solid=#0000cc; padding: 10px; background-color: transparent;">
<div class="syntax_hilite"><span class="langName">BASH:</span>
<div id="bash-4">
<div class="bash" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3df346; font-weight: bold;">find</span> .<span style="color: #ffffff; font-weight: bold;">/</span> <span style="color: #99ffcc;">-iname</span> abap.php <span style="color: #ffffff; font-weight: bold;">|</span> <span style="color: #85f78b; font-weight: bold;">&#123;</span> <span style="color: #ffffff; font-weight: bold;">while</span> <span style="color: #3df346; font-weight: bold;">read</span> i;<span style="color: #ffffff; font-weight: bold;">do</span> <span style="color: #3df346; font-weight: bold;">sed</span> <span style="color: #99ffcc;">-rn</span> <span style="color: #00ffff;">'h;s/.*color[ \t]*[=:][ \t]*#([a-fA-F0-9]+).*/\1/;ta;p;d;:a y/0123456789abcdefABCDEF/fedcba9876543210543210/;G;s/(.*)\n(.*color[ \t]*[=:][ \t]*#)([a-fA-F0-9]+)(.*)/\2\1\4/p'</span> <span style="color: #ff87ff;">$i</span><span style="color: #ffffff; font-weight: bold;">&gt;/</span>tmp<span style="color: #ffffff; font-weight: bold;">/</span>tmp__;<span style="color: #85f78b; font-weight: bold;">echo</span> fuck;\<span style="color: #3df346; font-weight: bold;">cp</span> <span style="color: #99ffcc;">-f</span> <span style="color: #ffffff; font-weight: bold;">/</span>tmp<span style="color: #ffffff; font-weight: bold;">/</span>tmp__ <span style="color: #ff87ff;">$i</span>;<span style="color: #85f78b; font-weight: bold;">echo</span> fuck;<span style="color: #3df346; font-weight: bold;">rm</span> <span style="color: #99ffcc;">-f</span> <span style="color: #ffffff; font-weight: bold;">/</span>tmp<span style="color: #ffffff; font-weight: bold;">/</span>tmp__;<span style="color: #ffffff; font-weight: bold;">done</span>; <span style="color: #85f78b; font-weight: bold;">&#125;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
</div>
<p>上面的代码不是俺写的，具体可以查看<a href="http://bbs3.chinaunix.net/thread-1316725-1-1.html">CU论坛</a><br />
俺什么时候也能把sed用到这种境界也就满足了:-)</p>
<p>上面简单的一句话脚本还是很有用的，上次俺花了一天的时间去修改主题的配色，其实如果要求不高的话用这脚本一下就搞定了:-)</p>
<p>update:08-12-31<br />
还得把一个颜色表示为单词的也换一下:<br />
<bash><br />
sed -i 's/black/white/g' *<br />
</bash></p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2008/11/21/ig_syntax_hilite-use-black-background/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>GRUB问题</title>
		<link>http://cocobear.info/blog/2008/11/11/grub-no-stage1-exists/</link>
		<comments>http://cocobear.info/blog/2008/11/11/grub-no-stage1-exists/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 02:39:04 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[grub]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=354</guid>
		<description><![CDATA[昨天在机子上试着装了下RHEL 5.2（在新的分区安装sda3），重新安装了GRUB（安装到了MBR），结果机子上原来的Fedora 9（在sda4分区上）不能启动了，GRUB会提示错误： setup (hd0,3) Checking if "/boot/grub/stage1" exists... no Checking if "/grub/stage1" exists... no 最后在RHEL 5.2中我把原来Fedora 9分区下/boot/grub/中的所有文件拷到了RHEL 5.2中的/boot/grub/，结果就正常了。不太理解为什么重新安装了GRUB，就无法引导原来的Fedora 9了。]]></description>
			<content:encoded><![CDATA[<p>昨天在机子上试着装了下RHEL 5.2（在新的分区安装sda3），重新安装了<a href="http://cocobear.info/blog/tag/grub/" class="st_tag internal_tag" rel="tag" title="Posts tagged with grub">GRUB</a>（安装到了MBR），结果机子上原来的Fedora 9（在sda4分区上）不能启动了，<a href="http://cocobear.info/blog/tag/grub/" class="st_tag internal_tag" rel="tag" title="Posts tagged with grub">GRUB</a>会提示错误：</p>
<blockquote><p>
setup (hd0,3)<br />
Checking if "/boot/<a href="http://cocobear.info/blog/tag/grub/" class="st_tag internal_tag" rel="tag" title="Posts tagged with grub">grub</a>/stage1" exists... no<br />
Checking if "/<a href="http://cocobear.info/blog/tag/grub/" class="st_tag internal_tag" rel="tag" title="Posts tagged with grub">grub</a>/stage1" exists... no </p></blockquote>
<p>最后在RHEL 5.2中我把原来Fedora 9分区下/boot/<a href="http://cocobear.info/blog/tag/grub/" class="st_tag internal_tag" rel="tag" title="Posts tagged with grub">grub</a>/中的所有文件拷到了RHEL 5.2中的/boot/<a href="http://cocobear.info/blog/tag/grub/" class="st_tag internal_tag" rel="tag" title="Posts tagged with grub">grub</a>/，结果就正常了。不太理解为什么重新安装了<a href="http://cocobear.info/blog/tag/grub/" class="st_tag internal_tag" rel="tag" title="Posts tagged with grub">GRUB</a>，就无法引导原来的Fedora 9了。</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2008/11/11/grub-no-stage1-exists/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Fedora 9 通过E680G/I手机实现GPRS上网</title>
		<link>http://cocobear.info/blog/2008/10/16/e680-gprs-linux/</link>
		<comments>http://cocobear.info/blog/2008/10/16/e680-gprs-linux/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 02:43:06 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[E680]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[GPRS]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=316</guid>
		<description><![CDATA[电脑通过E680G/I手机实现GPRS上网 E680是一款摩托的Linux系统手机，在Windows下可以通过自带的MPT工具包实现与电脑连接的GPRS上网，在Linux下也是比较方便的，以前我也用过，只是没记下来，今天再用的时候还得看别人写的文章，还是自己记一下。 我用的是Fedora 9，一般的Linux系统都应该可以，大同小异。首先是手机端设置连接模式为调制解调器(Modem)，通过数据线连接到电脑后(也可以用蓝牙，我这里没有环境)，Fedora 9会识别到有新的调制解调器： 发现新硬件: BASH: usb 4-3: new full speed USB device using ohci_hcd and address 2 usb 4-3: configuration #1 chosen from 1 choice usb 4-3: New USB device found, idVendor=22b8, idProduct=3802 usb 4-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 4-3: Product: Motorola USB Modem usb 4-3: Manufacturer: Motorola cdc_acm [...]]]></description>
			<content:encoded><![CDATA[<p><strong>电脑通过E680G/I手机实现<a href="http://cocobear.info/blog/tag/gprs/" class="st_tag internal_tag" rel="tag" title="Posts tagged with GPRS">GPRS</a>上网</strong></p>
<p>E680是一款摩托的<a href="http://cocobear.info/blog/tag/linux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Linux">Linux</a>系统手机，在Windows下可以通过自带的MPT工具包实现与电脑连接的<a href="http://cocobear.info/blog/tag/gprs/" class="st_tag internal_tag" rel="tag" title="Posts tagged with GPRS">GPRS</a>上网，在<a href="http://cocobear.info/blog/tag/linux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Linux">Linux</a>下也是比较方便的，以前我也用过，只是没记下来，今天再用的时候还得看别人写的文章，还是自己记一下。</p>
<p>我用的是Fedora 9，一般的<a href="http://cocobear.info/blog/tag/linux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Linux">Linux</a>系统都应该可以，大同小异。首先是手机端设置连接模式为调制解调器(Modem)，通过数据线连接到电脑后(也可以用蓝牙，我这里没有环境)，Fedora 9会识别到有新的调制解调器：</p>
<p><a href="#" onclick="xcollapse('X10973');return false;"> 发现新硬件: </a><br />
</p>
<div id="X10973" style="display: none; border 1px solid=#0000cc; padding: 10px; background-color: transparent;">
<div class="syntax_hilite"><span class="langName">BASH:</span>
<div id="bash-11">
<div class="bash" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">usb <span style="color: #ffffff;color:#800000;">4</span>-<span style="color: #ffffff;color:#800000;">3</span>: new full speed USB device using ohci_hcd and address <span style="color: #ffffff;color:#800000;">2</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">usb <span style="color: #ffffff;color:#800000;">4</span>-<span style="color: #ffffff;color:#800000;">3</span>: configuration <span style="color: #999999; font-style: italic;">#1 chosen from 1 choice</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">usb <span style="color: #ffffff;color:#800000;">4</span>-<span style="color: #ffffff;color:#800000;">3</span>: New USB device found, <span style="color: #ff87ff;">idVendor</span>=22b8, <span style="color: #ff87ff;">idProduct</span>=<span style="color: #ffffff;color:#800000;">3802</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">usb <span style="color: #ffffff;color:#800000;">4</span>-<span style="color: #ffffff;color:#800000;">3</span>: New USB device <span style="color: #3df346; font-weight: bold;">strings</span>: <span style="color: #ff87ff;">Mfr</span>=<span style="color: #ffffff;color:#800000;">1</span>, <span style="color: #ff87ff;">Product</span>=<span style="color: #ffffff;color:#800000;">2</span>, <span style="color: #ff87ff;">SerialNumber</span>=<span style="color: #ffffff;color:#800000;">0</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">usb <span style="color: #ffffff;color:#800000;">4</span>-<span style="color: #ffffff;color:#800000;">3</span>: Product: Motorola USB Modem</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">usb <span style="color: #ffffff;color:#800000;">4</span>-<span style="color: #ffffff;color:#800000;">3</span>: Manufacturer: Motorola</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">cdc_acm <span style="color: #ffffff;color:#800000;">4</span>-<span style="color: #ffffff;color:#800000;">3</span>:<span style="color: #ffffff;color:#800000;">1.0</span>: ttyACM0: USB ACM device</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">usbcore: registered new interface driver cdc_acm</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">drivers<span style="color: #ffffff; font-weight: bold;">/</span>usb<span style="color: #ffffff; font-weight: bold;">/</span>class<span style="color: #ffffff; font-weight: bold;">/</span>cdc-acm.c: v0.25:USB Abstract Control Model driver <span style="color: #ffffff; font-weight: bold;">for</span> USB modems and ISDN adapters</div>
</li>
</ol>
</div>
</div>
</div>
<p>
</div>
<p>它对应的设备就是/dev/ttyACM0。接下来用wvdial这个拨号工具，如果没有这个包的话请自行安装，wvdial有一个配置文件/etc/wvdial.conf,(使用root进行下面的操作)编辑这个文件,：</p>
<p><a href="#" onclick="xcollapse('X9261');return false;"> 添加以下内容:</a><br />
</p>
<div id="X9261" style="display: none; border 1px solid=#0000cc; padding: 10px; background-color: transparent;">
<div class="syntax_hilite"><span class="langName">BASH:</span>
<div id="bash-12">
<div class="bash" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #85f78b; font-weight: bold;">&#91;</span>Dialer Defaults<span style="color: #85f78b; font-weight: bold;">&#93;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Init1 = at+<span style="color: #ff87ff;">cgdcont</span>=<span style="color: #ffffff;color:#800000;">1</span>,<span style="color: #00ffff;">&quot;ip&quot;</span>,<span style="color: #00ffff;">&quot;cmnet&quot;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Phone = <span style="color: #ffffff; font-weight: bold;">*</span><span style="color: #ffffff;color:#800000;">99</span><span style="color: #ffffff; font-weight: bold;">***</span><span style="color: #ffffff;color:#800000;">1</span><span style="color: #999999; font-style: italic;">#</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Modem = <span style="color: #ffffff; font-weight: bold;">/</span>dev<span style="color: #ffffff; font-weight: bold;">/</span>ttyACM0</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Username = <span style="color: #00ffff;">&quot;cmnet&quot;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Password = <span style="color: #00ffff;">&quot;cmnet&quot;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Carrier Check = no</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Baud = <span style="color: #ffffff;color:#800000;">460800</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Auto DNS = on</div>
</li>
</ol>
</div>
</div>
</div>
<p>
</div>
<p>如果已经有Dialer Defaults这一块则覆盖之。这里要注意使用的是cmnet，最好是手机包月不分cmnet和cmwap那种的，不然收费是很贵的。修改完该文件后还需要对/etc/ppp/options文件进行修改，添加一行：<br />
:192.168.0.254<br />
这个修改比较奇怪，E680系列的<a href="http://cocobear.info/blog/tag/linux/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Linux">Linux</a>手机都需要这样:-(，不然用wvdial拨号时会在/var/log/messages中产生下面的错误：</p>
<p><a href="#" onclick="xcollapse('X1923');return false;"> 错误信息：</a><br />
</p>
<div id="X1923" style="display: none; border 1px solid=#0000cc; padding: 10px; background-color: transparent;">
<div class="syntax_hilite"><span class="langName">BASH:</span>
<div id="bash-13">
<div class="bash" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">25</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: pppd 2.4.4 started by root, uid <span style="color: #ffffff;color:#800000;">0</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">25</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: Using interface ppp0</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">25</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: Connect: ppp0 <span style="color: #ffffff; font-weight: bold;">&lt;</span>--<span style="color: #ffffff; font-weight: bold;">&gt;</span> <span style="color: #ffffff; font-weight: bold;">/</span>dev<span style="color: #ffffff; font-weight: bold;">/</span>ttyACM0</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">36</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: Remote message: Welcome to Motorola A760 Software Modem<span style="color: #ffffff; font-weight: bold;">!</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">36</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: PAP authentication succeeded</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">44</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: LCP terminated by peer <span style="color: #85f78b; font-weight: bold;">&#40;</span>^<span style="color: #ffffff; font-weight: bold;">@</span>^<span style="color: #ffffff; font-weight: bold;">@</span>^<span style="color: #ffffff; font-weight: bold;">@</span>^<span style="color: #ffffff; font-weight: bold;">@</span>^<span style="color: #ffffff; font-weight: bold;">@</span>^<span style="color: #ffffff; font-weight: bold;">@</span><span style="color: #85f78b; font-weight: bold;">&#41;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">44</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: Modem hangup</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">44</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: Connection terminated.</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">44</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: Exit.</div>
</li>
</ol>
</div>
</div>
</div>
<p>
</div>
<p>修改完这个文件后就可以开始拨号了，直接使用wvdial命令:</p>
<p><a href="#" onclick="xcollapse('X771');return false;"> 拨号信息：</a><br />
</p>
<div id="X771" style="display: none; border 1px solid=#0000cc; padding: 10px; background-color: transparent;">
<div class="syntax_hilite"><span class="langName">BASH:</span>
<div id="bash-14">
<div class="bash" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #85f78b; font-weight: bold;">&#91;</span>root<span style="color: #ffffff; font-weight: bold;">@</span>cocobear cocobear<span style="color: #85f78b; font-weight: bold;">&#93;</span><span style="color: #999999; font-style: italic;"># vim /etc/wvdial.conf </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #85f78b; font-weight: bold;">&#91;</span>root<span style="color: #ffffff; font-weight: bold;">@</span>cocobear cocobear<span style="color: #85f78b; font-weight: bold;">&#93;</span><span style="color: #999999; font-style: italic;"># vim /etc/ppp/options </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #85f78b; font-weight: bold;">&#91;</span>root<span style="color: #ffffff; font-weight: bold;">@</span>cocobear cocobear<span style="color: #85f78b; font-weight: bold;">&#93;</span><span style="color: #999999; font-style: italic;"># wvdial</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> WvDial: Internet dialer version <span style="color: #ffffff;color:#800000;">1.60</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Cannot get information <span style="color: #ffffff; font-weight: bold;">for</span> serial port.</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Initializing modem.</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Sending: at+<span style="color: #ff87ff;">cgdcont</span>=<span style="color: #ffffff;color:#800000;">1</span>,<span style="color: #00ffff;">&quot;ip&quot;</span>,<span style="color: #00ffff;">&quot;cmnet&quot;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">OK</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Modem initialized.</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Sending: ATDT<span style="color: #ffffff; font-weight: bold;">*</span><span style="color: #ffffff;color:#800000;">99</span><span style="color: #ffffff; font-weight: bold;">***</span><span style="color: #ffffff;color:#800000;">1</span><span style="color: #999999; font-style: italic;">#</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Waiting <span style="color: #ffffff; font-weight: bold;">for</span> carrier.</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">CONNECT</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Carrier detected. &nbsp;Waiting <span style="color: #ffffff; font-weight: bold;">for</span> prompt.</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">~<span style="color: #85f78b; font-weight: bold;">&#91;</span>7f<span style="color: #85f78b; font-weight: bold;">&#93;</span><span style="color: #85f78b; font-weight: bold;">&#125;</span><span style="color: #999999; font-style: italic;">#@!}!}!} }&lt;}!}$}%\}&quot;}&amp;} } } } }#}$@#}%}&amp;j}?} } }'}&quot;}(}&quot;?}3~</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> PPP negotiation detected.</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Starting pppd at Thu Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">58</span>:<span style="color: #ffffff;color:#800000;">41</span> <span style="color: #ffffff;color:#800000;">2008</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Pid of pppd: <span style="color: #ffffff;color:#800000;">18959</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Using interface ppp0</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> <span style="color: #85f78b; font-weight: bold;">local</span> &nbsp;IP address 10.182.237.127</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> remote IP address 192.168.0.254</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> primary &nbsp; DNS address 211.137.130.3</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> secondary DNS address 211.137.130.19</div>
</li>
</ol>
</div>
</div>
</div>
<p>
</div>
<p>从上面的信息中可以看出我们成功的拨号上网了，不过这时候我们还需要手动把192.168.0.254添加为默认路由:</p>
<div class="syntax_hilite"><span class="langName">BASH:</span>
<div id="bash-15">
<div class="bash" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">route add default gw 192.168.0.254</div>
</li>
</ol>
</div>
</div>
</div>
<p>
ping一个google：</p>
<p><a href="#" onclick="xcollapse('X7787');return false;"> Ping结果：</a><br />
</p>
<div id="X7787" style="display: none; border 1px solid=#0000cc; padding: 10px; background-color: transparent;">
<div class="syntax_hilite"><span class="langName">BASH:</span>
<div id="bash-16">
<div class="bash" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #85f78b; font-weight: bold;">&#91;</span>cocobear<span style="color: #ffffff; font-weight: bold;">@</span>cocobear ~<span style="color: #85f78b; font-weight: bold;">&#93;</span>$ <span style="color: #3df346; font-weight: bold;">ping</span> www.g.cn</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">PING g.cn <span style="color: #85f78b; font-weight: bold;">&#40;</span>203.208.33.100<span style="color: #85f78b; font-weight: bold;">&#41;</span> <span style="color: #ffffff;color:#800000;">56</span><span style="color: #85f78b; font-weight: bold;">&#40;</span><span style="color: #ffffff;color:#800000;">84</span><span style="color: #85f78b; font-weight: bold;">&#41;</span> bytes of data.</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ffffff;color:#800000;">64</span> bytes from 203.208.33.100: <span style="color: #ff87ff;">icmp_seq</span>=<span style="color: #ffffff;color:#800000;">2</span> <span style="color: #ff87ff;">ttl</span>=<span style="color: #ffffff;color:#800000;">242</span> <span style="color: #ff87ff;"><span style="color: #ffffff; font-weight: bold;">time</span></span>=<span style="color: #ffffff;color:#800000;">709</span> ms</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ffffff;color:#800000;">64</span> bytes from 203.208.33.100: <span style="color: #ff87ff;">icmp_seq</span>=<span style="color: #ffffff;color:#800000;">4</span> <span style="color: #ff87ff;">ttl</span>=<span style="color: #ffffff;color:#800000;">242</span> <span style="color: #ff87ff;"><span style="color: #ffffff; font-weight: bold;">time</span></span>=<span style="color: #ffffff;color:#800000;">1359</span> ms</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ffffff;color:#800000;">64</span> bytes from 203.208.33.100: <span style="color: #ff87ff;">icmp_seq</span>=<span style="color: #ffffff;color:#800000;">5</span> <span style="color: #ff87ff;">ttl</span>=<span style="color: #ffffff;color:#800000;">242</span> <span style="color: #ff87ff;"><span style="color: #ffffff; font-weight: bold;">time</span></span>=<span style="color: #ffffff;color:#800000;">1159</span> ms</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ffffff;color:#800000;">64</span> bytes from 203.208.33.100: <span style="color: #ff87ff;">icmp_seq</span>=<span style="color: #ffffff;color:#800000;">6</span> <span style="color: #ff87ff;">ttl</span>=<span style="color: #ffffff;color:#800000;">242</span> <span style="color: #ff87ff;"><span style="color: #ffffff; font-weight: bold;">time</span></span>=<span style="color: #ffffff;color:#800000;">1021</span> ms</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ffffff;color:#800000;">64</span> bytes from 203.208.33.100: <span style="color: #ff87ff;">icmp_seq</span>=<span style="color: #ffffff;color:#800000;">7</span> <span style="color: #ff87ff;">ttl</span>=<span style="color: #ffffff;color:#800000;">242</span> <span style="color: #ff87ff;"><span style="color: #ffffff; font-weight: bold;">time</span></span>=<span style="color: #ffffff;color:#800000;">617</span> ms</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">^C</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #99ffcc;">---</span> g.cn <span style="color: #3df346; font-weight: bold;">ping</span> statistics <span style="color: #99ffcc;">---</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ffffff;color:#800000;">8</span> packets transmitted, <span style="color: #ffffff;color:#800000;">5</span> received, <span style="color: #ffffff;color:#800000;">37</span><span style="color: #ffffff; font-weight: bold;">%</span> packet loss, <span style="color: #ffffff; font-weight: bold;">time</span> 13411ms</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">rtt min<span style="color: #ffffff; font-weight: bold;">/</span>avg<span style="color: #ffffff; font-weight: bold;">/</span>max<span style="color: #ffffff; font-weight: bold;">/</span>mdev = <span style="color: #ffffff;color:#800000;">617.708</span><span style="color: #ffffff; font-weight: bold;">/</span><span style="color: #ffffff;color:#800000;">973.500</span><span style="color: #ffffff; font-weight: bold;">/</span><span style="color: #ffffff;color:#800000;">1359.063</span><span style="color: #ffffff; font-weight: bold;">/</span><span style="color: #ffffff;color:#800000;">276.410</span> ms, pipe <span style="color: #ffffff;color:#800000;">2</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
</div>
<p>好大的延时，还有丢包，没办法了中国移动的<a href="http://cocobear.info/blog/tag/gprs/" class="st_tag internal_tag" rel="tag" title="Posts tagged with GPRS">GPRS</a>就这样了，EDGE在西安只有部分地区覆盖了，而且E680手机是不支持的！</p>
<p>终于上来了，搬到新租的房子后还没拉网线，只能先这样了。</p>
<p>羡慕王聪同学的3G上网啊＠_＠</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2008/10/16/e680-gprs-linux/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>处理了下网站</title>
		<link>http://cocobear.info/blog/2008/08/15/deal-with-wes/</link>
		<comments>http://cocobear.info/blog/2008/08/15/deal-with-wes/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 09:57:53 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=305</guid>
		<description><![CDATA[改了info域名后网站以前里很多页面里有cocobear.cn，连一些图片也显示不出来，今天就处理了一下： 把网站里一些文件做替换，先备份一下： grep cocobear.cn ./cocobear.info/ -R -l --binary-files=without-match&#124;xargs -i cp --parents {} bk/ 然后全部替换： grep cocobear.cn ./cocobear.info/ -R -l --binary-files=without-match &#124; xargs sed -i 's/cocobear\.cn[^@]/cocobear\.info/g' 剩下就是数据库里的内容了，主要是wp_posts表中的post_content字段，还有guid字段，还有wp_comments中的comment_author_url，wp_postmeta中的meta_value; 操作的命令是： mysql> update wp_posts set post_content=replace(post_content,"http://www.cocobear.cn","http://cocobear.info"); 当然在进行数据库操作时一定要记得先备份一下： mysqldump -h mysql.1g50.cn -u cocobear -p cocobear > 0808151.sql 使用 mysqldump -h mysql.1g50.cn -u cocobear -p cocobear < 0808151.sql恢复似乎不太好，还是进mysql里使用source ~/0808151.sql进行恢复。]]></description>
			<content:encoded><![CDATA[<p>改了info域名后网站以前里很多页面里有cocobear.cn，连一些图片也显示不出来，今天就处理了一下：</p>
<p>把网站里一些文件做替换，先备份一下：<br />
grep cocobear.cn ./cocobear.info/ -R -l --binary-files=without-match|xargs -i cp --parents {} bk/</p>
<p>然后全部替换：<br />
grep cocobear.cn ./cocobear.info/ -R -l --binary-files=without-match | xargs sed -i 's/cocobear\.cn[^@]/cocobear\.info/g'</p>
<p>剩下就是数据库里的内容了，主要是wp_posts表中的post_content字段，还有guid字段，还有wp_comments中的comment_author_url，wp_postmeta中的meta_value;<br />
操作的命令是：<br />
<a href="http://cocobear.info/blog/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MySQL">mysql</a>> update wp_posts set post_content=replace(post_content,"http://www.cocobear.cn","http://cocobear.info");</p>
<p>当然在进行数据库操作时一定要记得先备份一下：<br />
 mysqldump -h <a href="http://cocobear.info/blog/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MySQL">mysql</a>.1g50.cn -u cocobear -p cocobear > 0808151.sql</p>
<p>使用 mysqldump -h <a href="http://cocobear.info/blog/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MySQL">mysql</a>.1g50.cn -u cocobear -p cocobear < 0808151.sql恢复似乎不太好，还是进<a href="http://cocobear.info/blog/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MySQL">mysql</a>里使用source ~/0808151.sql进行恢复。</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2008/08/15/deal-with-wes/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
