﻿<?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>Vi`blog · 唯音 &#187; centos</title>
	<atom:link href="http://www.viyin.net/tag/centos/feed" rel="self" type="application/rss+xml" />
	<link>http://www.viyin.net</link>
	<description>岂能尽如人意，但求无愧于心</description>
	<lastBuildDate>Mon, 14 Nov 2011 15:43:49 +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>centos下yum安装GNOME和KDE桌面</title>
		<link>http://www.viyin.net/2010/12/centos-yum-gnome-kde.html</link>
		<comments>http://www.viyin.net/2010/12/centos-yum-gnome-kde.html#comments</comments>
		<pubDate>Wed, 01 Dec 2010 14:17:06 +0000</pubDate>
		<dc:creator>vi</dc:creator>
				<category><![CDATA[√文章精选]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[kde]]></category>

		<guid isPermaLink="false">http://www.viyin.net/?p=1042</guid>
		<description><![CDATA[显示系统已经安装的组件，和可以安装的组件: #yum grouplist 如果系统安装之初采用最小化安装，没有安装xwindow，那么先安装： #yum groupinstall “X Window System” 安装GNOME桌面环境 yum groupinstall “GNOME Desktop Environment” 安装KDE桌面环境 yum groupinstall “KDE (K Desktop Environment)” 卸载GNOME桌面环境 yum groupremove “GNOME Desktop Environment” 卸载KDE桌面环境 yum groupremove “KDE (K Desktop Environment)”]]></description>
			<content:encoded><![CDATA[<p>显示系统已经安装的组件，和可以安装的组件:<br />
#<a href="http://www.viyin.net/tag/yum" class="st_tag internal_tag" rel="tag" title="标签 yum 下的日志">yum</a> grouplist </p>
<p>如果系统安装之初采用最小化安装，没有安装xwindow，那么先安装：<br />
#yum groupinstall “X Window System”</p>
<p>安装GNOME桌面环境<br />
yum groupinstall “<a href="http://www.viyin.net/tag/gnome" class="st_tag internal_tag" rel="tag" title="标签 gnome 下的日志">GNOME</a> Desktop Environment”</p>
<p>安装KDE桌面环境<br />
yum groupinstall “<a href="http://www.viyin.net/tag/kde" class="st_tag internal_tag" rel="tag" title="标签 kde 下的日志">KDE</a> (K Desktop Environment)”</p>
<p>卸载GNOME桌面环境<br />
yum groupremove “GNOME Desktop Environment”</p>
<p>卸载KDE桌面环境<br />
yum groupremove “KDE (K Desktop Environment)”</p>
]]></content:encoded>
			<wfw:commentRss>http://www.viyin.net/2010/12/centos-yum-gnome-kde.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>yum samba安装配置</title>
		<link>http://www.viyin.net/2010/11/yum-samba-centos.html</link>
		<comments>http://www.viyin.net/2010/11/yum-samba-centos.html#comments</comments>
		<pubDate>Tue, 23 Nov 2010 03:11:42 +0000</pubDate>
		<dc:creator>vi</dc:creator>
				<category><![CDATA[√linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.viyin.net/?p=1038</guid>
		<description><![CDATA[1.yum -y install samba 2.编辑/etc/samba/smb.conf 追加 [share] windows客户端查看时看到的文件夹名 path = /var/samba/share 共享目录位置，要系统中存在的目录，也可以配置完再创建 read only = no public = yes 3.smbpasswd -a username 将linux系统已存在用户 username（例）加入到 Samba 用户数据库，windows访问samba共享目录时需要输入此用户名和密码]]></description>
			<content:encoded><![CDATA[<p>1.<a href="http://www.viyin.net/tag/yum" class="st_tag internal_tag" rel="tag" title="标签 yum 下的日志">yum</a> -y install <a href="http://www.viyin.net/tag/samba" class="st_tag internal_tag" rel="tag" title="标签 samba 下的日志">samba</a></p>
<p>2.编辑/etc/samba/smb.conf </p>
<p>追加</p>
<p>[share]       windows客户端查看时看到的文件夹名<br />
<a href="http://www.viyin.net/tag/path" class="st_tag internal_tag" rel="tag" title="标签 path 下的日志">path</a> = /var/samba/share       共享目录位置，要系统中存在的目录，也可以配置完再创建<br />
read only = no<br />
public   = yes </p>
<p>3.smbpasswd -a username<br />
将linux系统已存在用户 username（例）加入到 Samba 用户数据库，windows访问samba共享目录时需要输入此用户名和密码 </p>
]]></content:encoded>
			<wfw:commentRss>http://www.viyin.net/2010/11/yum-samba-centos.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>xen依赖的两个系统服务</title>
		<link>http://www.viyin.net/2010/08/xen-2.html</link>
		<comments>http://www.viyin.net/2010/08/xen-2.html#comments</comments>
		<pubDate>Thu, 12 Aug 2010 06:17:46 +0000</pubDate>
		<dc:creator>vi</dc:creator>
				<category><![CDATA[√文章精选]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[haldaemon]]></category>
		<category><![CDATA[messagebus]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://www.viyin.net/?p=943</guid>
		<description><![CDATA[xen依赖的两个系统服务 messagebus，haldaemon 这两个服务要启用。不然，XEN网卡桥接不能使用。 我试了好久。唉%]]></description>
			<content:encoded><![CDATA[<p>xen依赖的两个系统服务</p>
<p><a href="http://www.viyin.net/tag/messagebus" class="st_tag internal_tag" rel="tag" title="标签 messagebus 下的日志">messagebus</a>，<a href="http://www.viyin.net/tag/haldaemon" class="st_tag internal_tag" rel="tag" title="标签 haldaemon 下的日志">haldaemon</a> 这两个服务要启用。不然，XEN网卡桥接不能使用。</p>
<p>我试了好久。唉%</p>
]]></content:encoded>
			<wfw:commentRss>http://www.viyin.net/2010/08/xen-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>centos dns服务器配置</title>
		<link>http://www.viyin.net/2010/03/centos-dns-bind.html</link>
		<comments>http://www.viyin.net/2010/03/centos-dns-bind.html#comments</comments>
		<pubDate>Fri, 12 Mar 2010 03:04:06 +0000</pubDate>
		<dc:creator>vi</dc:creator>
				<category><![CDATA[√linux]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[named]]></category>
		<category><![CDATA[viyin]]></category>
		<category><![CDATA[viyin.net]]></category>
		<category><![CDATA[zone]]></category>

		<guid isPermaLink="false">http://www.viyin.net/?p=691</guid>
		<description><![CDATA[下载最新的BIND 9.7.0b3 http://www.bind.com/pub/bind9/ 编译安装 ./configure &#8211;prefix=/usr/local/named &#8211;enable-threads &#8211;with-dlz-mysql &#8211;disable-openssl-version-check 建立localhost.zone [root@vi named]# pwd /usr/local/named [root@vi named]# vim localhost.zone $TTL 86400 @ IN SOA @ root ( 42 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum IN NS @ IN A 127.0.0.1 IN AAAA ::1 建立named.ca 。可以通过dig [...]]]></description>
			<content:encoded><![CDATA[<p>下载最新的BIND 9.7.0b3</p>
<p>http://www.<a href="http://www.viyin.net/tag/bind" class="st_tag internal_tag" rel="tag" title="标签 bind 下的日志">bind</a>.com/pub/<a href="http://www.viyin.net/tag/bind" class="st_tag internal_tag" rel="tag" title="标签 bind 下的日志">bind</a>9/</p>
<p>编译安装<br />
./configure &#8211;prefix=/usr/local/<a href="http://www.viyin.net/tag/named" class="st_tag internal_tag" rel="tag" title="标签 named 下的日志">named</a> &#8211;enable-threads &#8211;with-dlz-mysql &#8211;disable-openssl-version-check </p>
<p>建立localhost.<a href="http://www.viyin.net/tag/zone" class="st_tag internal_tag" rel="tag" title="标签 zone 下的日志">zone</a><br />
[root@vi named]# pwd<br />
/usr/local/named<br />
[root@vi named]# vim localhost.zone </p>
<p>$TTL    86400<br />
@               IN SOA  @       root (<br />
                                        42              ; serial (d. adams)<br />
                                        3H              ; refresh<br />
                                        15M             ; retry<br />
                                        1W              ; expiry<br />
                                        1D )            ; minimum</p>
<p>                IN NS           @<br />
                IN A            127.0.0.1<br />
                IN AAAA         ::1</p>
<p>建立named.ca 。可以通过dig >named.ca获取<br />
[root@vi named]# pwd<br />
/usr/local/named<br />
[root@vi named]# vim named.ca </p>
<p>.                       518400  IN      NS      L.ROOT-SERVERS.NET.<br />
.                       518400  IN      NS      M.ROOT-SERVERS.NET.<br />
.                       518400  IN      NS      A.ROOT-SERVERS.NET.<br />
.                       518400  IN      NS      B.ROOT-SERVERS.NET.<br />
.                       518400  IN      NS      C.ROOT-SERVERS.NET.<br />
<span id="more-691"></span><br />
;; ADDITIONAL SECTION:<br />
A.ROOT-SERVERS.NET.     3600000 IN      A       198.41.0.4<br />
A.ROOT-SERVERS.NET.     3600000 IN      AAAA    2001:503:ba3e::2:30<br />
B.ROOT-SERVERS.NET.     3600000 IN      A       192.228.79.201<br />
C.ROOT-SERVERS.NET.     3600000 IN      A       192.33.4.12<br />
D.ROOT-SERVERS.NET.     3600000 IN      A       128.8.10.90<br />
E.ROOT-SERVERS.NET.     3600000 IN      A       192.203.230.10<br />
F.ROOT-SERVERS.NET.     3600000 IN      A       192.5.5.241<br />
F.ROOT-SERVERS.NET.     3600000 IN      AAAA    2001:500:2f::f<br />
G.ROOT-SERVERS.NET.     3600000 IN      A       192.112.36.4<br />
H.ROOT-SERVERS.NET.     3600000 IN      A       128.63.2.53<br />
H.ROOT-SERVERS.NET.     3600000 IN      AAAA    2001:500:1::803f:235<br />
I.ROOT-SERVERS.NET.     3600000 IN      A       192.36.148.17<br />
J.ROOT-SERVERS.NET.     3600000 IN      A       192.58.128.30<br />
J.ROOT-SERVERS.NET.     3600000 IN      AAAA    2001:503:c27::2:30<br />
K.ROOT-SERVERS.NET.     3600000 IN      A       193.0.14.129<br />
K.ROOT-SERVERS.NET.     3600000 IN      AAAA    2001:7fd::1<br />
L.ROOT-SERVERS.NET.     3600000 IN      A       199.7.83.42<br />
M.ROOT-SERVERS.NET.     3600000 IN      A       202.12.27.33<br />
M.ROOT-SERVERS.NET.     3600000 IN      AAAA    2001:dc3::35</p>
<p>;; Query time: 110 msec<br />
;; SERVER: 198.41.0.4#53(198.41.0.4)<br />
;; WHEN: Tue Feb 26 15:05:57 2008<br />
;; MSG SIZE  rcvd: 615</p>
<p>建立正向解析文件 <a href="http://www.viyin.net/tag/viyin-net" class="st_tag internal_tag" rel="tag" title="标签 viyin.net 下的日志">viyin.net</a>.zone<br />
[root@vi named]# pwd<br />
/usr/local/named<br />
[root@vi named]# vim <a href="http://www.viyin.net/tag/viyin" class="st_tag internal_tag" rel="tag" title="标签 viyin 下的日志">viyin</a>.net.zone </p>
<p>$TTL    86400<br />
@               IN SOA  viyin.net. root.viyin.net. (<br />
                                        42              ; serial (d. adams)<br />
                                        3H              ; refresh<br />
                                        15M             ; retry<br />
                                        1W              ; expiry<br />
                                        1D )            ; minimum<br />
                IN              NS           ns.viyin.net.<br />
ns              IN              A            192.168.1.200<br />
www             IN              A            192.168.1.200</p>
<p>反向解析文件<br />
[root@vi named]# pwd<br />
/usr/local/named<br />
[root@vi named]# vim 1.168.192.local</p>
<p>$TTL    86400<br />
@       IN      SOA     viyin.net. root.viyin.net.  (<br />
                                      1997022700 ; Serial<br />
                                      28800      ; Refresh<br />
                                      14400      ; Retry<br />
                                      3600000    ; Expire<br />
                                      86400 )    ; Minimum<br />
        IN      NS      ns.viyin.net.<br />
200     IN      PTR     www.viyin.net.</p>
<p>配置named.conf<br />
[root@vi etc]# pwd<br />
/usr/local/named/etc<br />
[root@vi etc]# vim named.conf</p>
<p>forwarders {<br />
218.85.157.99;<br />
210.34.80.3;<br />
};<br />
allow-query { any; };<br />
};<br />
logging {<br />
channel default_debug {<br />
file “named.run”;<br />
severity dynamic;<br />
};<br />
};<br />
//view localhost_resolver {<br />
// match-clients { localhost; };<br />
// match-destinations { localhost; };<br />
// recursion yes;<br />
// include “/etc/named.rfc1912.zones”;<br />
//};</p>
<p>zone “.”{<br />
type hint;<br />
file “named.ca”;<br />
};</p>
<p>zone “viyin.net” IN {<br />
type master;<br />
file “viyin.net.zone”;<br />
allow-update { none; };<br />
};<br />
zone “1.168.192.in-addr.arpa” IN {<br />
type master;<br />
file “1.168.192.local”;<br />
allow-update { none; };<br />
};</p>
<p>启动测试，看下有无报错<br />
[root@vi sbin]# ./named -g<br />
12-Mar-2010 11:03:56.944 starting BIND 9.7.0b3 -g<br />
12-Mar-2010 11:03:56.944 built with &#8216;&#8211;prefix=/usr/local/named&#8217; &#8216;&#8211;enable-threads&#8217; &#8216;&#8211;with-dlz-mysql&#8217; &#8216;&#8211;disable-openssl-version-check&#8217;<br />
12-Mar-2010 11:03:56.944 adjusted limit on open files from 1024 to 1048576<br />
12-Mar-2010 11:03:56.945 found 4 CPUs, using 4 worker threads<br />
12-Mar-2010 11:03:56.945 using up to 4096 sockets<br />
12-Mar-2010 11:03:56.951 loading configuration from &#8216;/usr/local/named/etc/named.conf&#8217;<br />
12-Mar-2010 11:03:56.951 reading built-in trusted keys from file &#8216;/usr/local/named/etc/bind.keys&#8217;<br />
12-Mar-2010 11:03:56.952 using default UDP/IPv4 port range: [1024, 65535]<br />
12-Mar-2010 11:03:56.953 using default UDP/IPv6 port range: [1024, 65535]<br />
12-Mar-2010 11:03:56.954 listening on IPv4 interface lo, 127.0.0.1#53<br />
12-Mar-2010 11:03:56.955 binding TCP socket: address in use<br />
12-Mar-2010 11:03:56.955 listening on IPv4 interface eth0, 192.168.1.200#53<br />
12-Mar-2010 11:03:56.956 binding TCP socket: address in use<br />
12-Mar-2010 11:03:56.957 generating session key for dynamic <a href="http://www.viyin.net/tag/dns" class="st_tag internal_tag" rel="tag" title="标签 dns 下的日志">DNS</a><br />
12-Mar-2010 11:03:56.959 automatic empty zone: 0.IN-ADDR.ARPA<br />
12-Mar-2010 11:03:56.959 automatic empty zone: 127.IN-ADDR.ARPA<br />
12-Mar-2010 11:03:56.959 automatic empty zone: 254.169.IN-ADDR.ARPA<br />
12-Mar-2010 11:03:56.959 automatic empty zone: 2.0.192.IN-ADDR.ARPA<br />
12-Mar-2010 11:03:56.959 automatic empty zone: 255.255.255.255.IN-ADDR.ARPA<br />
12-Mar-2010 11:03:56.959 automatic empty zone: 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA<br />
12-Mar-2010 11:03:56.959 automatic empty zone: 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA<br />
12-Mar-2010 11:03:56.959 automatic empty zone: D.F.IP6.ARPA<br />
12-Mar-2010 11:03:56.959 automatic empty zone: 8.E.F.IP6.ARPA<br />
12-Mar-2010 11:03:56.959 automatic empty zone: 9.E.F.IP6.ARPA<br />
12-Mar-2010 11:03:56.959 automatic empty zone: A.E.F.IP6.ARPA<br />
12-Mar-2010 11:03:56.959 automatic empty zone: B.E.F.IP6.ARPA<br />
12-Mar-2010 11:03:56.963 none:0: open: /usr/local/named/etc/rndc.key: file not found<br />
12-Mar-2010 11:03:56.963 couldn&#8217;t add command channel 127.0.0.1#953: file not found<br />
12-Mar-2010 11:03:56.963 none:0: open: /usr/local/named/etc/rndc.key: file not found<br />
12-Mar-2010 11:03:56.963 couldn&#8217;t add command channel ::1#953: file not found<br />
12-Mar-2010 11:03:56.963 ignoring config file logging statement due to -g option<br />
12-Mar-2010 11:03:56.964 zone 1.168.192.in-addr.arpa/IN: loaded serial 1997022700<br />
12-Mar-2010 11:03:56.965 zone viyin.net/IN: loaded serial 42<br />
12-Mar-2010 11:03:56.965 running<br />
12-Mar-2010 11:03:56.965 zone 1.168.192.in-addr.arpa/IN: sending notifies (serial 1997022700)<br />
12-Mar-2010 11:03:56.965 zone viyin.net/IN: sending notifies (serial 42)<br />
启动成功。</p>
<p>[root@vi sbin]# ./named</p>
<p>测试正向反向解析<br />
<a href="http://www.viyin.net/wp-content/uploads/2010/03/dns.jpg"><img src="http://www.viyin.net/wp-content/uploads/2010/03/dns.jpg" alt="" title="dns" width="668" height="431" class="alignnone size-full wp-image-692" /></a></p>
<p>(C) 版权所有 1985-2003 Microsoft Corp.</p>
<p>C:\Documents and Settings\Administrator>nslookup<br />
Default Server:  cache-a.guangzhou.gd.cn<br />
Address:  202.96.128.86</p>
<p>> server 192.168.1.200<br />
Default Server:  [192.168.1.200]<br />
Address:  192.168.1.200</p>
<p>> www.viyin.net<br />
Server:  [192.168.1.200]<br />
Address:  192.168.1.200</p>
<p>Name:    www.viyin.net<br />
Address:  192.168.1.200</p>
<p>> 192.168.1.1<br />
Server:  [192.168.1.200]<br />
Address:  192.168.1.200</p>
<p>Name:    xyz.viyin.net<br />
Address:  192.168.1.1</p>
<p>></p>
<p>感谢tiham铁汉！</p>
<p>http://www.tiham.com/2009/07/redhat-dns.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.viyin.net/2010/03/centos-dns-bind.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>centos 5.4 vncserver安装配置</title>
		<link>http://www.viyin.net/2010/03/centos-5vncserver.html</link>
		<comments>http://www.viyin.net/2010/03/centos-5vncserver.html#comments</comments>
		<pubDate>Wed, 10 Mar 2010 02:51:14 +0000</pubDate>
		<dc:creator>vi</dc:creator>
				<category><![CDATA[√文章精选]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[vnc]]></category>
		<category><![CDATA[vncserver配置]]></category>

		<guid isPermaLink="false">http://www.viyin.net/?p=686</guid>
		<description><![CDATA[yum -y install vnc vnc-* 编辑VNC Server配置文件 vi /etc/sysconfig/vncservers # The VNCSERVERS variable is a list of display:user pairs. # # Uncomment the lines below to start a VNC server on display :2 # as my ‘myusername’ (adjust this to your own). You will also # need to set a VNC password; run ‘man vncpasswd’ [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.viyin.net/tag/yum" class="st_tag internal_tag" rel="tag" title="标签 yum 下的日志">yum</a> -y install <a href="http://www.viyin.net/tag/vnc" class="st_tag internal_tag" rel="tag" title="标签 vnc 下的日志">vnc</a> vnc-*</p>
<p>编辑VNC Server配置文件 vi /etc/sysconfig/vncservers </p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"># The VNCSERVERS variable is a list of display:user pairs.</li>
<li>#</li>
<li># Uncomment the lines below to start a VNC server on display :2</li>
<li># as my ‘myusername’ (adjust this to your own). You will also</li>
<li># need to set a VNC password; run ‘man vncpasswd’ to see how</li>
<li># to do that.</li>
<li>#</li>
<li># DO NOT RUN THIS SERVICE if your local area network is</li>
<li># untrusted! For a secure way of using VNC, see</li>
<li># .</li>
<li>&nbsp;</li>
<li># Use “-nolisten tcp” to prevent X connections to your VNC server via TCP.</li>
<li>&nbsp;</li>
<li># Use “-nohttpd” to prevent web-based VNC clients connecting.</li>
<li>&nbsp;</li>
<li># Use “-localhost” to prevent remote VNC clients connecting except when</li>
<li># doing so through a secure tunnel. See the “-via” option in the</li>
<li># `man vncviewer’ manual page.</li>
<li>&nbsp;</li>
<li># VNCSERVERS=”2:myusername”</li>
<li># VNCSERVERARGS[2]=”-geometry 800×600 -nolisten tcp -nohttpd -localhost”</li>
<li>&nbsp;</li>
<li>VNCSERVERS=”1:root”添加的</li>
<li>VNCSERVERARGS[2]=”-geometry 800×600″添加的</li></ol></div>
<p>运行vncserver,首次运行会创建xstartup<br />
vi /root.vnc/xstartup<br />
 
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">#!/bin/sh</li>
<li># Uncomment the following two lines for normal desktop:</li>
<li># unset SESSION_MANAGER</li>
<li># exec /etc/X11/xinit/xinitrc</li>
<li>&nbsp;</li>
<li>[ -x /etc/vnc/xstartup ] &amp;amp;&amp;amp; exec /etc/vnc/xstartup</li>
<li>[ -r $HOME/.Xresources ] &amp;amp;&amp;amp; xrdb $HOME/.Xresources</li>
<li>xsetroot -solid grey</li>
<li>vncconfig -iconic &amp;amp;</li>
<li>xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &amp;amp;</li>
<li>#twm &amp;amp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 注释这条</li>
<li>exec gnome-session 添加这条</li></ol></div>
<p>连接的IP 192.168.18.211:1   。。注意后面的  :1</p>
]]></content:encoded>
			<wfw:commentRss>http://www.viyin.net/2010/03/centos-5vncserver.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CentOS5.4系统yum update后无service、ntsysv、chkconfig命令解决</title>
		<link>http://www.viyin.net/2010/01/centos-yum-command.html</link>
		<comments>http://www.viyin.net/2010/01/centos-yum-command.html#comments</comments>
		<pubDate>Thu, 28 Jan 2010 05:19:00 +0000</pubDate>
		<dc:creator>vi</dc:creator>
				<category><![CDATA[√linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[path]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.viyin.net/?p=630</guid>
		<description><![CDATA[在CentOS5.4新系统yum update后无service、ntsysv、chkconfig命令，提示command not found。 解决方法： 先在命令行中输入 export PATH=$PATH:/usr/sbin:/sbin 这样你可以临时恢复环境变量设置。 vi /etc/profile  更改]]></description>
			<content:encoded><![CDATA[<p>在CentOS5.4新系统yum update后无service、ntsysv、chkconfig命令，提示command not found。</p>
<p>解决方法：<br />
先在命令行中输入<br />
export <a href="http://www.viyin.net/tag/path" class="st_tag internal_tag" rel="tag" title="标签 path 下的日志">PATH</a>=$<a href="http://www.viyin.net/tag/path" class="st_tag internal_tag" rel="tag" title="标签 path 下的日志">PATH</a>:/usr/sbin:/sbin<br />
这样你可以临时恢复环境变量设置。</p>
<p>vi /etc/profile  更改</p>
]]></content:encoded>
			<wfw:commentRss>http://www.viyin.net/2010/01/centos-yum-command.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>win2003 PXE 安装 centos 5.4</title>
		<link>http://www.viyin.net/2010/01/win2003-pxe-centos.html</link>
		<comments>http://www.viyin.net/2010/01/win2003-pxe-centos.html#comments</comments>
		<pubDate>Fri, 22 Jan 2010 08:06:46 +0000</pubDate>
		<dc:creator>vi</dc:creator>
				<category><![CDATA[√linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[pxe]]></category>
		<category><![CDATA[tftpd32]]></category>
		<category><![CDATA[网络安装]]></category>

		<guid isPermaLink="false">http://www.viyin.net/?p=610</guid>
		<description><![CDATA[前两天去了趟机房，事先不知道机房是那么的烂，USB光驱都没有，要重装系统的又是HP小机，拆了机箱，也没有IDE接口。尴尬而返。 转载请注明！ 所需软件： 1. centos 5.4 ISO 2. tftpd32 下载地址  http://tftpd32.jounin.net/tftpd32_download.html  3. http file server (hfs) 下载地址   http://www.rejetto.com/hfs/?f=dl  4. pxelinux.0 文件 /usr/lib/syslinux/pxelinux.0，pxelinux.0一定是要匹配的版本，不同版本的linux是无法使用的。 安装： 1. ISO文件解压，把\images\pxeboot下的vmlinuz、initrd.img两个文件拷贝到pxe目录下 2. pxe 目录下载创建pxelinux.cfg目录 3. ISO文件解压，把\isolinux下的isolinux.cfg文件拷贝到pxe\pxelinux.cfg目录下，并重命为default 4  配置tftpd32(如图) 配置HFS  右击选择“Add folder from disk”指向 PXE安装CENTOS 选择http方式安装，，，填入192.168.1.244:8080   目录/I%3A 引导完成。   参考：http://whr25.blog.sohu.com/130100516.html]]></description>
			<content:encoded><![CDATA[<p>前两天去了趟机房，事先不知道机房是那么的烂，USB光驱都没有，要重装系统的又是HP小机，拆了机箱，也没有IDE接口。尴尬而返。</p>
<p><span style="color: #ff0000;">转载请注明！</span></p>
<p>所需软件：</p>
<p>1. <a href="http://www.viyin.net/tag/centos" class="st_tag internal_tag" rel="tag" title="标签 centos 下的日志">centos</a> 5.4 ISO</p>
<p>2. <a href="http://www.viyin.net/tag/tftpd32" class="st_tag internal_tag" rel="tag" title="标签 tftpd32 下的日志">tftpd32</a> 下载地址  http://<a href="http://www.viyin.net/tag/tftpd32" class="st_tag internal_tag" rel="tag" title="标签 tftpd32 下的日志">tftpd32</a>.jounin.net/<a href="http://www.viyin.net/tag/tftpd32" class="st_tag internal_tag" rel="tag" title="标签 tftpd32 下的日志">tftpd32</a>_download.html </p>
<p>3. http file server (hfs) 下载地址   http://www.rejetto.com/hfs/?f=dl </p>
<p>4. pxelinux.0 文件</p>
<p>/usr/lib/syslinux/pxelinux.0，<strong>pxelinux.0一定是要匹配的版本，不同版本的linux是无法使用的。</strong></p>
<p><strong>安装：</strong></p>
<p>1. ISO文件解压，把\images\pxeboot下的vmlinuz、initrd.img两个文件拷贝到pxe目录下</p>
<p>2. <a href="http://www.viyin.net/tag/pxe" class="st_tag internal_tag" rel="tag" title="标签 pxe 下的日志">pxe</a> 目录下载创建pxelinux.cfg目录</p>
<p>3. ISO文件解压，把\isolinux下的isolinux.cfg文件拷贝到pxe\pxelinux.cfg目录下，并重命为<span style="color: #000000;">default</span></p>
<p><span style="color: #000000;">4  配置tftpd32(如图)</span></p>
<p><span style="color: #000000;"><span id="more-610"></span></span></p>
<p><span style="color: #000000;"><a href="http://www.viyin.net/wp-content/uploads/2010/01/c36.jpg"><img class="alignnone size-full wp-image-611" title="c36" src="http://www.viyin.net/wp-content/uploads/2010/01/c36.jpg" alt="" width="446" height="474" /></a></span></p>
<p><span style="color: #000000;"><a href="http://www.viyin.net/wp-content/uploads/2010/01/223.jpg"><img class="alignnone size-full wp-image-612" title="223" src="http://www.viyin.net/wp-content/uploads/2010/01/223.jpg" alt="" width="363" height="530" /></a></span></p>
<p><span style="color: #000000;"><a href="http://www.viyin.net/wp-content/uploads/2010/01/ccc.jpg"><img class="alignnone size-medium wp-image-619" title="ccc" src="http://www.viyin.net/wp-content/uploads/2010/01/ccc-300x157.jpg" alt="" width="300" height="157" /></a></span></p>
<p><span style="color: #000000;">配置HFS </span></p>
<p><span style="color: #000000;"><a href="http://www.viyin.net/wp-content/uploads/2010/01/56.jpg"><img title="56" src="http://www.viyin.net/wp-content/uploads/2010/01/56-300x147.jpg" alt="" width="300" height="147" /></a></span></p>
<p><span style="color: #000000;"><a href="http://www.viyin.net/wp-content/uploads/2010/01/8080.jpg"><img class="alignnone size-medium wp-image-614" title="8080" src="http://www.viyin.net/wp-content/uploads/2010/01/8080-228x300.jpg" alt="" width="228" height="300" /></a></span></p>
<p><span style="color: #000000;">右击选择“Add folder from disk”指向</span></p>
<p><span style="color: #000000;">PXE安装CENTOS</span></p>
<p><span style="color: #000000;"><a href="http://www.viyin.net/wp-content/uploads/2010/01/vir.jpg"><img class="alignnone size-medium wp-image-615" title="vir" src="http://www.viyin.net/wp-content/uploads/2010/01/vir-300x190.jpg" alt="" width="300" height="190" /></a></span></p>
<p><span style="color: #000000;">选择http方式安装，，，填入192.168.1.244:8080   目录/I%3A</span></p>
<p><span style="color: #000000;">引导完成。</span></p>
<p><span style="color: #000000;"> </span></p>
<p><span style="color: #000000;">参考：<a href="http://whr25.blog.sohu.com/130100516.html">http://whr25.blog.sohu.com/130100516.html</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.viyin.net/2010/01/win2003-pxe-centos.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>centos 5.2 pptpd vpn搭建</title>
		<link>http://www.viyin.net/2009/11/centos-pptpd-vpn.html</link>
		<comments>http://www.viyin.net/2009/11/centos-pptpd-vpn.html#comments</comments>
		<pubDate>Fri, 13 Nov 2009 06:43:59 +0000</pubDate>
		<dc:creator>vi</dc:creator>
				<category><![CDATA[√linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[pptpd]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://www.viyin.net/?p=510</guid>
		<description><![CDATA[在郁闷的时间搭了一个VPN。有兴趣的朋友可以上去试下。 IP 222.186.31.123 用户名vi 密码 viyin.net 用XP自动的拨号程序就可以了。 VPN的英文全称是“Virtual Private Network”，翻译过来就是“虚拟专用网络”。顾名思义，虚拟专用网络我们可以把它理解成是虚拟出来的企业内部专线。它可以通过特殊的加密的通讯协议在连接在Internet上的位于不同地方的两个或多个企业内部网之间建立一条专有的通讯线路，就好比是架设了一条专线一样，但是它并不需要真正的去铺设光缆之类的物理线路。这就好比去电信局申请专线，但是不用给铺设线路的费用，也不用购买路由器等硬件设备。VPN技术原是路由器具有的重要技术之一，目前在交换机，防火墙设备或Windows 2000等软件里也都支持VPN功能，一句话，VPN的核心就是在利用公共网络建立虚拟私有网。 　　虚拟专用网（VPN）被定义为通过一个公用网络（通常是因特网）建立一个临时的、安全的连接，是一条穿过混乱的公用网络的安全、稳定的隧道。虚拟专用网是对企业内部网的扩展。虚拟专用网可以帮助远程用户、公司分支机构、商业伙伴及供应商同公司的内部网建立可信的安全连接，并保证数据的安全传输。虚拟专用网可用于不断增长的移动用户的全球因特网接入，以实现安全连接；可用于实现企业网站之间安全通信的虚拟专用线路，用于经济有效地连接到商业伙伴和用户的安全外联网虚拟专用网。 PPTP 全称为 Point to Point Tunneling Protocol &#8212; 点到点隧道协议，是VPN协议中的一种。 安装相关软件 yum install -y ppp iptables wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-1.rhel5.1.i386.rpm rpm -ivh pptpd-1.3.4-1.rhel5.1.i386.rpm 配置文件/etc/ppp/options.pptpd mv /etc/ppp/options.pptpd /etc/ppp/options.pptpd.bak vi /etc/ppp/options.pptpd 输入以下内容： #相当于身份验证时的域，一定要和/etc/ppp/chap-secrets中的内容对应 name pptpd #传输加密。ppp-2.4.2以上的版本只支持MPPE加密，内核模块为 ppp_mppe.o #拒绝pap,chap身份验证 refuse-pap refuse-chap #拒绝mschap身份验证 &#60;span id=&#34;more-510&#34;&#62;&#60;/span&#62; refuse-mschap #采用mschap-v2（Microsoft Challenge Handshake Authentication [...]]]></description>
			<content:encoded><![CDATA[<p>在郁闷的时间搭了一个VPN。有兴趣的朋友可以上去试下。<br />
IP 222.186.31.123<br />
用户名vi 密码 <a href="http://www.viyin.net/tag/viyin-net" class="st_tag internal_tag" rel="tag" title="标签 viyin.net 下的日志">viyin.net</a><br />
用XP自动的拨号程序就可以了。<br />
<strong>VPN的英文全称是“Virtual Private Network”，翻译过来就是“虚拟专用网络”。顾名思义，虚拟专用网络我们可以把它理解成是虚拟出来的企业内部专线。</strong>它可以通过特殊的加密的通讯协议在连接在Internet上的位于不同地方的两个或多个企业内部网之间建立一条专有的通讯线路，就好比是架设了一条专线一样，但是它并不需要真正的去铺设光缆之类的物理线路。这就好比去电信局申请专线，但是不用给铺设线路的费用，也不用购买路由器等硬件设备。VPN技术原是路由器具有的重要技术之一，目前在交换机，防火墙设备或Windows 2000等软件里也都支持VPN功能，一句话，VPN的核心就是在利用公共网络建立虚拟私有网。<br />
　　<strong>虚拟专用网（<a href="http://www.viyin.net/tag/vpn" class="st_tag internal_tag" rel="tag" title="标签 vpn 下的日志">VPN</a>）被定义为通过一个公用网络（通常是因特网）建立一个临时的、安全的连接，是一条穿过混乱的公用网络的安全、稳定的隧道。</strong>虚拟专用网是对企业内部网的扩展。虚拟专用网可以帮助远程用户、公司分支机构、商业伙伴及供应商同公司的内部网建立可信的安全连接，并保证数据的安全传输。虚拟专用网可用于不断增长的移动用户的全球因特网接入，以实现安全连接；可用于实现企业网站之间安全通信的虚拟专用线路，用于经济有效地连接到商业伙伴和用户的安全外联网虚拟专用网。</p>
<p>PPTP 全称为 Point to Point Tunneling Protocol &#8212; 点到点隧道协议，是VPN协议中的一种。</p>
<p>安装相关软件</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">yum install -y ppp iptables</li>
<li>wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-1.rhel5.1.i386.rpm</li>
<li>rpm -ivh pptpd-1.3.4-1.rhel5.1.i386.rpm</li></ol></div>
<p>配置文件/etc/ppp/options.<a href="http://www.viyin.net/tag/pptpd" class="st_tag internal_tag" rel="tag" title="标签 pptpd 下的日志">pptpd</a></p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">mv /etc/ppp/options.pptpd /etc/ppp/options.pptpd.bak</li>
<li>vi /etc/ppp/options.pptpd</li></ol></div>
<p>输入以下内容：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">#相当于身份验证时的域，一定要和/etc/ppp/chap-secrets中的内容对应</li>
<li>name pptpd</li>
<li>#传输加密。ppp-2.4.2以上的版本只支持MPPE加密，内核模块为 ppp_mppe.o </li>
<li>#拒绝pap,chap身份验证 </li>
<li>refuse-pap</li>
<li>refuse-chap</li>
<li>#拒绝mschap身份验证 </li>
<li>&lt;span id=&quot;more-510&quot;&gt;&lt;/span&gt;</li>
<li>refuse-mschap</li>
<li>#采用mschap-v2（Microsoft Challenge Handshake Authentication Protocol, Version 2）身份验证方式 </li>
<li>require-mschap-v2</li>
<li>#在采用mschap-v2身份验证方式时要使用MPPE进行加密</li>
<li>require-mppe-128</li>
<li>#启动ARP代理</li>
<li>proxyarp</li>
<li>lock</li>
<li>nobsdcomp</li>
<li>novj</li>
<li>novjccomp</li>
<li>nologfd</li>
<li>#分配给客户的DNS，这里用的是opendns</li>
<li>ms-dns 208.67.222.222</li>
<li>ms-dns 208.67.220.220</li></ol></div>
<p>配置文件/etc/ppp/chap-secrets</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">mv /etc/ppp/chap-secrets /etc/ppp/chap-secrets.bak</li>
<li>vi /etc/ppp/chap-secrets</li></ol></div>
<p>输入以下内容</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"># Secrets for authentication using CHAP</li>
<li># client&nbsp; &nbsp; &nbsp; &nbsp; server&nbsp; secret&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IP addresses</li>
<li>vi&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pptpd&nbsp; viyin.net&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*</li></ol></div>
<p>用户名vi,密码viyin.net ，*表示任意ip<br />
pptpd要和/etc/ppp/options.pptpd中的name 部分的pptpd匹配</p>
<p>配置文件/etc/pptpd.conf</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">mv /etc/pptpd.conf /etc/pptpd.conf.bak</li>
<li>vi /etc/pptpd.conf</li></ol></div>
<p>　　输入以下内容：</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">option /etc/ppp/options.pptpd</li>
<li>logwtmp</li>
<li>localip 10.100.1.1</li>
<li>remoteip 10.100.1.20-50</li></ol></div>
<p>为拨入VPN的用户动态分配IP</p>
<p>打开防火墙端口<br />
1723端口和47端口打开，打开GRE协议
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">/sbin/iptables -A INPUT -p tcp --dport 1723 -j ACCEPT</li>
<li>/sbin/iptables -A INPUT -p tcp --dport 47 -j ACCEPT</li>
<li>/sbin/iptables -A INPUT -p gre -j ACCEPT</li>
<li>/sbin/iptables&nbsp; -A POSTROUTING -t nat -s 10.100.1.0/24 -o seth0 -j MASQUERADE</li></ol></div>
<p>配置文件/etc/sysctl.conf </p>
<p>vi /etc/sysctl.conf<br />
 修改以下内容：</p>
<p>net.ipv4.ip_forward = 1<br />
开启NAT转发功能</p>
<p>　　保存、退出后执行：</p>
<p>/sbin/sysctl -p</p>
<p>启动PPTP VPN 服务器端：</p>
<p>/sbin/service pptpd start</p>
<p>检查PPP是否支持MPPE，用以下命令检查PPP是否支持MPPE：<br />
　　</p>
<p>strings &#8216;/usr/sbin/pppd&#8217; |grep -i mppe | wc &#8211;lines</p>
<p>果以上命令输出为“0”则表示不支持；输出为“30”或更大的数字就表示支持。</p>
<p>注意：</p>
<p>如果一直提示619或者800错误,查看日志</p>
]]></content:encoded>
			<wfw:commentRss>http://www.viyin.net/2009/11/centos-pptpd-vpn.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>无光驱windows下硬盘安装linux</title>
		<link>http://www.viyin.net/2009/08/none-cdroom-linux-windows-setup.html</link>
		<comments>http://www.viyin.net/2009/08/none-cdroom-linux-windows-setup.html#comments</comments>
		<pubDate>Wed, 19 Aug 2009 12:02:25 +0000</pubDate>
		<dc:creator>vi</dc:creator>
				<category><![CDATA[√linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[无光驱]]></category>
		<category><![CDATA[硬盘安装]]></category>

		<guid isPermaLink="false">http://www.viyin.net/?p=387</guid>
		<description><![CDATA[无光驱windows下硬盘安装linux 所需软件grub for dos ，平台 windows 2003 server ，centos 5.3 镜像。 1.在windows 2003 上腾出最后一个盘，安装centos。 2.把下载的CentOS镜像文件放在Fat32 格式的任何一个盘。 3.解压到C盘根目录，解压CentOS第一个镜像中isolinux文件夹到C盘根目录。。 4.打开c:\boot.ini在文件最后加入 c:\grldr=”CentOS for ViYin” 5.修改c:\menu.lst内容入下： title CentOS for ViYin kernel (hd0,0)/isolinux/vmlinuz initrd (hd0,0)/isolinux/initrd.img 重启系统在启动项中选择CentOS for ViYin项则进入安装程序。之后就是Linux安装，在系统分区的地方要注意一定要选择“未分区磁盘空间安装”不要把所有磁盘空间格式化。 同样的支持redhat ,freebsd ,solaris等安装。 centos 5.3 下载地址： http://ftp.isu.edu.tw/pub/Linux/CentOS/5.3/isos/i386 台湾义守大学centos镜像]]></description>
			<content:encoded><![CDATA[<p>无光驱windows下硬盘安装linux<br />
所需软件grub for dos ，平台 windows 2003 server ，<a href="http://www.viyin.net/tag/centos" class="st_tag internal_tag" rel="tag" title="标签 centos 下的日志">centos</a> 5.3 镜像。<br />
1.在windows 2003 上腾出最后一个盘，安装centos。</p>
<p>2.把下载的CentOS镜像文件放在Fat32 格式的任何一个盘。<br />
3.解压到C盘根目录，解压CentOS第一个镜像中isolinux文件夹到C盘根目录。。<br />
4.打开c:\boot.ini在文件最后加入 c:\grldr=”CentOS for <a href="http://www.viyin.net/tag/viyin" class="st_tag internal_tag" rel="tag" title="标签 viyin 下的日志">ViYin</a>”<br />
5.修改c:\menu.lst内容入下：</p>
<p>title CentOS for ViYin<br />
kernel (hd0,0)/isolinux/vmlinuz<br />
initrd (hd0,0)/isolinux/initrd.img<br />
重启系统在启动项中选择CentOS for ViYin项则进入安装程序。之后就是Linux安装，在系统分区的地方要注意一定要选择“未分区磁盘空间安装”不要把所有磁盘空间格式化。</p>
<p>同样的支持redhat ,freebsd ,solaris等安装。</p>
<p>centos 5.3 下载地址：</p>
<p>http://ftp.isu.edu.tw/pub/Linux/CentOS/5.3/isos/i386</p>
<p>台湾义守大学centos镜像</p>
]]></content:encoded>
			<wfw:commentRss>http://www.viyin.net/2009/08/none-cdroom-linux-windows-setup.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux下cacti完整安装指南</title>
		<link>http://www.viyin.net/2009/08/linux-cacti-setup.html</link>
		<comments>http://www.viyin.net/2009/08/linux-cacti-setup.html#comments</comments>
		<pubDate>Wed, 12 Aug 2009 02:24:52 +0000</pubDate>
		<dc:creator>vi</dc:creator>
				<category><![CDATA[√linux]]></category>
		<category><![CDATA[cacti]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[rrdtool]]></category>
		<category><![CDATA[snmp]]></category>
		<category><![CDATA[流量]]></category>
		<category><![CDATA[监控]]></category>

		<guid isPermaLink="false">http://www.viyin.net/?p=362</guid>
		<description><![CDATA[初衷： 网上的cacti教程不够全面。vi看了多篇。郁闷了许久。才安装成功。 写此文目的，为自己做个备忘，为后来者做为参考，共同进步。如有误，欢迎指导。 环境：Centos 5.3 Cacti 0.8.7e mysql 5.1.36 apache2.2.3 php 5.2.10 net-snmp 5.3.2.2 一、安装步骤： 1.基本需求：   1).先必须安装LAMP （参见另一篇博文） 2)安装libart_lgpl ,libart_lgpl-devel 2.依次安装net-snmp,rrdtool,cacti 1). [root@vi ~]#yum -y install net-snmp* #如果php之前不支持snmp,必须安装php-snmp 编辑/etc/snmp/snmpd.conf 编辑以下几项： 查找 #sec.name source community com2sec notConfiUser default public 改为 com2sec notConfigUser 127.0.0.1 public 查找 #### # Finally, grant the group read-only access to the systemview [...]]]></description>
			<content:encoded><![CDATA[<p>初衷：</p>
<p>网上的cacti教程不够全面。vi看了多篇。郁闷了许久。才安装成功。</p>
<p>写此文目的，为自己做个备忘，为后来者做为参考，共同进步。如有误，欢迎指导。</p>
<p>环境：<a href="http://www.viyin.net/tag/centos" class="st_tag internal_tag" rel="tag" title="标签 centos 下的日志">Centos</a> 5.3 <a href="http://www.viyin.net/tag/cacti" class="st_tag internal_tag" rel="tag" title="标签 cacti 下的日志">Cacti</a> 0.8.7e<br />
mysql 5.1.36 apache2.2.3 php 5.2.10 net-<a href="http://www.viyin.net/tag/snmp" class="st_tag internal_tag" rel="tag" title="标签 snmp 下的日志">snmp</a> 5.3.2.2</p>
<p>一、安装步骤：</p>
<p>1.基本需求：<br />
 <br />
1).先必须安装LAMP （参见另一篇博文）</p>
<p>2)安装libart_lgpl ,libart_lgpl-devel</p>
<p>2.依次安装net-snmp,<a href="http://www.viyin.net/tag/rrdtool" class="st_tag internal_tag" rel="tag" title="标签 rrdtool 下的日志">rrdtool</a>,cacti</p>
<p><span id="more-362"></span></p>
<p>1). [root@vi ~]#<a href="http://www.viyin.net/tag/yum" class="st_tag internal_tag" rel="tag" title="标签 yum 下的日志">yum</a> -y install net-snmp*<br />
#如果php之前不支持snmp,必须安装php-snmp<br />
编辑/etc/snmp/snmpd.conf 编辑以下几项：<br />
查找<br />
#sec.name source community<br />
com2sec notConfiUser default public 改为 com2sec notConfigUser 127.0.0.1 public<br />
查找</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">####</li>
<li># Finally, grant the group read-only access to the systemview view.</li>
<li># group context sec.model sec.level prefix read write notif</li>
<li>access notConfigGroup “” any noauth exact systemview none none</li></ol></div>
<p>将”read”字段改为all.<br />
代码:<br />
#access notConfigGroup “” any noauth exact all none none<br />
查找<br />
## incl/excl subtree mask<br />
#view all included .1 80<br />
去掉view前面的#<br />
查找</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">#       name           incl/excl     subtree         mask(optional)</li>
<li>#view   systemview      included        .1</li>
<li>view    systemview    included   .1.3.6.1.2.1.1</li>
<li>view    systemview    included   .1.3.6.1.2.1.25.1.1</li></ol></div>
<p>将下面两个view前#去掉<br />
启动snmpd服务：/etc/init.d/snmpd start</p>
<p><span style="color: #ff0000;">验证SNMP是否配置正确，可用以下命令：</span></p>
<p><span style="color: #ff0000;">[root@vi ~]# snmpwalk -v 2c -c vivivi 127.0.0.1 if</span></p>
<p><span style="color: #000000;">如果返回以下字段，既成功：</span></p>
<p><span style="color: #000000;"></p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline">IF-MIB::ifIndex.1 = INTEGER: 1</li>
<li>IF-MIB::ifIndex.2 = INTEGER: 2</li>
<li>IF-MIB::ifIndex.3 = INTEGER: 3</li>
<li>IF-MIB::ifDescr.1 = STRING: lo</li>
<li>IF-MIB::ifDescr.2 = STRING: eth0</li>
<li>IF-MIB::ifDescr.3 = STRING: sit0</li>
<li>IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)</li>
<li>IF-MIB::ifType.2 = INTEGER: ethernetCsmacd(6)</li>
<li>IF-MIB::ifType.3 = INTEGER: tunnel(131)</li>
<li>IF-MIB::ifMtu.1 = INTEGER: 16436</li>
<li>IF-MIB::ifMtu.2 = INTEGER: 1500</li>
<li>IF-MIB::ifMtu.3 = INTEGER: 1480</li>
<li>IF-MIB::ifSpeed.1 = Gauge32: 10000000</li>
<li>IF-MIB::ifSpeed.2 = Gauge32: 1000000000</li>
<li>IF-MIB::ifSpeed.3 = Gauge32: 0</li>
<li>IF-MIB::ifPhysAddress.1 = STRING:</li>
<li>IF-MIB::ifPhysAddress.2 = STRING: 0:c:29:4d:ea:47</li>
<li>IF-MIB::ifPhysAddress.3 = STRING:</li>
<li>IF-MIB::ifAdminStatus.1 = INTEGER: up(1)</li>
<li>IF-MIB::ifAdminStatus.2 = INTEGER: up(1)</li>
<li>IF-MIB::ifAdminStatus.3 = INTEGER: down(2)</li>
<li>IF-MIB::ifOperStatus.1 = INTEGER: up(1)</li>
<li>IF-MIB::ifOperStatus.2 = INTEGER: up(1)</li>
<li>IF-MIB::ifOperStatus.3 = INTEGER: down(2)</li>
<li>IF-MIB::ifLastChange.1 = Timeticks: (0) 0:00:00.00</li>
<li>IF-MIB::ifLastChange.2 = Timeticks: (0) 0:00:00.00</li>
<li>IF-MIB::ifLastChange.3 = Timeticks: (0) 0:00:00.00</li>
<li>IF-MIB::ifInOctets.1 = Counter32: 213202822</li>
<li>IF-MIB::ifInOctets.2 = Counter32: 3312338633</li>
<li>IF-MIB::ifInOctets.3 = Counter32: 0</li>
<li>IF-MIB::ifInUcastPkts.1 = Counter32: 1874738</li>
<li>IF-MIB::ifInUcastPkts.2 = Counter32: 33706098</li>
<li>IF-MIB::ifInUcastPkts.3 = Counter32: 0</li>
<li>IF-MIB::ifInNUcastPkts.1 = Counter32: 0</li>
<li>IF-MIB::ifInNUcastPkts.2 = Counter32: 0</li>
<li>IF-MIB::ifInNUcastPkts.3 = Counter32: 0</li>
<li>IF-MIB::ifInDiscards.1 = Counter32: 0</li>
<li>IF-MIB::ifInDiscards.2 = Counter32: 0</li>
<li>IF-MIB::ifInDiscards.3 = Counter32: 0</li>
<li>IF-MIB::ifInErrors.1 = Counter32: 0</li>
<li>IF-MIB::ifInErrors.2 = Counter32: 0</li>
<li>IF-MIB::ifInErrors.3 = Counter32: 0</li>
<li>IF-MIB::ifInUnknownProtos.1 = Counter32: 0</li>
<li>IF-MIB::ifInUnknownProtos.2 = Counter32: 0</li>
<li>IF-MIB::ifInUnknownProtos.3 = Counter32: 0</li>
<li>IF-MIB::ifOutOctets.1 = Counter32: 213202822</li>
<li>IF-MIB::ifOutOctets.2 = Counter32: 571095627</li>
<li>IF-MIB::ifOutOctets.3 = Counter32: 0</li>
<li>IF-MIB::ifOutUcastPkts.1 = Counter32: 1874738</li>
<li>IF-MIB::ifOutUcastPkts.2 = Counter32: 36540389</li>
<li>IF-MIB::ifOutUcastPkts.3 = Counter32: 0</li>
<li>IF-MIB::ifOutNUcastPkts.1 = Counter32: 0</li>
<li>IF-MIB::ifOutNUcastPkts.2 = Counter32: 0</li>
<li>IF-MIB::ifOutNUcastPkts.3 = Counter32: 0</li>
<li>IF-MIB::ifOutDiscards.1 = Counter32: 0</li>
<li>IF-MIB::ifOutDiscards.2 = Counter32: 0</li>
<li>IF-MIB::ifOutDiscards.3 = Counter32: 0</li>
<li>IF-MIB::ifOutErrors.1 = Counter32: 0</li>
<li>IF-MIB::ifOutErrors.2 = Counter32: 0</li>
<li>IF-MIB::ifOutErrors.3 = Counter32: 0</li>
<li>IF-MIB::ifOutQLen.1 = Gauge32: 0</li>
<li>IF-MIB::ifOutQLen.2 = Gauge32: 0</li>
<li>IF-MIB::ifOutQLen.3 = Gauge32: 0</li>
<li>IF-MIB::ifSpecific.1 = OID: SNMPv2-SMI::zeroDotZero</li>
<li>IF-MIB::ifSpecific.2 = OID: SNMPv2-SMI::zeroDotZero</li>
<li>IF-MIB::ifSpecific.3 = OID: SNMPv2-SMI::zeroDotZero&lt;/span&gt;</li></ol></div>
<p><span style="color: #000000;">不成功的提示如下：</span></p>
<p><span style="color: #ff0000;">Timeout: No Response from 127.0.0.1</span></p>
<p><span style="color: #ff0000;">这时要查看SNMP是否配置正确。 是否正确设置 community</span></p>
<p>2).安装rrdtool<br />
[root@vi ~]# wget <a href="http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.30.tar.gz">http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.30.tar.gz</a><br />
[root@vi ~]# tar zxvf rrd rrdtool-1.2.30.tar.gz<br />
[root@vi ~]# cd rrdtool-1.2.30<br />
[root@vi ~]# ./configure –prefix=/usr/local/rrdtool<br />
[root@vi ~]# make<br />
[root@vi ~]# make install</p>
<p>3).配置mysql,导入脚本<br />
[root@vi ~]# useradd -p cacti -s /sbin/bash cacti<br />
#增加一个用于执行监控的用户cacti<br />
[root@vi ~]# mysqladmin -uroot -p create cacti<br />
#在mysql里增加用户cacti<br />
[root@vi ~]#grant all on cacti.* to <a href="mailto:cacti@localhost">cacti@localhost</a> identified by ‘<a href="http://www.viyin.net/tag/viyin-net" class="st_tag internal_tag" rel="tag" title="标签 viyin.net 下的日志">viyin.net</a>’;<br />
#赋予cacti用户对数据库cacti有全部权限，并且设置密码为viyin.net<br />
[root@vi ~]# flush privileges;<br />
[root@vi ~]# mysql -uroot -p cacti &lt; cacti.sql<br />
#导入脚本文件cacti.sql,这步操作必须在cacti解压缩后的目录上执行，不然可能找不到该文件</p>
<p>4).安装cacti<br />
[root@vi ~]# wget <a href="http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz">http://www.cacti.net/downloads/cacti-0.8.7e.tar.gz</a><br />
[root@vi ~]# tar zxvf cacti-0.8.7e.tar.gz<br />
[root@vi ~]#mv cacti-.8.7e /www/viyinnet/cacti<br />
[root@vi ~]# cd /www/viyinnet/cacti<br />
[root@vi ~]# vi ./include/config.php  <span style="color: #ff0000;">编辑数据库配置文件</span><br />
$database_default = “cacti”;<br />
$database_hostname = “localhost”;<br />
$database_username = “cacti”;<br />
$database_password = “cacti”;<br />
[root@vi ~]#chown -R cacti /www/viyinnet/cacti <span style="color: #ff0000;">改变目录所有者</span></p>
<p>[root@vi ~]#chmod -R 777 /www/viyinnet/cacti   <span style="color: #ff0000;">设置权限</span></p>
<p>5).打开IE，输入<a href="http://10.155.30.64/cacti/">http://你的域名或IP/cacti/</a>  自动转向安装页面,填写路径，如果出现打不开，肯定是路径不对，安装完成后，默认后台管理员用户名和密码都是admin,输入后需要立即修改密码。</p>
<p>6).设置自动获取数据<br />
[root@vi ~]# crontab -u cacti -e<br />
*/5 * * * * <span style="color: #ff0000;">/usr/local/php/bin/php</span> /www/web/viyinnet/cacti/poller.php &gt; /dev/null 2&gt;&amp;1</p>
<p>注意红色字体部份。路径要完整。是php的二进制路径。</p>
<p>写入crtontab 作用是每5分钟生成一次图表。</p>
<p>7).登陆<a href="http://10.155.30.64/cacti">http://IP/cacti</a>进行配置<br />
到目前为止安装已经完成！</p>
<p>二、配置监控设备</p>
<p>1. 监控本机<br />
打开后台console-devices-add-:<br />
Description 写localhost,Hostname是本机IP，Host Template 选择Local Linux Machine,其他默认<br />
然后建立图形，选择Create Graphs for this Host：<br />
勾选Graph Templates 下面所有项，选择create<br />
选择Management–Graph Management 添加模板以及选择主机<br />
然后再Management–Graph Trees 里添加服务器</p>
<p>2.监控远程linux主机</p>
<p>必须先开启远程主机snmpd服务<br />
打开后台console-devices-add-:<br />
Description 写远程主机名,Hostname是远程主机IP，Host Template 选择ucd/net SNMP host,snmp options–snmp version 选择v1,SNMP Community<br />
public,其他默认<br />
然后建立图形，选择Create Graphs for this Host：<br />
勾选Graph Templates 下面所有项，选择create<br />
选择Management–Graph Management 添加模板以及选择主机<br />
然后再Management–Graph Trees 里添加服务器<br />
也可以在官方论坛下载模板：<a href="http://forums.cacti.net/forum-12.html">http://forums.cacti.net/forum-12.html</a></p>
<p>3.监控windows 主机</p>
<p>其他都差不多，首先必须在windows 机器上安装snmp组件，并且将服务属性–安全–勾选“发送身份验证陷进”,团体名称为cacti服务器snmpd.confLi 里设置的public,权限为只读，另外在下面添加cacti主机IP</p>
<p>三、问题集锦</p>
<p>1.编译rrdtool时候出错：</p>
<p>configure: WARNING:<br />
—————————————————————————-<br />
* I found a copy of pkgconfig, but there is no libpng.pc file around.<br />
  You may want to set the PKG_CONFIG_<a href="http://www.viyin.net/tag/path" class="st_tag internal_tag" rel="tag" title="标签 path 下的日志">PATH</a> variable to point to its<br />
  location.<br />
—————————————————————————-</p>
<p>configure: WARNING:<br />
—————————————————————————-<br />
* I could not find a working copy of libpng. Check config.log for hints on why<br />
  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately<br />
  so that compiler and the linker can find libpng and its header files. If<br />
  you have not installed libpng, you can get it either from its original home on</p>
<p>     <a href="http://prdownloads.sourceforge.net/libpng/">http://prdownloads.sourceforge.net/libpng/</a></p>
<p>  You can find also find an archive copy on</p>
<p>     <a href="http://oss.oetiker.ch/rrdtool/pub/libs">http://oss.oetiker.ch/rrdtool/pub/libs</a></p>
<p>  The last tested version of libpng is 1.2.10.</p>
<p>       LIBS=-lz -lart_lgpl_2 -lm<br />
   LDFLAGS=<br />
  CPPFLAGS= -I/usr/include/libart-2.0</p>
<p>—————————————————————————-<br />
               <br />
checking for FT_Init_FreeType in -lfreetype… no<br />
checking for pkg-config… (cached) pkg-config<br />
configure: WARNING:<br />
—————————————————————————-<br />
* I found a copy of pkgconfig, but there is no freetype2.pc file around.<br />
  You may want to set the PKG_CONFIG_PATH variable to point to its<br />
  location.<br />
—————————————————————————-</p>
<p>configure: WARNING:<br />
—————————————————————————-<br />
* I could not find a working copy of freetype2. Check config.log for hints on why<br />
  this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately<br />
  so that compiler and the linker can find libfreetype and its header files. If<br />
  you have not installed freetype2, you can get it either from its original home on</p>
<p>     <a href="http://prdownloads.sourceforge.net/freetype/">http://prdownloads.sourceforge.net/freetype/</a></p>
<p>  You can find also find an archive copy on</p>
<p>     <a href="http://oss.oetiker.ch/rrdtool/pub/libs">http://oss.oetiker.ch/rrdtool/pub/libs</a></p>
<p>  The last tested version of freetype2 is 2.1.10.</p>
<p>       LIBS=-lz -lart_lgpl_2 -lm<br />
   LDFLAGS=<br />
  CPPFLAGS= -I/usr/include/libart-2.0 -I/usr/include/freetype2</p>
<p>—————————————————————————-<br />
               <br />
configure: error: Please fix the library issues listed above and try again.</p>
<p>解决：</p>
<p>将freetype2.pc libpng*.pc 拷贝到/usr/lib/pkgconfig 后正常，之前也有同样提示，是因为系统找不到这些*.pc文件，从/usr/lib/pkgconfig上将这些文件拷贝到rrd目录 /tmp/rrdbuild/lb/lib/pkgconfig</p>
<p><span style="color: #ff0000;">如果以上操作还不能正确编译，那换个低一点版本的rrtool,vi遇到的就是这样，后来换了个低版本。顺利解决。</span></p>
<p>2. 编译rrdtools提示：<br />
/usr/bin/ld: cannot find -lpng<br />
collect2: ld returned 1 exit status<br />
make[4]: *** [blib/arch/auto/RRDs/RRDs.so] Error 1<br />
make[4]: Leaving directory `/opt/rrdtool-1.2.30/bindings/perl-shared’<br />
make[3]: *** [perl_shared] Error 2<br />
make[3]: Leaving directory `/opt/rrdtool-1.2.30/bindings’<br />
make[2]: *** [all-recursive] Error 1<br />
make[2]: Leaving directory `/opt/rrdtool-1.2.30/bindings’<br />
make[1]: *** [all-recursive] Error 1<br />
make[1]: Leaving directory `/opt/rrdtool-1.2.30′<br />
make: *** [all] Error 2</p>
<p>解决：原来是libpng安装有问题，重新执行安装，并不要指定安装路径，然后重新make rrdtool即可！</p>
<p>3.mysql 启动失败</p>
<p>[root@centos ~]# tail /var/log/mysqld.log<br />
090709 14:42:20 [ERROR] Can’t start server: <a href="http://www.viyin.net/tag/bind" class="st_tag internal_tag" rel="tag" title="标签 bind 下的日志">Bind</a> on TCP/IP port: Cannot assign requested address<br />
090709 14:42:20 [ERROR] Do you already have another mysqld server running on port: 3306 ?<br />
090709 14:42:20 [ERROR] Aborting</p>
<p>090709 14:42:20  InnoDB: Starting shutdown…<br />
090709 14:42:22  InnoDB: Shutdown completed; log sequence number 0 168351<br />
090709 14:42:22 [Note] /usr/libexec/mysqld: Shutdown complete<br />
090709 14:42:22  mysqld ended</p>
<p>查看/etc/my.cnf</p>
<p>发现：bind-address = 10.155.30.1<br />
但是目前本机IP是10.155.30.64，将bind-address = 10.155.30.1注释掉或者将IP改为10.155.30.64后正常</p>
<p>4.设置字体路径：</p>
<p>后台–console–configure–settings–path-RRDTool Default Font Path<br />
/usr/local/rrdtool/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf</p>
<p>5.执行snmpwalk测试提示：Timeout: No Response from 127.0.0.1<br />
[root@centos rra]# snmpwalk -v 2c -c public 127.0.0.1 if<br />
Timeout: No Response from 127.0.0.1</p>
<p>解决：</p>
<p>/etc/snmp/snmpd.conf 设置问题，改为：com2sec notConfigUser  127.0.0.1       public</p>
<p>/etc/init.d/snmpd restart</p>
<p>6. 执行# snmpwalk -v 2c -c smallfish 127.0.0.1 if 提示：<br />
IF-MIB::ifTable = No Such Object available on this agent at this OID</p>
<p>解决：<br />
[root@vi ~]# vi /etc/snmp/snmpd.conf 找到：<br />
access  notConfigGroup “”      any       noauth    exact  systemview none none将 systemview 改为all</p>
<p>7.关注最多的，没有图的问题</p>
<p>首先必须确认rra下有*.rrd文件，如果没有，将rra,log权限设置为777，再过5分钟看看，一般设置5分钟自动执行获取数据<br />
或者直接执行执行： /usr/bin/php /var/www/html/cacti/poller.php 产生数据，也可以加参数 –force 强制生成数据</p>
<p>8. 有图没有数据，全部为nan</p>
<p>执行：/opt/rrdtool-1.2.30/src/rrdtool fetch test_proc_8.rrd AVERAGE 测试<br />
                           proc<br />
1247124900: nan<br />
1247125200: nan<br />
1247125500: nan<br />
1247125800: nan<br />
1247126100: nan<br />
1247126400: nan<br />
1247126700: nan<br />
1247127000: nan<br />
1247127300: nan<br />
1247127600: nan<br />
。。。 。。。<br />
先确定有rrd文件，权限都没问题，以及日志是否有错误提示，如果都没问题，可能是模板选择有问题，重新选择模板，另外关注后台console–devices–查看设备状态是否为Unknown</p>
<p>9.没有生成rrd文件</p>
<p>检查设备模板是否正常，以及设备状态(Status)是否为Unknown,正常显示为UP</p>
]]></content:encoded>
			<wfw:commentRss>http://www.viyin.net/2009/08/linux-cacti-setup.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

