??xml version="1.0" encoding="utf-8" standalone="yes"?>av一区和二区,丁香婷婷深情五月亚洲,91福利精品第一导航http://www.aygfsteel.com/dongbule/category/47198.html建造高性能门户|?/description>zh-cnTue, 04 Mar 2014 08:55:08 GMTTue, 04 Mar 2014 08:55:08 GMT60《maven介配|与U服搭徏?分nhttp://www.aygfsteel.com/dongbule/archive/2014/03/04/410574.html陈于?/dc:creator>陈于?/author>Tue, 04 Mar 2014 02:49:00 GMThttp://www.aygfsteel.com/dongbule/archive/2014/03/04/410574.htmlhttp://www.aygfsteel.com/dongbule/comments/410574.htmlhttp://www.aygfsteel.com/dongbule/archive/2014/03/04/410574.html#Feedback0http://www.aygfsteel.com/dongbule/comments/commentRss/410574.htmlhttp://www.aygfsteel.com/dongbule/services/trackbacks/410574.html前段旉部分目ҎmavenQƈ搭徏了nexusU服Q所以在l内做了一个关于maven的分享与培训Q下面是q次的ppt

http://www.aygfsteel.com/Files/dongbule/maven.zip


----------------------------------------

by 陈于?
QQ:34174409
Mail: dongbule@163.com


]]>
《mac os x选购与初步探索?的分?/title><link>http://www.aygfsteel.com/dongbule/archive/2014/02/23/410207.html</link><dc:creator>陈于?/dc:creator><author>陈于?/author><pubDate>Sun, 23 Feb 2014 04:54:00 GMT</pubDate><guid>http://www.aygfsteel.com/dongbule/archive/2014/02/23/410207.html</guid><wfw:comment>http://www.aygfsteel.com/dongbule/comments/410207.html</wfw:comment><comments>http://www.aygfsteel.com/dongbule/archive/2014/02/23/410207.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/dongbule/comments/commentRss/410207.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/dongbule/services/trackbacks/410207.html</trackback:ping><description><![CDATA[用macpȝ已经一q多了,周边同事也越来越多h开始用macQ所以在公司内部做了一ơmac选购和mac os xpȝ比较有技术细节的分nQ留?份ppt用于U念?br /><br />《mac的选购》对最常见的几个macg Q?macbook air,macbook pro,mac mini,imac q行Ҏ分析Q包括性能h和针对的应用分析<br /><a href="http://www.aygfsteel.com/Files/dongbule/mac%20(1).pptx.zip">《mac选购?/a> http://www.aygfsteel.com/Files/dongbule/mac%20(1).pptx.zip<br />在完成分享后Q以新增2个同事选购了macbook air  ^_^<br /><br />《mac os x》针对了mac的一些细节分析,Z么在05q以前苹果不能虚拟机和黑ҎQؓ什么在ҎҎx86pȝQ黑Ҏ横行Qmac在内存管理与win有何实质的不同,Q,Q等{?br /><a href="http://www.aygfsteel.com/Files/dongbule/mac%20os.zip">《mac os x?/a>http://www.aygfsteel.com/Files/dongbule/mac%20os.zip<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />----------------------------------------<img src ="http://www.aygfsteel.com/dongbule/aggbug/410207.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/dongbule/" target="_blank">陈于?/a> 2014-02-23 12:54 <a href="http://www.aygfsteel.com/dongbule/archive/2014/02/23/410207.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在debian安装nfs-server出现的bug处理http://www.aygfsteel.com/dongbule/archive/2011/04/06/347718.html陈于?/dc:creator>陈于?/author>Wed, 06 Apr 2011 09:13:00 GMThttp://www.aygfsteel.com/dongbule/archive/2011/04/06/347718.htmlhttp://www.aygfsteel.com/dongbule/comments/347718.htmlhttp://www.aygfsteel.com/dongbule/archive/2011/04/06/347718.html#Feedback1http://www.aygfsteel.com/dongbule/comments/commentRss/347718.htmlhttp://www.aygfsteel.com/dongbule/services/trackbacks/347718.html nfs安装与配|(debianQ?/a>
好吧Q这个错误浪费了我今天几个小时的旉Q必L它记录下来?br /> 问题是这LQ在启动更新了portmapQexportfsQ一些没问题后,在做/etc/init.d/nfs-kernel-server restart 出现

/etc/init.d/nfs-kernel-server start
Exporting directories for NFS kernel daemonexportfs: /etc/exports 
[1]:
Neither 'subtree_check' or 'no_subtree_check' specified for export
"foobar".
  Assuming default behaviour ('no_subtree_check').
  NOTE: this default has changed since nfs-utils version 
1.0.x

.
Starting NFS kernel daemon: nfsd
Not starting: portmap daemon is not running (warning).


警告提示portmap is not running

好吧Q检查一下portmap

/home/mnt/index# ps aux | grep portmap
daemon   
31478  0.0  0.0   2052   624 ?        Ss   13:59   0:00 /sbin/portmap


portmap的状态已l是runningQ在googling后,发现|上有h说是
This is the problem, portmap is not actually running, causing rpc.statd

看来问题q是出现rpc上,最主要的进Erpc.mountd无法启动

好吧Q接下来打开/etc/init.d/nfs-kernel-serverq个启动脚本q行查看

                 # See if portmap or rpcbind are running
                 (cat </dev/null >/dev/tcp/localhost/
1112>/dev/null
                 RET
=$?
                 if 
[ $RET != 0 ]; then
                     echo
                     log_warning_msg 
"Not starting: portmap daemon is not running"
                     exit 
0
                 fi


看来问题出来这个,什么叫“/dev/tcp/localhost/111”Q还是googlingQ网上有

I find that this is a bashism, but the init-script is marked as a bash script at the
top:
!/bin/bash
再man BashQ发?br /> Bash, as packaged for Debian, does not support using the /dev/tcp and /dev/udp files

应该很清楚了Q如果按照这里的分析Q那么我们需要对上面的这个启动脚本进行一下修改就可以完成我们的目的,最直接的就是把exit 0注释掉,另外说一点,q个脚本也有些写得不大合理,既然是log_warning_msgQ一个warningQ就不应该直接的exit 0




]]>
让linux定时执行Udhttp://www.aygfsteel.com/dongbule/archive/2011/01/19/343227.html陈于?/dc:creator>陈于?/author>Wed, 19 Jan 2011 09:47:00 GMThttp://www.aygfsteel.com/dongbule/archive/2011/01/19/343227.htmlhttp://www.aygfsteel.com/dongbule/comments/343227.htmlhttp://www.aygfsteel.com/dongbule/archive/2011/01/19/343227.html#Feedback0http://www.aygfsteel.com/dongbule/comments/commentRss/343227.htmlhttp://www.aygfsteel.com/dongbule/services/trackbacks/343227.html 问题是这LQ有个脚本需?0U钟执行一ơ,脚本具体功能׃l说Q定时Q务自焉用crontabQ但是crontab最的执行旉为分钟,最后决定选用d@环进行实现?br />
脚本
vi hello.sh
#!/bin/sh
while :
do
echo `date` 
>> /home/chenyz/1      //q里是Q务的实现
sleep 10
done

q里的程序运行时间间隔是10sQ小心咯Q如果没有加sleep 10Q你的机器很快就会耗尽资源Q负载会狂飙?br />
接着需要把脚本用后台守护进E来q行Q避免用户退导致脚本失?br />
nohup sh hello.sh &

btwQnohup是no hang upQ不挂vQ?br />
最后检查一下执行用户退出后相应的进E是否l在q行

root@tech163:/home/chenyz# ps -aux | grep hello
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root     
17275  0.0  0.1   1840   544 pts/1    S    17:33   0:00 /bin/sh ./hello.sh

root
@tech163:/home/chenyz#  vi 1
Wed Jan 19 17:09:02 CST 2011
Wed Jan 
19 17:09:12 CST 2011
Wed Jan 
19 17:09:22 CST 2011
Wed Jan 
19 17:09:32 CST 2011
Wed Jan 
19 17:09:42 CST 2011
Wed Jan 
19 17:09:52 CST 2011


如果有更好的办法和想法,虚心hQ欢q讨?br />

]]>
安装配置整理?awstatshttp://www.aygfsteel.com/dongbule/archive/2010/12/10/340281.html陈于?/dc:creator>陈于?/author>Fri, 10 Dec 2010 09:28:00 GMThttp://www.aygfsteel.com/dongbule/archive/2010/12/10/340281.htmlhttp://www.aygfsteel.com/dongbule/comments/340281.htmlhttp://www.aygfsteel.com/dongbule/archive/2010/12/10/340281.html#Feedback0http://www.aygfsteel.com/dongbule/comments/commentRss/340281.htmlhttp://www.aygfsteel.com/dongbule/services/trackbacks/340281.html 下蝲最新版?

安装
cd /home/download
wget http://awstats.sourceforge.net/files/awstats-7.0.tar.gz
tar zxf awstats-7.0.tar.gz
mv awstats-7.0 awstats
perl awstats_configure.pl

在[y/n]选择?输入y
接着输入你要分析的域?输入tech163
一路Enter

配置
vi /etc/awstats/awstats.tech163.com

LogFile="/home/apache/logs/access_logs"
DirCgi="/home/awstats/wwwroot/cgi-bin"
AllowToUpdateStatsFromBrowser=1


vi /home/apache/conf/httpd.conf

<VirtualHost *>
  ServerName awstats.163.com
  DocumentRoot "/home/awstats/awstats/wwwroot"
</VirtualHost>

Alias /awstatsclasses "/home/awstats/awstats/wwwroot/classes/"
Alias /awstatscss "/home/awstats/awstats/wwwroot/css/"
Alias /awstatsicons "/home/awstats/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/home/awstats/awstats/wwwroot/cgi-bin/"


cd /home/awstats/wwwroot/cgi-bin
perl awstats.pl -config=tech163 -update -lang=cn
perl awstats.pl -config=tech163 -output -staticlinks -lang=cn>awstats.tech163.html


http://awstats.163.com/awstats/awstats.pl?config=tech163.com

host指定 awstats.163.com ?配置的机器ip


]]>
安装配置整理?memcachedhttp://www.aygfsteel.com/dongbule/archive/2010/12/07/339995.html陈于?/dc:creator>陈于?/author>Tue, 07 Dec 2010 08:34:00 GMThttp://www.aygfsteel.com/dongbule/archive/2010/12/07/339995.htmlhttp://www.aygfsteel.com/dongbule/comments/339995.htmlhttp://www.aygfsteel.com/dongbule/archive/2010/12/07/339995.html#Feedback0http://www.aygfsteel.com/dongbule/comments/commentRss/339995.htmlhttp://www.aygfsteel.com/dongbule/services/trackbacks/339995.html gcc
libevent
glibc-devel

下蝲
cd /home/download
wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz
wget http://www.danga.com/memcached/dist/memcached-1.4.0.tar.gz

安装
tar -zxvf libevent-1.4.13-stable.tar.gz
cd libevent-1.4.13-stable
./configure --prefix=/usr/local/libevent
make && make install

tar -zxvf memcached-1.4.0.tar.gz
cd memcached-1.4.0
./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent
make && make install

启动
/usr/local/memcached/bin/memcached -d -m 64 -u root -p 11211 -c 1024 -P /var/memcached.pid
-d 为守护进E?br /> -m 为分配的内存?br /> -u q行memcached的用?br /> -p 监听的端?br /> -c 最大的q发q接?br /> -P 保存pid文g

q有很多的启动选项,通过帮助查看
/usr/local/memcached/bin/memcached -h


在windows开启命令行
telnet 192.168.1.100 11211
用telnet试一下以下命?br /> stats 查询状?br /> version 查询版本
quit 退?br /> flush_all 清空~存数据

l束q程
kill cat /var/memcached.pid




]]>
安装配置整理?PHP-FPMhttp://www.aygfsteel.com/dongbule/archive/2010/11/30/339425.html陈于?/dc:creator>陈于?/author>Tue, 30 Nov 2010 10:44:00 GMThttp://www.aygfsteel.com/dongbule/archive/2010/11/30/339425.htmlhttp://www.aygfsteel.com/dongbule/comments/339425.htmlhttp://www.aygfsteel.com/dongbule/archive/2010/11/30/339425.html#Feedback0http://www.aygfsteel.com/dongbule/comments/commentRss/339425.htmlhttp://www.aygfsteel.com/dongbule/services/trackbacks/339425.htmlPHP-FPM ?一个PHP FastCGIq程理?br />
FastCGI是一个可伸羃的,高速地在web server和脚本语a间交互的接口。FastCGI的主要优Ҏ把动态语a和web server分离开来。这U技术允许把web server和动态语aq行在不同的L上,以大规模扩展和改q安全性而不损失生效率?br />
php-fpm可以和Q何支持远端FastCGI的web server工作

安装

php-5.2.13.tar.gz
php-5.2.13-fpm-0.5.14.diff.gz

tar zxvf php-5.2.13.tar.gz
gunzip php-5.2.13-fpm-0.5.14.diff.gz

patch -d php-5.2.13 -p1 < php-5.2.13-fpm-0.5.14.diff (lphp源码打fpm补丁)

cd php-5.2.13

./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --enable-fastcgi --enable-fpm --with-config-file-path=/usr/local/php/etc --enable-force-cgi-redirect 

make && make install

查安装的情况

cd /usr/local/php/bin

./php -v

PHP 5.2.13 (cli) (built: Nov 30 2010 16:59:45
Copyright (c) 
1997-2010 The PHP Group
Zend Engine v2
.2.0, Copyright (c) 1998-2010 Zend Technologies
##出现上面的显C明安装正?br />
cp /home/download/php-5.2.13/php.ini-dist /usr/local/php/etc/php.ini

vi /usr/local/php/etc/php-fpm.conf

去除下列两行的注?br /> <value name="user">nobody</value> 
<value name="group">nobody</value>

启动php-fpm
/usr/local/php/sbin/php-fpm start

配置nginx(配置nginx?安装配置整理?nginx)

server {
listen       
80;
server_name  www.test.com;
root   /home/htmlfile/test;

location ~ .*\.(php|php5)?$ {
root           html
;
fastcgi_pass   127.0.0.1:9000;
fastcgi_index  index.php;
fastcgi_param  SCRIPT_FILENAME  /home/htmlfile/test$fastcgi_script_name;
include        fastcgi_params;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$  {
expires      30d
;
}
location ~ .*\.(js|css)?$  {
expires      1h
;
}
#access_log  /var/logs/access.log  access
;
}
## server部分为PHP虚拟L127.0.0.1Q?000为fastcgi的主?br />
重启nginx

?home/htmlfile/test目录下新建test.php
内容?lt;?php phpinfo(); ?>

既通过www.test.com/test.phpq行讉K,出现php的信息页,则安装成?br />


]]>
安装配置整理?mysqlhttp://www.aygfsteel.com/dongbule/archive/2010/11/30/339394.html陈于?/dc:creator>陈于?/author>Tue, 30 Nov 2010 07:21:00 GMThttp://www.aygfsteel.com/dongbule/archive/2010/11/30/339394.htmlhttp://www.aygfsteel.com/dongbule/comments/339394.htmlhttp://www.aygfsteel.com/dongbule/archive/2010/11/30/339394.html#Feedback0http://www.aygfsteel.com/dongbule/comments/commentRss/339394.htmlhttp://www.aygfsteel.com/dongbule/services/trackbacks/339394.html
tar zxvf mysql-5.1.50.tar.gz

cd mysql-5.1.50

./configure --prefix=/usr/local/mysql --with-charset=gbk --with-extra-charset=all --enable-hread-safe-client
--enable-local-infile --with-low-memory 

make && make install

chmod +w /usr/local/mysql

chown -R mysql:mysql /usr/local/mysql

cp support-files/my-medium.cnf /etc/my.cnf

/usr/local/mysql/bin/mysql_install_db --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql

/bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/etc/my.cnf


]]>
安装配置整理?nginxhttp://www.aygfsteel.com/dongbule/archive/2010/11/30/nginx.html陈于?/dc:creator>陈于?/author>Tue, 30 Nov 2010 04:45:00 GMThttp://www.aygfsteel.com/dongbule/archive/2010/11/30/nginx.htmlhttp://www.aygfsteel.com/dongbule/comments/339377.htmlhttp://www.aygfsteel.com/dongbule/archive/2010/11/30/nginx.html#Feedback0http://www.aygfsteel.com/dongbule/comments/commentRss/339377.htmlhttp://www.aygfsteel.com/dongbule/services/trackbacks/339377.html
Nginx ("engine x") 是一个高性能?HTTP ?反向代理 服务器,也是一?IMAP/POP3/SMTP 代理服务器?Nginx 是由 Igor Sysoev Z|斯讉K量第二的 Rambler.ru 站点开发的Q它已经在该站点q行过两年半了。Igor 源代码以类BSD许可证的形式发布。尽还是测试版Q但是,Nginx 已经因ؓ它的E_性、丰富的功能集、示例配|文件和低系l资源的消耗而闻名了?br />
nginx的特?/strong>
1.目前官方 Nginx q不支持Windows,您只能在包括Linux,UNIX,BSDpȝ下安装和使用
2.Nginx 本n只是一个HTTP和反向代理服务器Q它无法像Apache一样通过安装各种模块来支持不同的面脚本Q例如PHP、CGI{?br /> 3.Nginx 支持单的负蝲均衡和容?br /> 4.支持作ؓ基本 HTTP 服务器的功能Q例如日志、压~、Byte ranges、Chunked responses、SSL、虚拟主机等{,应有有

安装
安装nginx前需要确保系l中已经安装PCRE?PCRE libraryq个是HTTP Rewrite模块,也即是url静态化的包,到http://www.pcre.org下蝲最新的PCRE源码?

或直接用yum install pcre,apt-get instll pcreq行安装

d http://www.nginx.org/en/download.html 下蝲最新的版本

wget http://www.nginx.org/download/nginx-0.8.53.tar.gz

tar zxvf nginx-0.8.53.tar.gz

cd nginx-0.8.53

./configure --prefix=/usr/local/nginx --with-pcre=/home/download/pcre-8.01  --with-http_ssl_module --with-openssl=/home/download/openssl-1.0.0a --with-http_stub_status_module 

##指定pcre目录和启动ssl,https模块

make

make install

##Z么Nginx的性能要比Apache高得?q得益于Nginx使用了最新的epoll(Linux 2.6内核)和kqueue(freebsd)|络I/O模型Q而Apache则用的是传l的select模型。目前Linux下能够承受高q发讉K?Squid、Memcached都采用的是epoll|络I/O模型,处理大量的连接的dQApache所采用的select|络I/O模型非常低效

配置
~辑vi /usr/local/nginx/conf/nginx.conf,其中/usr/local/nginx为安装\?span style="color: #000000;">

##指定nginx的用户名和用L
user  nobody;

##启动q程?/span>
worker_processes  8;
worker_rlimit_nofile 
10240;

##指定PID文g
pid        logs/nginx.pid;

##指定工作模式和链接上?/span>
events {
    
use epoll;
    worker_connections  
10240;
}

##http服务?/span>
http {
include       mime.types;
default_type  text
/html;

##指定日志格式
log_format  main  '$http_x_forwarded_for - $remote_user [$time_local] $request '
                  
'"$status" $body_bytes_sent "$http_referer" '
                  
'"$http_user_agent" "$http_x_forwarded_for"';

##指定accesslog
access_log logs/nginx.log main;

##指定时
keepalive_timeout  300;

##开启gzip模块
gzip  on;
gzip_min_length  
1000;
gzip_buffers     
4 8k;
gzip_types       text
/*;
gzip_http_version 
1.0;
output_buffers   
1 32k;
postpone_output  
1460;
gzip_proxied     any;
gzip_vary        on;

##指定h的缓?/span>
client_header_timeout   5m;
client_body_timeout     5m;
send_timeout            5m;
sendfile                on;
tcp_nopush              on;
tcp_nodelay             off;
client_header_buffer_size 16k;
large_client_header_buffers 
4 64k;
server_names_hash_bucket_size 
128;
ssi on;
ssi_silent_errors on;
ssi_types text
/shtml;

##指定虚拟L
server {
listen      
80;
server_name _;
server_name_in_redirect  off;

location 
/ {
 root 
/dev/null;
}

}

##指定include文g
include servers/*.com;

}


新徏proxy.conf

proxy_set_header X-Forwarded-For $remote_addr;    ##讑֮header
proxy_set_header RealIP $remote_addr;
proxy_set_header Accept-Encoding ' ';
proxy_hide_header Vary;    ##隐藏header
add_header via_up $upstream_addr;
proxy_connect_timeout   2m;    ##代理q接时
proxy_send_timeout      2m;    ##代理发送超?/span>
proxy_read_timeout      2m;    ##代理发送超?/span>
proxy_temp_file_write_size 2048m;##讑֮~存文g夹大?/span>
proxy_buffer_size               256k; 
proxy_buffers                   4 256k; 
proxy_busy_buffers_size 512k; 

proxy_ignore_client_abort off
;

proxy_next_upstream error timeout invalid_header
;

新徏目录/conf/servers,q新建配|文件test.com

server {
        listen   
80;
        server_name  245.test.com;
        root /home/htmlfile/test;

        location 
= / {
            proxy_temp_path /var/www/cache
;
            index index.html index.htm;
        }


}

修改配置文g?通过以下命o查配|是否正?br />
/usr/local/nginx/sbin/nginx -t 

the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful

启动命o
/usr/local/nginx/sbin/nginx 
停止命o
/usr/local/nginx/sbin/nginx  -s stop
qx重新加蝲配置文g
kill -HUP `cat /usr/local/nginx/logs/nginx.pid
d到自启动
echo "/usr/local/nginx/sbin/nginx" >> /etc/rc.local



]]>
安装配置整理?软g卸蝲http://www.aygfsteel.com/dongbule/archive/2010/11/29/linux.html陈于?/dc:creator>陈于?/author>Mon, 29 Nov 2010 07:14:00 GMThttp://www.aygfsteel.com/dongbule/archive/2010/11/29/linux.htmlhttp://www.aygfsteel.com/dongbule/comments/339318.htmlhttp://www.aygfsteel.com/dongbule/archive/2010/11/29/linux.html#Feedback0http://www.aygfsteel.com/dongbule/comments/commentRss/339318.htmlhttp://www.aygfsteel.com/dongbule/services/trackbacks/339318.html 通过 rpm -qa | grep httpd 搜烦?br />
httpd-2.2.3-43.el5.centos.3

?br />
rpm -e httpd-2.2.3-43.el5.centos.3

如果出现提示有其他相兛_依赖此rpm,可以选择强制卸蝲

2.yum ?apt-get 卸蝲

yum -y remove httpd
yum -y remove httpd* 卸蝲多个相识的Y?br />
3.卸蝲自编译包
make uninstall ?手动删除


]]>
安装配置整理?net-snmphttp://www.aygfsteel.com/dongbule/archive/2010/11/29/net-snmp.html陈于?/dc:creator>陈于?/author>Mon, 29 Nov 2010 03:34:00 GMThttp://www.aygfsteel.com/dongbule/archive/2010/11/29/net-snmp.htmlhttp://www.aygfsteel.com/dongbule/comments/339299.htmlhttp://www.aygfsteel.com/dongbule/archive/2010/11/29/net-snmp.html#Feedback0http://www.aygfsteel.com/dongbule/comments/commentRss/339299.htmlhttp://www.aygfsteel.com/dongbule/services/trackbacks/339299.html 先阅M下官|的一点说?详细见官|?
Simple Network Management Protocol (SNMP) is a widely used protocol for monitoring the health and welfare of network equipment (eg.routers), computer equipment and even devices like UPSs. Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6
...

安装

在http://www.net-snmp.org/download.html选择最新版本进行下?br />
wget http://sourceforge.net/projects/net-snmp/files/net-snmp/5.6/net-snmp-5.6.tar.gz

tar -xvf net-snmp-5.6.tar.gz

cd net-snmp-5.6

./configure --prefix=/usr/local/net-snmp --with-default-snmp-version="2" --with-logfile=/usr/local/net-snmp/log/snmplog.log --with-persistent-directory=/var/net-snmp

?br /> --prefix 安装的\?br /> --with-default-snmp-version 默认的版?br /> --with-logfile 日志文g的\?br /> --with-persistent-directory 固定数据存储目录

make && make install

cp EXAPLE.conf /usr/local/net-snmp/share/snmp/snmpd.conf

vi snmpd.conf

60 #       sec.name  source          community
61 com2sec local     localhost       COMMUNITY
62 com2sec mynetwork NETWORK/24      COMMUNITY


修改?nbsp;  

60 #       sec.name  source          community
61 com2sec local     localhost       public
62 com2sec mynetwork NETWORK/24      public


?etc/rc.localq加
/usr/local/net-snmp/sbin/snmpd -c /usr/local/net-snmp/share/snmp/snmpd.conf

?etc/profile文g的export命o前追?br /> PATH=/usr/local/net-snmp/bin:/usr/local/net-snmp/sbin:$PATH

?/strong>

使用 ps -aux | grep snmpd查看snmpd的进E是否启?br />
使用如下命o从本机检查snmp是否得到pȝ数据

snmpwalk -v 2c -c public localhost

如果q回的不是Time out,而是pȝ信息p明net-snmp安装成功



]]>
cacti的简介与应用http://www.aygfsteel.com/dongbule/archive/2010/11/02/336829.html陈于?/dc:creator>陈于?/author>Tue, 02 Nov 2010 09:28:00 GMThttp://www.aygfsteel.com/dongbule/archive/2010/11/02/336829.htmlhttp://www.aygfsteel.com/dongbule/comments/336829.htmlhttp://www.aygfsteel.com/dongbule/archive/2010/11/02/336829.html#Feedback0http://www.aygfsteel.com/dongbule/comments/commentRss/336829.htmlhttp://www.aygfsteel.com/dongbule/services/trackbacks/336829.html
cacti的结?/strong>
在广义上来说cacti是一套网l流量监图形分析工?但从狭义来说cacti只是由php语言实现的一个Y?

它需要PHP,apache,Mysql,SNMP,RRDTool{工L支持


从上囑֏以很明确看出cacti的三层架构之间的关系
W一层是数据采集,通过snmp单网l协?和一批自定义的脚本进行采?br /> W二层是数据存储,分别通过mysql存储cacti的模板和一些一定的信息,RRDTool用来存储所监控到的性能文g,后缀?rrd
W三层是数据展现,cacti的web方式展现



cacti主要功能是用snmp服务获取数据,然后用rrdtool储存和更新数?当用户需要查看数据的时?rrdtool生成图表呈现l用戗因? snmp和rrdtool是cacti的关?snmp关系着数据的收集,rrdtool关系着数据存储和图表的生成.


snmp抓到数据不是存储在mysql中而是存在rrdtool生成的rrd文g?rrdtoolҎ据的更新和存储就是对rrd文g的处?rrd 文g是大固定的档案文g,它能够存储的数据W数在创建时已经定义.
Mysql配合PHPE序存储一些变量数据ƈ对变量数据进行调?如:L名、主?ip,snmp 团体名、端口号、模板信息等变量?br />
*.SNMP协议
SNMP(单网l管理协?前n是简单网关监控协?SGMP), 用来寚w信U\q行理

加入W合Internet定义?strong>SMI和MIB
q行体系整合

单网l管理协?SNMP)是Internetl织用来理Internet的网l协?br />
*.MIB & SMI
MIB, 理信息库,ql管理协议访问的理对象数据库,它包括SNMP可以通过|络讑֤的SNMP理代理q行讄的变?br /> SMI,理信息l构Q用于定义通过|络理协议可访问的对象的规则。SMI定义在MIB中用的数据cd及网l资源在MIB中的名称或表C?br />
*.SNMP的网l模?/strong>

使用SNMPq行|络理需要下面几个重要部分:理基站Q管理代理,理信息库和|络理工具。管理基站通常是一个独立的讑֤Q它用作|络理者进行网 l管理的用户接口。基站上必须装备有管理YӞ理员可以用的用户接口和从MIB取得信息的数据库Q同时ؓ了进行网l管理它应该具备管理命令发出基站的能力

?关于MIB介绍可以?lt;SNMP MIB完整手册>

*.net-snmp
NET-SNMP是一个代理SNMP协议的Y?q提供管理端的查询工?支持多种扩展方式
在被监测和监机器进行安?br /> http://www.net-snmp.org/download.html
配置
/etc/snmp/snmpd.conf




讄自启?br /> /usr/sbin/snmpd -c /usr/local/net-snmp/snmpd.conf &

snmpwalk -v 2c -c public 127.0.0.1
snmpwalk -v 1 -c public 127.0.0.1 .1.3.6.1.4.1.2021.10 (负蝲?

*.RRDTool
RRDTool使用RRDQRound Robin DatabaseQ作为存储格式,Round robin是一U处理定量数据、以及当前元素指针的技术。RRDTool主要用来跟踪对象的变化情况,生成q些变化的走势图
RRDTool的存储特?br />
存储数据的数据库I间看成一个圆
指针会随着数据的读写操作在圆的d上自动移?br /> 圆没有v点和l点
当所有的I间都存满了数据Q就又从头开始存?br /> RRDtool 所使用的数据库文g的后~名是'.rrd'



*.Cacti的安?/strong>

需要安装以下Y?br />
1)安装Apache,Mysql,PHP
2)安装RRDTool
(cgilib-0.5.tar.gz,zlib-1.2.3.tar.gz,libpng-1.2.18.tar.gz,freetype-2.3.5.tar.gz,libart_lgpl-2.3.17.tar.gz,rrdtool-1.2.23.tar.gz)
3)安装net-snmp
4)安装cacti

*.Cacti的配|?/strong>
修改cacti的config.php


新增crontab定时?br />


接下来就可以讉K



*.q入cacti的设|?/strong>



配置SNMP版本,rrdtoolcd,和net-snmp的工兯\?br />






具体的安装配|和应用׃演示,下面是ppt附g,安装和配|有什么问题可以同我联p?br />
--------------------------------

补充
有朋友对rrdtools提了一炚w?

RRDTool保存数据是@环的Q而且大小不变。那是不是说Q他只能保存一定数量活一D|据,然后保持更新?br /> 比如QRRD只有6个刻度,用来保存一个小时内Q每10分钟的流量。从10?0分开始的话,?1点就满了Q那么就开始@环刷C?br /> 11?0分的数据p盖了10?0分的数据?br /> 可是如果我分析的没错的话Q那数据不就丢失了么Q如果想查看历史怎么办呢Q?br />

因ؓrrd整个存储I间的大就是一个固定的?在一D|间后,当所有空间都存满数据?׃从头开始存?所以这涉及到rrdtool的前期规?以下是截取了http://www.rrdtool.org的说?br />
    When monitoring the state of a system, it is convenient to have the data available at a constant time interval. Unfortunately, you may not always be able to fetch data at exactly the time you want to. Therefore RRDtool lets you update the log file at any time you want. It will automatically interpolate the value of the data-source (DS) at the latest official time-slot (interval) and write this interpolated value to the log. The original value you have supplied is stored as well and is also taken into account when interpolating the next log entry.
Consolidation
    You may log data at a 1 minute interval, but you might also be interested to know the development of the data over the last year. You could do this by simply storing the data in 1 minute intervals for the whole year. While this would take considerable disk space it would also take a lot of time to analyze the data when you wanted to create a graph covering the whole year. RRDtool offers a solution to this problem through its data consolidation feature. When setting up an Round Robin Database (RRD), you can define at which interval this consolidation should occur, and what consolidation function (CF) (average, minimum, maximum, total, last) should be used to build the consolidated values (see rrdcreate). You can define any number of different consolidation setups within one RRD. They will all be maintained on the fly when new data is loaded into the RRD.
Round Robin Archives
    Data values of the same consolidation setup are stored into Round Robin Archives (RRA). This is a very efficient manner to store data for a certain amount of time, while using a known and constant amount of storage space.
    It works like this: If you want to store 1'000 values in 5 minute interval, RRDtool will allocate space for 1'000 data values and a header area. In the header it will store a pointer telling which slots (value) in the storage area was last written to. New values are written to the Round Robin Archive in, you guessed it, a round robin manner. This automatically limits the history to the last 1'000 values (in our example). Because you can define several RRAs within a single RRD, you can setup another one, for storing 750 data values at a 2 hour interval, for example, and thus keep a log for the last two months at a lower resolution.
    The use of RRAs guarantees that the RRD does not grow over time and that old data is automatically eliminated. By using the consolidation feature, you can still keep data for a very long time, while gradually reducing the resolution of the data along the time axis.
    Using different consolidation functions (CF) allows you to store exactly the type of information that actually interests you: the maximum one minute traffic on the LAN, the minimum temperature of your wine cellar, the total minutes of down time, etc.

----------------------------------------

by 陈于?
QQ:34174409
Mail: dongbule@163.com






]]>
VPS之openVPN的安装配|?/title><link>http://www.aygfsteel.com/dongbule/archive/2010/11/01/336714.html</link><dc:creator>陈于?/dc:creator><author>陈于?/author><pubDate>Mon, 01 Nov 2010 09:35:00 GMT</pubDate><guid>http://www.aygfsteel.com/dongbule/archive/2010/11/01/336714.html</guid><wfw:comment>http://www.aygfsteel.com/dongbule/comments/336714.html</wfw:comment><comments>http://www.aygfsteel.com/dongbule/archive/2010/11/01/336714.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.aygfsteel.com/dongbule/comments/commentRss/336714.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/dongbule/services/trackbacks/336714.html</trackback:ping><description><![CDATA[上次写的<<a href="http://www.aygfsteel.com/dongbule/archive/2010/10/12/334650.html">VPS的购买和使用</a>>中提CopenVPNQ也做了一点点单的介绍Q有朋友也问了一些关于vpn的问?br /> 首先Q我所购买的vps是基于OpenVZcdQ无法配|标准的VPN(无测试过),部分手机可能无法支持,但OpenVZ支持pptp和openVPN<br /> <br /> L录OPENVPN官网查阅最新资?lt;http://openvpn.net/><br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/21.png" alt="" width="230" border="0" height="77" /><br /> <br /> ok!在安装之前请认一下你购买的vps是否开启了tun/tap的支持,burst vps默认是不开启tun/tap的,可以使用cat /dev/net/tun q行?br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/2.png" alt="" border="0" /><br /> <br /> 如果是没有权限的话可以发个ticket要求客服Z开启tun/tap<br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/3.png" alt="" border="0" /><br /> <br /> 出现File descriptor in bad state说明tun/tap已经开启,可以开始进行openVPN的安装配|?br /> <br /> 我的vps安装的系lؓCentOS release 5.5 (Final)Q下面一pd安装和配|都在此vps上进?Ҏ <<a >OpenVPN服务器配|(转蝲Q?/a>>配置<br /> <br /> <strong>一.服务端安?/strong><br /> <br /> 现在开始在vps上安装和配置openVPNQ需要的有下列的软g<br /> gcc g++ [gcc g++为系l需要的~译工具]<br /> lzo?nbsp;  [Lzo库的功能是对虚拟链\q行压羃]<br /> openssl [囊括了主要的密码法、常用的密钥和证书封装管理功能以及SSL协议]<br /> openvpn <br /> <br /> <strong>1.安装~译工具gcc g++</strong><br /> <br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 0, 0);"># yum install gcc<br /> # yum install gcc-c++</span></div> <br /> <br /> <strong>2.安装lzo?/strong><br /> <br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 0, 0);"># cd /home/download/<br /> # wget http://www.oberhumer.com/opensource/lzo/download/lzo-</span><span style="color: rgb(0, 0, 0);">2.03</span><span style="color: rgb(0, 0, 0);">.tar.gz<br /> # tar -xvzf lzo-</span><span style="color: rgb(0, 0, 0);">2.03</span><span style="color: rgb(0, 0, 0);">.tar.gz<br /> # cd lzo-</span><span style="color: rgb(0, 0, 0);">2.03</span><span style="color: rgb(0, 0, 0);"><br /> # ./configure -prefix</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">/usr/local/lzo && make && make install<br /> # vi /etc/ld.so.conf</span></div> <br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/4.png" alt="" border="0" /><br /> <br /> ~辑完ld.so.conf,执行<br /> <br /> # ldconfig<br /> <br /> 使动态库生效<br /> <br /> <strong>3.安装openssl</strong><br /> <br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 0, 0);"># cd /home/download/<br /> # wget http://www.openssl.org/source/openssl-</span><span style="color: rgb(0, 0, 0);">0.9.8</span><span style="color: rgb(0, 0, 0);">.tar.gz<br /> # tar -xvzf openssl-</span><span style="color: rgb(0, 0, 0);">0.9.8</span><span style="color: rgb(0, 0, 0);">.tar.gz<br /> # ./config -prefix</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">/usr/local/openssl && make && make install</span></div> <br /> <br /> <strong>4.安装openvpn</strong><br /> <br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 0, 0);"># cd /home/download/<br /> # wget http://www.openvpn.net/release/openvpn-</span><span style="color: rgb(0, 0, 0);">2.0.9</span><span style="color: rgb(0, 0, 0);">.tar.gz<br /> # tar -xvzf openvpn-</span><span style="color: rgb(0, 0, 0);">2.0.9</span><span style="color: rgb(0, 0, 0);">.tar.gz<br /> # cd openvpn-</span><span style="color: rgb(0, 0, 0);">2.0.9</span><span style="color: rgb(0, 0, 0);"><br /> # ./configure -prefix</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">/usr/local/openvpn && make && make install</span></div> <br /> <br /> <strong>?配置</strong><br /> <br /> <strong>1.创徏配置环境</strong><br /> <br /> <br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 0, 0);"> </span># mkdir /etc/openvpn<br /> # cp -R /home/download/openvpn-2.0.9/easy-rsa/ /etc/openvpn<br /> # cd /etc/openvpn/easy-rsa/2.0/<br /> # ls<br /> <span style="color: rgb(0, 0, 0);"> total </span><span style="color: rgb(0, 0, 0);">112</span><span style="color: rgb(0, 0, 0);"><br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root   </span><span style="color: rgb(0, 0, 0);">121</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> build</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">ca<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root   </span><span style="color: rgb(0, 0, 0);">354</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> build</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">dh<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root   </span><span style="color: rgb(0, 0, 0);">190</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> build</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">inter<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root   </span><span style="color: rgb(0, 0, 0);">165</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> build</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">key<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root   </span><span style="color: rgb(0, 0, 0);">159</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> build</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">key</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">pass<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root   </span><span style="color: rgb(0, 0, 0);">251</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> build</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">key</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">pkcs12<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root   </span><span style="color: rgb(0, 0, 0);">270</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> build</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">key</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">server<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root   </span><span style="color: rgb(0, 0, 0);">215</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> build</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">req<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root   </span><span style="color: rgb(0, 0, 0);">160</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> build</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">req</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">pass<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root   </span><span style="color: rgb(0, 0, 0);">430</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> clean</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">all<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root  </span><span style="color: rgb(0, 0, 0);">1459</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> inherit</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">inter<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root   </span><span style="color: rgb(0, 0, 0);">297</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> list</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">crl<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rw</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">r</span><span style="color: rgb(0, 0, 0);">--</span><span style="color: rgb(0, 0, 0);">r</span><span style="color: rgb(0, 0, 0);">--</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root   </span><span style="color: rgb(0, 0, 0);">422</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> Makefile<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root  </span><span style="color: rgb(0, 0, 0);">7768</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> openssl</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">0.9</span><span style="color: rgb(0, 0, 0);">.</span><span style="color: rgb(0, 0, 0);">6</span><span style="color: rgb(0, 0, 0);">.cnf<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root  </span><span style="color: rgb(0, 0, 0);">8230</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> openssl.cnf<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root </span><span style="color: rgb(0, 0, 0);">12068</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> pkitool<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rw</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">r</span><span style="color: rgb(0, 0, 0);">--</span><span style="color: rgb(0, 0, 0);">r</span><span style="color: rgb(0, 0, 0);">--</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root  </span><span style="color: rgb(0, 0, 0);">8864</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> README<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root   </span><span style="color: rgb(0, 0, 0);">894</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> revoke</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">full<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root   </span><span style="color: rgb(0, 0, 0);">180</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> sign</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">req<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root  </span><span style="color: rgb(0, 0, 0);">1602</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> vars<br /> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">rwxr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">xr</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">x </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);"> root root   </span><span style="color: rgb(0, 0, 0);">190</span><span style="color: rgb(0, 0, 0);"> Oct </span><span style="color: rgb(0, 0, 0);">26</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">03</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">14</span><span style="color: rgb(0, 0, 0);"> whichopensslcnf</span></div> <br /> <br /> l果是程序以及脚本,q个要的说明一?br /> <br /> vars         脚本Q是用来创徏环境变量Q设|所需要的变量的脚?br /> clean-all    脚本Q是创徏生成CA证书及密?文g所需要的文g和目?br /> build-ca     脚本Q生成CA证书(交互)<br /> build-dh     脚本Q生成Diffie-Hellman文g(交互)<br /> build-key-server 脚本Q生成服务器端密?交互)<br /> build-key    脚本Q生成客L密钥(交互)<br /> pkitool      脚本Q直接用vars的环境变量设|直接生成证?非交?<br /> <br /> <strong>2.生成CA证书及密?/strong><br /> <br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 0, 0);"># cd /etc/openvpn/easy-rsa/</span><span style="color: rgb(0, 0, 0);">2.0</span><span style="color: rgb(0, 0, 0);">/<br /> # ./vars<br /> NOTE: If you run ./clean-all</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);"> I will be doing a rm -rf on /etc/openvpn/easy-rsa/</span><span style="color: rgb(0, 0, 0);">2.0</span><span style="color: rgb(0, 0, 0);">/keys</span></div> <br /> ?如果你执行了./clean-all,pȝ删?etc/openvpn/easy-rsa/2.0/keys下的文g<br /> <br /> 修改vars文g<br /> # vi vars<br /> <br /> export KEY_COUNTRY="CN"<br /> export KEY_PROVINCE="GZ"<br /> export KEY_CITY="guangzhou"<br /> export KEY_ORG="NCS"<br /> export KEY_EMAIL="dongbule@163.com"<br /> <br /> # ./vars <br /> <br /> <strong>3.初始化keys文g?/strong><br /> <br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 0, 0);"># ./clean-all #</span><span style="color: rgb(128, 0, 0); font-weight: bold;">[</span><span style="color: rgb(128, 0, 0);">?删除/etc/openvpn/easy-rsa/2.0/keys下的文g</span><span style="color: rgb(128, 0, 0); font-weight: bold;">]</span><span style="color: rgb(0, 0, 0);"><br /> # ./build-ca  #</span><span style="color: rgb(128, 0, 0); font-weight: bold;">[</span><span style="color: rgb(128, 0, 0);">?生成一个a 1024 bit RSA的密?writing new private key to 'ca.key'</span><span style="color: rgb(128, 0, 0); font-weight: bold;">]</span></div> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/5.png" alt="" border="0" /><br /> <br /> 一路按回R可?br /> <br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 0, 0);"># cd keys<br /> # ls<br /> ca.crt  ca.key  index.txt  serial</span></div> <br /> <br /> 可以看到生成的ca.crt  ca.key文g<br /> <br /> <strong>4.生成Diffie-Hellman文g</strong><br /> <br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 0, 0);"># cd ..<br /> # ./build-dh #</span><span style="color: rgb(128, 0, 0); font-weight: bold;">[</span><span style="color: rgb(128, 0, 0);">?Generating DH parameters, 1024 bit long safe prime</span><span style="color: rgb(128, 0, 0); font-weight: bold;">]</span><span style="color: rgb(0, 0, 0);"><br /> # ls  keys<br /> ca.crt  ca.key  dh1024.pem  index.txt  serial</span></div> <br /> ?可以看到生成?024为的Diffie-Hellman文g<br /> <br /> <strong>5.生成服务器用的VPN server ca证书</strong><br /> <br /> # ./build-key-server chenyz #[?其中chenyz是CA证书的一个名字]<br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/6.png" alt="" border="0" /><br /> <br /> 一路回?Sign the certificate? [y/n]:y 选择y<br /> <br /> 然后把刚才生成的CA证书和密钥copy?etc/openvpn/?br /> <br /> # cd keys<br /> # cp ca.crt ca.key chenyz.crt chenyz.key dh1024.pem /etc/openvpn/<br /> <br /> <strong>6.生成客户端CA证书及密?/strong><br /> <br /> # ./build-key client-chenyz<br /> 一路回?Sign the certificate? [y/n]:y 选择y<br /> <br /> 在keys目录下生成了client-chenyz.crt client-chenyz.csr client-chenyz.key三个客户端证?br /> q且ca.crt ca.key client-chenyz.crt client-chenyz.csr client-chenyz.key 五个文g打包,以便客户端vpn<br /> <br /> 使用<br /> <br /> <div style="background-color: rgb(238, 238, 238); font-size: 13px; border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: rgb(0, 0, 0);"># cd keys<br /> # mkdir userkey<br /> # cp ca.crt ca.key client-chenyz.crt client-chenyz.csr client-chenyz.key userkey/<br /> # tar -zcvf userkey.tar.gz userkey/<br /> userkey/<br /> userkey/ca.crt<br /> userkey/client-chenyz.csr<br /> userkey/ca.key<br /> userkey/client-chenyz.key<br /> userkey/client-chenyz.crt<br /> <br /> # sz userkey.tar.gz<br /> Starting zmodem transfer.  Press Ctrl+C to cancel.<br /> Transferring userkey.tar.gz<img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /><br />   </span><span style="color: rgb(0, 0, 0);">100</span><span style="color: rgb(0, 0, 0);">%       </span><span style="color: rgb(0, 0, 0);">4</span><span style="color: rgb(0, 0, 0);"> KB    </span><span style="color: rgb(0, 0, 0);">4</span><span style="color: rgb(0, 0, 0);"> KB/s </span><span style="color: rgb(0, 0, 0);">00</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">00</span><span style="color: rgb(0, 0, 0);">:</span><span style="color: rgb(0, 0, 0);">01</span><span style="color: rgb(0, 0, 0);">       </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);"> Errors</span></div> <br /> <br /> 使用sz其下蝲到windows客户?br /> <br /> <strong>7.openvpn配置文g</strong><br /> <br /> # cp /home/download/openvpn-2.0.9/sample-config-files/server.conf  /etc/openvpn/openvpn.conf<br /> vpenvpn的原始样例文件复制到/etc/openvpn?q改名ؓopenvpn.conf,我们在样例文g上进行修?br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/777.png" alt="" width="426" border="0" height="153" /><br /> 使用的端口,默认1194<br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/7.png" alt="" border="0" /><br /> 使用的协议,默认使用UDPQ如果用HTTP proxyQ必M用TCP协议<br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/8.png" alt="" border="0" /><br /> ca:使用build-ca生成的,用于验证客户是证书是否合?br /> cert:使用build-key-server,Server使用的证书对应的key,注意安全,防止被盗<br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/9.png" alt="" border="0" /><br /> dh:生成的加密文?br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/10.png" alt="" border="0" /><br /> 通过VPN Server往Client push路由Qclient通过pull指o获得Server push的所有选项q应?br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/11.png" alt="" border="0" /><br /> 可以让客L之间怺讉K直接通过openvpnE序转发<br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/12.png" alt="" border="0" /><br /> 如果Client使用的CA的Common Name有重复了Q或者说客户都用相同的CA #和keysq接VPNQ一定要打开q个选项Q否则只允许一个hq接VPN<br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/122.png" alt="" border="0" /><br /> Ҏ据进行压~?br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/13.png" alt="" border="0" /><br /> 定义用户<br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/14.png" alt="" border="0" /><br /> openvpn状态log<br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/15.png" alt="" border="0" /><br /> 每次重新启动openvpn后保留原有的log信息Q新信息q加到文件最?br /> <br /> <strong>8.启动OpenVPN</strong><br /> <br /> 修改完毕?卛_以启动vpn,--daemon为后台守护进E模型启?br /> /usr/local/openvpn/sbin/openvpn --daemon --config /etc/openvpn/openvpn.conf<br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/16.png" alt="" border="0" /><br /> <br /> 使用netstat -ln 查看1194openvpn的端口是否已lv?br /> <br /> <strong>?win客户端的安装和配|?/strong><br /> <br /> 下蝲openvpn客户?http://www.openvpn.net/release/openvpn-2.0.9-install.exe 安装完毕<br /> 把刚刚打包的userkey.tar.gz下蝲解压?C:\Program Files\OpenVPN\config 目录?br /> ?home/download/openvpn-2.0.9/sample-config-files/client.conf 也下载到 C:\Program Files\OpenVPN\config 目录?br /> <br /> 接着是配|这个client.conf客户端配|文?br /> <br /> 主要修改有以下几个地?br /> <br /> dev tun<br /> proto tcp<br /> remote 你的vpn地址 1194<br /> user nobody<br /> group nogroup<br /> ca ca.crt<br /> cert client-chenyz.crt<br /> key client-chenyz.key   ##?文g名和路径必须对应<br /> comp-lzo<br /> redirect-gateway def1<br /> <br /> 保与服务端的配|对?然后client.conf修改文g名ؓclient.ovpn,右键点击client.ovpn,选择"Start OpenVPN on this config file"<br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/18.png" alt="" border="0" /><br /> 可以看到q接已经成功,q且创徏?[本地q接 6] 一条新的链?br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/19.png" alt="" border="0" /><br /> <br /> <img src="http://www.aygfsteel.com/images/blogjava_net/dongbule/openvpn/20.png" alt="" border="0" /><br /> <br /> 或者你也可以打开C:\Program Files\OpenVPN\bin\openvpn-gui-1.0.3.exeq行q接,双击后会在Q务栏里有个小q接图标,变成l色的话p明你q接成功<br /> <br /> openvpn的参数配|?感觉不算很多,也比较容易理?中文的资料也很齐?大概q个东西在国内还是广泛应?d^_^)<br /> <br /> 如果只是单的应用,配置倒真的很?不过如果真的是要用v?|段讄和访问控制各U问题真的不?入是否配|dhcp,是否分配dns,vpn如何和内|通讯,很多很多,因ؓ我只是拿来做代理q里׃l说?br /> <br /> <br /> ----------------------------------------<br /> <br /> by 陈于?<br /> QQ:34174409<br /> Mail: dongbule@163.com<br /> <br /> <br /> <br /> <img src ="http://www.aygfsteel.com/dongbule/aggbug/336714.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/dongbule/" target="_blank">陈于?/a> 2010-11-01 17:35 <a href="http://www.aygfsteel.com/dongbule/archive/2010/11/01/336714.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">̨</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ϲ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ͼľ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ν</a>| <a href="http://" target="_blank">˶</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ˮ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ﴨ</a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">֦</a>| <a href="http://" target="_blank">ʲ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">˳</a>| <a href="http://" target="_blank">ϳ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">˺</a>| <a href="http://" target="_blank">½</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Է</a>| <a href="http://" target="_blank">ƽ</a>| <a href="http://" target="_blank">DZ</a>| <a href="http://" target="_blank">캵</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>