Google
人要拥有不被生活压力击倒的勇气”。不管是男的还是女的,每一个人都应该和刘欢唱的一样。“再苦再难也要坚强,只为那些期待眼神”。。。成功背后的故事必定会成为你骄傲的理由!
欢迎来到Susir驿站Blog.一个对opensources TC有着狂热追求的家伙。。。。。。HOHO。 @。@ 期待着你加入opensources阵营和我一起狂欢一起见证。 ...
August 25, 2011

[置顶] 博客未更新说明

| Category : 牛俊杂谈 | Posted by susir at 02:38 | Comments:0
由于网络原因。博客暂停了更新。对不住大家了。域名地址被墙了。每次更新需要翻墙。域名地址被墙了。每次更新需要翻墙。加上最近比较忙。以后有时间我回持续更新的。谢谢大家的关注。再次感谢大家。

一个对opensources TC有着狂热追求的家伙。。。。。。HOHO。 @。@ 期待着你加入opensources阵营和我一起狂欢一起见证。 ...
December 18, 2011
Cobbler Web Interface is a good frontend to easily manage most Cobbler operations. It permits to list, add and edit distros, profiles, subprofiles, systems, repos and kickstart files.  
The setup of the WebUI has changed since version 0.7.x, what follows refers to the "new" way of set up, working from version > 0.7.x.

The Web  Interface can be seen at the address: http://your.cobbler.server...

You need Apache and Cobbler services running.  

You need to setup a username for accessing it (digest authentication).  
You can change the password for the existing cobbler user:  
htdigest /etc/cobbler/users.digest "Cobbler" cobbler  
Or you can add other usernames/passwords:  
htdigest /etc/cobbler/users.digest "Cobbler" yourname  

Be sure to have in /etc/cobbler/modules the following values:  
[authentication]  
module = authn_configfile  
[authorization]  
module = authz_allowall  

For old Cobbler pre 1.0  versions be sure to have in /etc/cobbler/settings the following values:  
xmlrpc_rw_enabled: 1  
xmlrpc_rw_port: 25152  

Restart cobbler service in you changed any of the above settings:
service cobblerd restart

For debugging check these logs:
/var/log/cobbler/cobbler.log
/var/log/httpd/error.log

More complex setups are possible for managing authorization and authentication policies, refer to official documentation for details.
December 18, 2011
使用Cobbler批量部署Linux操作系统
(版权声明:小魔怪作品.转载请注明出处)
                            


    默认的rhel光盘中没有cobbler软件,必须使用第三方的软件源才能安装cobbler软件 。但是呢光是安装这一个软件包是不能帮助我们完成大批量安装这个工作滴。那么问题来了。看见这个标题有童鞋问了。为什么不用Kickstart部署呢?你这种部署有啥与众不同呢?Cobbler批量部署的原理其实和Kickstart部署的原理有类似之处。在此就不予以深究,没有理解的童鞋请回顾 Kickstart网络安装的原理以及实施方式。
    直奔Cobbler的主题吧,这才是今天讨论的重点。Cobbler项目最初在2008年左右发布。是红帽软件Fedora项目社区的一个子项目。是新一代网络安装套件可以快速建立网络安装环境。降低大批量部署安装的难度。兄弟们苦逼的日子来啦啊。原因你懂的!
  cobbler官方网站:https://fedorahosted.org/c...
Cobbler作为一个预备工具,使部署RedHat/Centos/Fedora系统更容易,同时也支持Suse和Debian系统的部署。
它提供以下服务集成:

* PXE服务支持
* DHCP服务管理
* DNS服务管理
* Kickstart服务支持
* yum仓库管理

Cobbler客户端Koan支持虚拟机安装和操作系统重新安装。

Cobbler服务器部署:
先确保EPEL仓库可用,如果不可用先安装epel包:同时确保本地仓库也是可用的。(确保机器可以联网)需要注意一点,注意 /var/www/cobbler 目录必须具有足够容纳 Linux 安装文件的空间(移动,建软链接)一本5G左右吧,但是你要同步不了YUM源了。这个后面再探讨。
#rpm -Uvh http://download.fedora.red...

# wget http://download.fedora.red...
# rpm -ivh  epel-release-5-4.noarch.rpm
#yum list
2、安装cobbler server需要的的所有包:
#yum install cobbler httpd rsync tftp-server xinetd dhcp
3、启动httpd和cobblerd,并设置为开机自启动:
#service httpd start
#service cobblerd start
chkconfig httpd on
chkconfig dhcpd on
sbin/chkconfig xinetd on
sbin/chkconfig tftp on
sbin/chkconfig cobblerd on

4、检查cobbler相关配置:
下面是执行# cobbler check出来的信息:
The following are potential configuration items that you may want to fix:
1 : The 'server' field in /etc/cobbler/settings must be set to something other than localhost, or kickstarting features will not work.  This should be a resolvable hostname or IP for the boot server as reachable by all machines that will use it.
#修改server选项为主机名或是IP地址
2 : For PXE to be functional, the 'next_server' field in /etc/cobbler/settings must be set to something other than 127.0.0.1, and should match the IP of the boot server on the PXE network.
#修改next-server对应的IP 地址
3 : Must enable a selinux boolean to enable vital web services components, run: setsebool -P httpd_can_network_connect true
#修改SELINUX setsebool -P httpd_can_network_connect true
4 : you need to set some SELinux content rules to ensure cobbler serves content correctly in your SELinux environment, run the following: /usr/sbin/semanage fcontext -a -t public_content_t "/tftpboot/.*" && /usr/sbin/semanage fcontext -a -t public_content_t "/var/www/cobbler/images/.*"
#修改selinux安全上下文标签
5 : you need to set some SELinux rules if you want to use cobbler-web (an optional package), run the following: /usr/sbin/semanage fcontext -a -t httpd_sys_content_rw_t "/var/lib/cobbler/webui_sessions/.*"
#修改  cobbler对应的安全上下文标签
6 : some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely.  Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements.
#运行cobbler get-loaders  以获取PXE启动需要的文件
7 : change 'disable' to 'no' in /etc/xinetd.d/tftp
#开启tftp
8 : change 'disable' to 'no' in /etc/xinetd.d/rsync
#开启rsync
9 : since iptables may be running, ensure 69, 80, and 25151 are unblocked
#确保69,80,25151这个几个端口没有iptables阻止
10 : debmirror package is not installed, it will be required to manage debian deployments and repositories
# debian的镜像包没有安装,如果不安装debian,这条可忽略
11 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one
# 要求使用以上命令行创建新的密码
12 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them
# 没有安装fencing工具,
Restart cobblerd and then run 'cobbler sync' to apply changes.上面已经说的够清楚的了吧?你看懂了嘛?下面给出我的应对之策:

修正上面错误:
1)、vi /etc/cobbler/settings
server: 192.168.1.40   #设置cobbler server的IP地址
next-server: 192.168.1.40  #设置PXE server的IP地址
manage_dhcp: 1   #开启管理DHCP服务
default_kickstart: /var/lib/cobbler/kickstarts/default.ks  #设置默认的kickstart配置文件,用system-config-kickstart(需要图形环境)生成。直接写得了。
2)、关闭防火墙和SElinux
3)、获取启动镜像
#cobbler get-loaders
4)、启动tftp和rsync
vi /etc/xinetd.d/tftp
将disable                 = yes改为:disable                 = no
vi /etc/xinetd.d/rsync
将disable                 = yes改为:disable                 = no

重启xinetd服务:
/etc/init.d/xinetd restart
5)、修改DHCP模板,确保DHCP分配的地址和Cobbler在同一网段(这个可用不这么做。你可以直接架设一个DHCP)
vi
/etc/cobbler/dhcp.template
# ******************************************************************
# Cobbler managed dhcpd.conf file
#
# generated from cobbler dhcp.conf template ($date)
# Do NOT make changes to /etc/dhcpd.conf. Instead, make your changes
# in /etc/cobbler/dhcp.template, as /etc/dhcpd.conf will be
# overwritten.
#
# ******************************************************************

ddns-update-style interim;

allow booting;
allow bootp;

ignore client-updates;
set vendorclass = option vendor-class-identifier;

subnet 192.168.1.0 netmask 255.255.255.0  {
     option routers             192.168.1.254;
     # option domain-name-servers 192.168.1.1;
     option subnet-mask         255.255.255.0;
     range dynamic-bootp        192.168.1.100 192.168.1.200;
     filename                   "/pxelinux.0";
     next-server                $next_server;
     default-lease-time         21600;
     max-lease-time             43200;
}

#for dhcp_tag in $dhcp_tags.keys():
    ## group could be subnet if your dhcp tags line up with your subnets
    ## or really any valid dhcpd.conf construct ... if you only use the
    ## default dhcp tag in cobbler, the group block can be deleted for a
    ## flat configuration
# group for Cobbler DHCP tag: $dhcp_tag
group {
        #for mac in $dhcp_tags[$dhcp_tag].keys():
            #set iface = $dhcp_tags[$dhcp_tag][$mac]
    host $iface.name {
        hardware ethernet $mac;
        #if $iface.ip_address:
        fixed-address $iface.ip_address;
        #end if
        #if $iface.hostname:
        option host-name "$iface.hostname";
        #end if
        #if $iface.subnet:
        option subnet-mask $iface.subnet;
        #end if
        #if $iface.gateway:
        option routers $iface.gateway;
        #end if
        filename "$iface.filename";
        ## Cobbler defaults to $next_server, but some users
        ## may like to use $iface.system.server for proxied setups
        next-server $next_server;
        ## next-server $iface.next_server;
    }
        #end for
}
#end for

5、同步cobbler配置,使修改生效:

#cobbler sync

6、挂载Linux光盘,生成安装镜像:

#mount /dev/cdrom /mnt/
#cobbler import --path=/mnt/ --name=RHEL5.6-x86-64
7、RPM仓库管理(根据需要自己决定吧)

相关阅读:https://fedorahosted.org/c...

我们可以为cobbler添加RPM仓库:
cobbler repo add --name= RHEL5.6-x86-64  --mirror=http://mirrors.163.com/centos/5/os/x86_64/
cobbler repo add --name=EPEL5.-x86-64   --mirror=http://mirrors.ustc.edu.cn/fedora/epel/5/x86_64/
同步仓库到本地:
cobbler reposync

也可以通过设置--mirror-locally=0不下载到本地,而通过kickstart server去仓库下载rpm包。

添加计划任务,每天凌晨两点进行一次同步:
crontab -e
0 2 * * * cobbler reposync --tries=3 --no-fail

8、设置profile和system(这个功能比较牛P。需要深入研究哈)

profile可以理解为按角色进行分类。
cobbler profile add --name=webserver --distro=CentOS-5-i386 --repos=EPEL-5-i386 --kickstart=/var/lib/cobbler/kickstarts/webserver.ks

system是对待安装机器做具体设置,如设置主机名、IP地址、hostname等,这些设置根据MAC应用到具体机器上。
#cobbler system add --name=webserver1 --ip=192.168.0.110 --mac=00:0C:29:77:89:c7 --profile=webserver --kickstart=/var/lib/cobbler/kickstarts/webserver.ks --static=1
#cobbler system edit --name=webserver1 --dns-name=webserver1.grid.house.sina.com.cn --hostname=webserver1.grid.house.sina.com.cn
cobbler system edit --name=webserver1 --gateway=192.168.0.1 --subnet=255.255.255.0
cobbler system edit --name=webserver1 --interface=eth1 --static=0

可以通过访问http://192.168.0.2/cblr/sv...来查看真正的kickstart配置。
9、启动待安装的服务器,开始安装。
10、重新安装
yum install koan
koan --server=192.168.1.40 --list=profiles
koan --replace-self --server=192.168.1.40 --profile=webserver
reboot

11、设置Cobbler web界面

Cobbler web界面是一个很好的前端,非常容易管理很多Cobbler操作。可以用它列出和编辑distros, profiles, subprofiles, systems, repos and kickstart文件。

安装Cobbler web:
yum install cobbler-web

Cobbler web界面访问地址:
http://192.168.1.40/cobble...
  (192.168.1.40为Cobbler web server地址)

设置用户名密码:
为已存在的用户重置密码:
htdigest /etc/cobbler/users.digest "Cobbler" cobbler
添加新用户:
htdigest /etc/cobbler/users.digest "Cobbler" username

设置/etc/cobbler/modules如下:
[authentication]  
module = authn_configfile  
[authorization]  
module = authz_allowall  

重启Cobbler服务:
service cobblerd restart

12、Cobbler命令说明
cobbler check - 核对当前设置是否有问题
cobbler list - 列出所有的cobbler元素
cobbler report - 详细的列出个元素
cobbler sync - 同步配置到dhcp/pxe和数据目录
cobbler reposync - 同步yum仓库

13、Cobbler配置文件说明

Cobbler配置文件存放在/etc/cobbler下。/etc/cobbler/settings为主配置文件;在/etc/cobbler下你还能看到dhcp、dns、pxe、dnsmasq的模板配置文件;/etc/cobbler/users.digest为用于web访问的用户名密码配置文件;/etc/cobbler/modules.conf 为模块配置文件;/etc/cobbler/users.conf为Cobbler WebUI/Web service授权配置文件。

Repo数据目录/var/www/cobbler
导入的发行版,repos镜像和kickstart文件都放置在/var/www/cobbler目录下。确保/var目录有足够的空间来存储这些文件。
images/ - 存储所有导入发行版的Kernel和initrd镜像用于远程网络启动  
ks_mirror/ - 存储导入的发行版  
repo_mirror/ - yum repos存储目录
/var/log/cobbler用于存放日志文件/var/log/cobbler/cobbler.log
Cobbler数据目录/var/lib/cobbler,此目录存储和Cobbler profiles、systems、distros相关的配置。
configs/ - 此目录用于存储distros、repos、systems和profiles相关信息
backup/ - 备份目录
snippets/  - 用于放置一些可以在kickstarts导入的脚本小片段
triggers/  - 此目录用来放置一些可执行脚本
kickstarts/  - 此目录用来放置kickstart模板文件
与Puppet整合进行配置管理:这个功能后续在研究吧。先写到这里。感谢你的支持。

参考文献:
https://fedorahosted.org/c...
http://candon123.blog.51ct...
http://hi.baidu.com/lenvol...
https://fedorahosted.org/c...
http://kugoou.8bbs.cn/scri...
http://consultancy.edvonck...
http://www.iteye.com/topic...
http://myhat.blog.51cto.co...



August 26, 2011

OpenLDAP实验

| Category : 红帽子认证 » RHCA笔记 | Posted by susir at 03:33 | Comments:0
说起来这个OpenLDAP的应用啊。不外乎就这么几种情况吧。(有知道的补充哈啊。)
    1.    主从服务器配置
    2     .已购环境下得应用。神马意思呢。就是说LINUX和微软的windows共存的情况下。也许这种情况比较多把。这时候OpenLDAP能派上啥用场嘛。殊不知啊。你可以将OpenLDAP配置为Active Directory的代理。神马意思自己琢磨哈啊,实在不行我后面总结篇文章。
3.     这个OpenLDAP啊。为服务提供身份验证。这个可能是我们最常用的一种做法了。譬如:Apache.Squid.Postfix.Samba。配合Samba实现DC功能。
         用着图像化的配置工具。OpenLDAPadmin屡试不爽。美很。
November 29, 2010

SSH如何防破解

| Category : Susir知识库 | Posted by susir at 16:55 | Comments:0
     当你的linux服务器暴露在互联网之中,该服务器将会遭到互联网上的扫描软件进行骚描,并试图猜测SSH登录口令。
你会发现,每天会有多条SSH登录失败纪录。那些扫描工具将对你的服务器构成威胁,你必须设置复杂登录口令,并将尝试多次登录失败的IP给阻止掉,让其在一段时间内不能访问该服务器。
用DenyHosts可以阻止试图猜测SSH登录口令,它会分析/var/log/secure等日志文件,当发现同一IP在进行多次SSH密码尝试时就会记录IP到/etc/hosts.deny文件,从而达到自动屏蔽该IP的目的。
DenyHosts官方网站为:http://denyhosts.sourcefor...
DenyHosts安装
[root@switch DenyHost]# ls -l
总用量 44
-rw-------  1 root root 42667  8月  5 19:23 DenyHosts-2.6.tar.gz
[root@switch DenyHost]# tar -zxvf DenyHosts-2.6.tar.gz
DenyHosts-2.6/
DenyHosts-2.6/PKG-INFO
DenyHosts-2.6/denyhosts.py
DenyHosts-2.6/denyhosts.cfg-dist
DenyHosts-2.6/setup.py
DenyHosts-2.6/DenyHosts/
DenyHosts-2.6/DenyHosts/prefs.py
DenyHosts-2.6/DenyHosts/report.py
DenyHosts-2.6/DenyHosts/lockfile.py
DenyHosts-2.6/DenyHosts/__init__.py
DenyHosts-2.6/DenyHosts/plugin.py
DenyHosts-2.6/DenyHosts/denyfileutil.py
DenyHosts-2.6/DenyHosts/deny_hosts.py
DenyHosts-2.6/DenyHosts/regex.py
DenyHosts-2.6/DenyHosts/sync.py
DenyHosts-2.6/DenyHosts/counter.py
DenyHosts-2.6/DenyHosts/old-daemon.py
DenyHosts-2.6/DenyHosts/util.py
DenyHosts-2.6/DenyHosts/daemon.py
DenyHosts-2.6/DenyHosts/python_version.py
DenyHosts-2.6/DenyHosts/allowedhosts.py
DenyHosts-2.6/DenyHosts/filetracker.py
DenyHosts-2.6/DenyHosts/loginattempt.py
DenyHosts-2.6/DenyHosts/restricted.py
DenyHosts-2.6/DenyHosts/purgecounter.py
DenyHosts-2.6/DenyHosts/version.py
DenyHosts-2.6/DenyHosts/constants.py
DenyHosts-2.6/CHANGELOG.txt
DenyHosts-2.6/LICENSE.txt
DenyHosts-2.6/daemon-control-dist
DenyHosts-2.6/plugins/
DenyHosts-2.6/plugins/README.contrib
DenyHosts-2.6/plugins/shorewall_allow.sh
DenyHosts-2.6/plugins/shorewall_deny.sh
DenyHosts-2.6/plugins/test_deny.py
DenyHosts-2.6/scripts/
DenyHosts-2.6/scripts/restricted_from_invalid.py
DenyHosts-2.6/scripts/restricted_from_passwd.py
DenyHosts-2.6/README.txt
DenyHosts-2.6/MANIFEST.in
 
[root@switch DenyHost]# cd DenyHosts-2.6
[root@switch DenyHosts-2.6]# ls
CHANGELOG.txt        DenyHosts           denyhosts.py  MANIFEST.in  plugins     scripts
daemon-control-dist  denyhosts.cfg-dist  LICENSE.txt   PKG-INFO     README.txt  setup.py
 
[root@switch DenyHosts-2.6]# python setup.py install
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/DenyHosts
copying DenyHosts/deny_hosts.py -> build/lib/DenyHosts
copying DenyHosts/denyfileutil.py -> build/lib/DenyHosts
copying DenyHosts/version.py -> build/lib/DenyHosts
copying DenyHosts/__init__.py -> build/lib/DenyHosts
copying DenyHosts/util.py -> build/lib/DenyHosts
copying DenyHosts/constants.py -> build/lib/DenyHosts
copying DenyHosts/restricted.py -> build/lib/DenyHosts
copying DenyHosts/plugin.py -> build/lib/DenyHosts
copying DenyHosts/sync.py -> build/lib/DenyHosts
copying DenyHosts/prefs.py -> build/lib/DenyHosts
copying DenyHosts/report.py -> build/lib/DenyHosts
copying DenyHosts/filetracker.py -> build/lib/DenyHosts
copying DenyHosts/python_version.py -> build/lib/DenyHosts
copying DenyHosts/loginattempt.py -> build/lib/DenyHosts
copying DenyHosts/allowedhosts.py -> build/lib/DenyHosts
copying DenyHosts/regex.py -> build/lib/DenyHosts
copying DenyHosts/purgecounter.py -> build/lib/DenyHosts
copying DenyHosts/old-daemon.py -> build/lib/DenyHosts
copying DenyHosts/daemon.py -> build/lib/DenyHosts
copying DenyHosts/counter.py -> build/lib/DenyHosts
copying DenyHosts/lockfile.py -> build/lib/DenyHosts
running build_scripts
creating build/scripts-2.3
copying and adjusting denyhosts.py -> build/scripts-2.3
changing mode of build/scripts-2.3/denyhosts.py from 644 to 755
running install_lib
creating /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/deny_hosts.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/denyfileutil.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/version.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/__init__.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/util.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/constants.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/restricted.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/plugin.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/sync.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/prefs.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/report.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/filetracker.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/python_version.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/loginattempt.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/allowedhosts.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/regex.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/purgecounter.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/old-daemon.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/daemon.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/counter.py -> /usr/lib/python2.3/site-packages/DenyHosts
copying build/lib/DenyHosts/lockfile.py -> /usr/lib/python2.3/site-packages/DenyHosts
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/deny_hosts.py to deny_hosts.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/denyfileutil.py to denyfileutil.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/version.py to version.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/__init__.py to __init__.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/util.py to util.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/constants.py to constants.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/restricted.py to restricted.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/plugin.py to plugin.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/sync.py to sync.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/prefs.py to prefs.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/report.py to report.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/filetracker.py to filetracker.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/python_version.py to python_version.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/loginattempt.py to loginattempt.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/allowedhosts.py to allowedhosts.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/regex.py to regex.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/purgecounter.py to purgecounter.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/old-daemon.py to old-daemon.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/daemon.py to daemon.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/counter.py to counter.pyc
byte-compiling /usr/lib/python2.3/site-packages/DenyHosts/lockfile.py to lockfile.pyc
running install_scripts
copying build/scripts-2.3/denyhosts.py -> /usr/bin
changing mode of /usr/bin/denyhosts.py to 755
running install_data
creating /usr/share/denyhosts
copying denyhosts.cfg-dist -> /usr/share/denyhosts
copying setup.py -> /usr/share/denyhosts
copying daemon-control-dist -> /usr/share/denyhosts
copying CHANGELOG.txt -> /usr/share/denyhosts
copying README.txt -> /usr/share/denyhosts
creating /usr/share/denyhosts/scripts
copying scripts/restricted_from_invalid.py -> /usr/share/denyhosts/scripts
copying scripts/restricted_from_passwd.py -> /usr/share/denyhosts/scripts
creating /usr/share/denyhosts/plugins
copying plugins/test_deny.py -> /usr/share/denyhosts/plugins
copying plugins/README.contrib -> /usr/share/denyhosts/plugins
copying plugins/shorewall_deny.sh -> /usr/share/denyhosts/plugins
copying plugins/shorewall_allow.sh -> /usr/share/denyhosts/plugins
copying LICENSE.txt -> /usr/share/denyhosts
 
DenyHosts参数配置
[root@switch DenyHosts-2.6]# cd /usr/share/denyhosts/  #DenyHosts默认安装目录
[root@switch denyhosts]# cp denyhosts.cfg-dist denyhosts.cfg
[root@switch denyhosts]# vi denyhosts.cfg  #DenyHosts配置文件
SECURE_LOG = /var/log/secure  #ssh日志文件
 
#      format is: i[dhwmy]
#      Where i is an integer (eg. 7)
#            m = minutes
#            h = hours
#            d = days
#            w = weeks
#            y = years
#
# never purge:
PURGE_DENY = 50m      #过多久后清除已阻止IP
 
HOSTS_DENY = /etc/hosts.deny      #将阻止IP写入到hosts.deny
                                                                                                                  
BLOCK_SERVICE = sshd     #阻止服务名
                                                                                                      
DENY_THRESHOLD_INVALID = 1    #允许无效用户登录失败的次数
                                                                                        
DENY_THRESHOLD_VALID = 10     #允许普通用户登录失败的次数
                                                                                     
DENY_THRESHOLD_ROOT = 5        #允许root登录失败的次数
 
WORK_DIR = /usr/local/share/denyhosts/data      #将deny的host或ip纪录到Work_dir中
 
DENY_THRESHOLD_RESTRICTED = 1     #设定 deny host 写入到该资料夹                 
 
LOCK_FILE = /var/lock/subsys/denyhosts         #将DenyHOts启动的pid纪录到LOCK_FILE中,已确保服务正确启动,防止同时启动多个服务。
                                                                    
HOSTNAME_LOOKUP=NO     #是否做域名反解                                  
                                                                    
ADMIN_EMAIL = root@data.com         #设置管理员邮件地址      
                                                                    
DAEMON_LOG = /var/log/denyhosts   #自己的日志文件  
 
DAEMON_PURGE = 10m      #该项与PURGE_DENY 设置成一样,也是清除hosts.deniedssh 用户的时间。
 
DenyHosts启动文件配置
[root@switch denyhosts]# cp daemon-control-dist daemon-control
[root@switch denyhosts]# chown root daemon-control
[root@switch denyhosts]# chmod 700 daemon-control
[root@switch denyhosts]# ./daemon-control     #DenyHosts命令格式
Usage: ./daemon-control {start [args...] | stop | restart [args...] | status | debug | condrestart [args...] }
 
For a list of valid args refer to:
$ denyhosts.py --help
[root@switch denyhosts]# ./daemon-control start         #启动DenyHosts
starting DenyHosts:    /usr/bin/env python /usr/bin/denyhosts.py --daemon --config=/usr/share/denyhosts/denyhosts.cfg
如果要使DenyHosts每次重起后自动启动还需做如下设置:
[root@switch denyhosts]# ln -s /usr/share/denyhosts/daemon-control /etc/init.d/denyhosts
[root@switch denyhosts]# chkconfig --add denyhosts
[root@switch denyhosts]# chkconfig  denyhosts on
[root@switch denyhosts]#chkconfig –level 2345 denyhosts on
或者修改/etc/rc.local文件:
root@switch denyhosts]# vi /etc/rc.local
加入下面这条命令
/usr/share/denyhosts/daemon-control start
 
[root@switch denyhosts]# tail -f /var/log/secure
Aug  5 19:20:51 switch sshd[5831]: Accepted password for root from ::ffff:192.168.1.31 port 1744 ssh2
Aug  5 19:21:00 switch sshd[5831]: Received disconnect from ::ffff:192.168.1.31: 0:
Aug  5 19:21:02 switch sshd[5865]: Accepted password for root from ::ffff:192.168.1.31 port 1745 ssh2
Aug  5 19:30:25 switch sshd[5865]: Received disconnect from ::ffff:192.168.1.31: 0:
Aug  5 19:33:48 switch sshd[5962]: Failed password for test from ::ffff:192.168.1.31 port 1756 ssh2
November 29, 2010

在CentOS中安装htop

| Category : Susir知识库 | Posted by susir at 16:50 | Comments:0
htop是一个第三方的进程查看器,与linux传统的top相比,htop更加人性化。它可让用户交互式
操作,支持颜色主题,可横向或纵向滚动浏览进程列表,并支持鼠标操作。
 
htop安装
htop官网源码下载
 
解压tar.gz文件
[root@localhost ftpdata]# mkdir /htop
[root@localhost ftpdata]# ls -l
总用量 424
-rw-------  1 ftpuser ftpuser 428061  6月 17 04:01 htop-0.8.3.tar.gz
[root@localhost ftpdata]# tar -zxvf htop-0.8.3.tar.gz  -C /htop
 
源码编译
[root@localhost htop-0.8.3]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 static flag -static works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for ceil in -lm... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking for uid_t in sys/types.h... yes
checking whether closedir returns void... no
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking return type of signal handlers... void
checking whether lstat dereferences a symlink specified with a trailing slash... yes
checking whether stat accepts an empty string... no
checking for memmove... yes
checking for strncasecmp... yes
checking for strstr... yes
checking for strdup... yes
checking whether gcc -std=c99 option works... yes
checking for refresh in -lncurses... yes
checking for curses.h... (cached) yes
checking for /proc/stat... yes
checking for /proc/meminfo... yes
checking for syscall... yes
checking sys/syscall.h usability... yes
checking sys/syscall.h presence... yes
checking for sys/syscall.h... yes
checking for unistd.h... (cached) yes
checking for __NR_sched_setaffinity... yes
checking for __NR_sched_getaffinity... yes
checking for PLPA building mode... included
checking for PLPA config prefix... plpa-1.1
checking for PLPA symbol prefix... plpa_
checking whether to build PLPA executables... no
configure: creating ./config.status
config.status: creating plpa-1.1/Makefile
config.status: creating plpa-1.1/src/Makefile
config.status: creating Makefile
config.status: creating htop.1
config.status: creating config.h
config.status: config.h is unchanged
config.status: creating plpa-1.1/src/plpa_config.h
config.status: plpa-1.1/src/plpa_config.h is unchanged
config.status: creating plpa-1.1/src/plpa.h
config.status: plpa-1.1/src/plpa.h is unchanged
config.status: executing depfiles commands
 
[root@localhost htop-0.8.3]# make
make  all-recursive
make[1]: Entering directory `/htop/htop-0.8.3‘
Making all in plpa-1.1
make[2]: Entering directory `/htop/htop-0.8.3/plpa-1.1‘
Making all in src
make[3]: Entering directory `/htop/htop-0.8.3/plpa-1.1/src‘
make  all-am
make[4]: Entering directory `/htop/htop-0.8.3/plpa-1.1/src‘
make[4]: Leaving directory `/htop/htop-0.8.3/plpa-1.1/src‘
make[3]: Leaving directory `/htop/htop-0.8.3/plpa-1.1/src‘
make[3]: Entering directory `/htop/htop-0.8.3/plpa-1.1‘
make[3]: Nothing to be done for `all-am‘.
make[3]: Leaving directory `/htop/htop-0.8.3/plpa-1.1‘
make[2]: Leaving directory `/htop/htop-0.8.3/plpa-1.1‘
make[2]: Entering directory `/htop/htop-0.8.3‘
/bin/sh ./libtool --tag=CC   --mode=link gcc -pedantic -Wall -std=c99 -D_XOPEN_SOURCE_EXTENDED -g -O2   -o htop  htop-AvailableMetersPanel.o htop-CategoriesPanel.o htop-CheckItem.o htop-ClockMeter.o htop-ColorsPanel.o htop-ColumnsPanel.o htop-CPUMeter.o htop-CRT.o htop-DebugMemory.o htop-DisplayOptionsPanel.o htop-FunctionBar.o htop-Hashtable.o htop-Header.o htop-htop.o htop-ListItem.o htop-LoadAverageMeter.o htop-MemoryMeter.o htop-Meter.o htop-MetersPanel.o htop-Object.o htop-Panel.o htop-BatteryMeter.o htop-Process.o htop-ProcessList.o htop-RichString.o htop-ScreenManager.o htop-Settings.o htop-SignalItem.o htop-SignalsPanel.o htop-String.o htop-SwapMeter.o htop-TasksMeter.o htop-TraceScreen.o htop-UptimeMeter.o htop-UsersTable.o htop-Vector.o htop-AvailableColumnsPanel.o htop-AffinityPanel.o htop-HostnameMeter.o htop-OpenFilesScreen.o ./plpa-1.1/src/libplpa_included.la -lncurses -lm
mkdir .libs
gcc -pedantic -Wall -std=c99 -D_XOPEN_SOURCE_EXTENDED -g -O2 -o htop htop-AvailableMetersPanel.o htop-CategoriesPanel.o htop-CheckItem.o htop-ClockMeter.o htop-ColorsPanel.o htop-ColumnsPanel.o htop-CPUMeter.o htop-CRT.o htop-DebugMemory.o htop-DisplayOptionsPanel.o htop-FunctionBar.o htop-Hashtable.o htop-Header.o htop-htop.o htop-ListItem.o htop-LoadAverageMeter.o htop-MemoryMeter.o htop-Meter.o htop-MetersPanel.o htop-Object.o htop-Panel.o htop-BatteryMeter.o htop-Process.o htop-ProcessList.o htop-RichString.o htop-ScreenManager.o htop-Settings.o htop-SignalItem.o htop-SignalsPanel.o htop-String.o htop-SwapMeter.o htop-TasksMeter.o htop-TraceScreen.o htop-UptimeMeter.o htop-UsersTable.o htop-Vector.o htop-AvailableColumnsPanel.o htop-AffinityPanel.o htop-HostnameMeter.o htop-OpenFilesScreen.o  ./plpa-1.1/src/.libs/libplpa_included.a -lncurses -lm
make[2]: Leaving directory `/htop/htop-0.8.3‘
make[1]: Leaving directory `/htop/htop-0.8.3‘
 
 
[root@localhost htop-0.8.3]# make install
make  install-recursive
make[1]: Entering directory `/htop/htop-0.8.3‘
Making install in plpa-1.1
make[2]: Entering directory `/htop/htop-0.8.3/plpa-1.1‘
Making install in src
make[3]: Entering directory `/htop/htop-0.8.3/plpa-1.1/src‘
make[4]: Entering directory `/htop/htop-0.8.3/plpa-1.1/src‘
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
test -z "/usr/local/include" || /bin/mkdir -p "/usr/local/include"
make[4]: Leaving directory `/htop/htop-0.8.3/plpa-1.1/src‘
make[3]: Leaving directory `/htop/htop-0.8.3/plpa-1.1/src‘
make[3]: Entering directory `/htop/htop-0.8.3/plpa-1.1‘
make[4]: Entering directory `/htop/htop-0.8.3/plpa-1.1‘
make[4]: Nothing to be done for `install-exec-am‘.
make[4]: Nothing to be done for `install-data-am‘.
make[4]: Leaving directory `/htop/htop-0.8.3/plpa-1.1‘
make[3]: Leaving directory `/htop/htop-0.8.3/plpa-1.1‘
make[2]: Leaving directory `/htop/htop-0.8.3/plpa-1.1‘
make[2]: Entering directory `/htop/htop-0.8.3‘
make[3]: Entering directory `/htop/htop-0.8.3‘
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
  /bin/sh ./libtool --mode=install /usr/bin/install -c ‘htop‘ ‘/usr/local/bin/htop‘
/usr/bin/install -c htop /usr/local/bin/htop
test -z "/usr/local/share/applications" || /bin/mkdir -p "/usr/local/share/applications"
 /usr/bin/install -c -m 644 ‘htop.desktop‘ ‘/usr/local/share/applications/htop.desktop‘
test -z "/usr/local/share/man/man1" || /bin/mkdir -p "/usr/local/share/man/man1"
 /usr/bin/install -c -m 644 ‘./htop.1‘ ‘/usr/local/share/man/man1/htop.1‘
test -z "/usr/local/share/pixmaps" || /bin/mkdir -p "/usr/local/share/pixmaps"
 /usr/bin/install -c -m 644 ‘htop.png‘ ‘/usr/local/share/pixmaps/htop.png‘
make[3]: Leaving directory `/htop/htop-0.8.3‘
make[2]: Leaving directory `/htop/htop-0.8.3‘
make[1]: Leaving directory `/htop/htop-0.8.3‘
 
htop程序截图如下
[root@localhost htop-0.8.3]# htop
 
November 29, 2010

官方faq地址: ftp://vsftpd.beasts.org/us... 
这里也有,vsftpdrocks.org是一个很棒的关于vsftpd安装和配置的网站

Q1) 我能把用户限制在他的家(home)目录里吗? 
A) 
能,设置chroot_local_user=YES就行了。

Q2) 为什么设置了chroot_local_user=YES后,符号链接(symlink)就不起作用了呢? 
A) 
这是chroot()这种安全机制如何工作的结果。可选地,看一下硬连接(hard links),或者,你用的是现代的”Linux,看一下强大的"mount --bind"命令。

Q3) vsftpd支持限制用户连接数吗? 
A1) 
是的,间接地。vsftpd是一个基于inetd的服务。如果你使用流行的xinetd,它会支持per-service per-IP的连接限制。"EXAMPLE"目录里有这样的一个例子。 
A2) 
如果你以"standalone"方式运行vsftpd(方法是设置listen=YES),你可以研究一下max_clients=10这样的设置。 

Q4) 求助!我得到了"refusing to run with writable anonymous 
root"
错误信息。 
A) vsftpd
是不允许危险(不安全)”的配置的。出现这个错误信息的原因通常是ftp的家(home)目录的属主权限不正确。家(home)目录的属主不应该是ftp用户自己,而且ftp用户也不能有写的权限。解决的方法是: chown root ~ftp; chmod -w ~ftp 

Q5) 求助!我得到了"str_getpwnam"错误信息。 
A) 
最有可能的原因是在你的系统中不存在那个被配置成'nopriv_user'的用户(一般是 'nobody') vsftpd需要通过它以最低的权限运行。

Q6) 求助!本地用户无法登录。 
A) 
有几种可能的问题导致无法登录。 
A1) 
默认情况下,vsftpd只允许匿名用户(anonymous)登录。在你的/etc/vsftpd.conf配置文件中加入local_enable=YES就可以让本地用户登录了。 
A2) vsftpd
需要与PAM联系 (运行"ldd vsftpd"检查结果中有没有libpam可以确定这个). 如果vsftpd需要PAM支持你必须为vsftpd服务准备一个PAM文件"RedHat"目录下有一个为RedHat系统准备的PAM文件的例子,把它放在/etc/pam.d目录下。 
A3) 
如果vsftpd不需要PAM, 那么会有多种原因导致这种情况用户的shell /etc/shells文件中吗如果你使用shadow passwd,那么include路径中有没有shadow.h文件
A4) 
如果你没有用PAM, vsftpd会用自己的方法检查用户的shell是否合法如果想用一个非法的shell(这样用户就只能用FTP登录),你可以在配置文件中加入check_shell=NO. 

Q7) 求助!上传或其他命令都报"500 Unknown command.". 
A) 
默认情况下命令(上传和建新目录等)都是被禁止的这是一种安全的方法要允许写命令需要在配置文件/etc/vsftpd.conf中加入write_enable=YES. 

Q8) 求助!chroot_local_user这个选项里有什么安全隐患? 
A) 
首先注意其他ftp服务器也有同样的隐患。这是个一般性的问题。这个问题不是很严重,但它是这样的:有些人使不被信任的ftp帐户具有了全部的shell 访问权限。如果这些帐户可以上传文件,那就会有一点风险。一个坏用户就可以控制作为其家目录的文件系统的根目录。FTP进程也许会使一些配置文件被访问 到,例如/etc/some_file。使用chroot(),这个文件就处于此用户的控制之下。vsftpd非常在意这些安全问题。但是,系统的 libc也许想打开语言配置文件或其他的什么配置...... 

Q9) 求助!上传后的文件权限是-rw------- 
A1) 
根据上传用户是本地用户还是匿名用户,修改local_umaskanon_umask选项。例如,设置anon_umask=022指定匿名上传的文件权限为-rw-r--r--。注意,22前面的0不能少。 
A2) 
也可以看看vsftpd.confman帮助中的新选项file_open_mode

Q10) 求助!我如何集成LDAP用户登录? 
A) 
使vsftpd结合PAM,配置PAM使用LDAP认证。

Q11) 求助!vsftpd可以配置成虚拟主机(virtual hosting)吗? 
A1) 
可以。如果你使用xinetd方式运行vsftpd,可以将xinetd绑定到几个不同的IP地址。针对每一个IP地址,xinetd使用不同的配置文件启动vsftpd。这样,你就能在每个IP上配置不同的vsftpd服务。 
A2) 
也可以用standalone方式运行多个vsftpd实例。使用选项listen_address=x.x.x.x设置虚拟IP

Q12) 求助!vsftpd支持虚拟用户(virtual users)吗? 
A) 
支持,通过PAM集成。在/etc/vsftpd.conf中设置guest_enable=YES,这样的效果是所有非匿名用户的成功登录都映射成 guest_username指定的本地用户。然后,使用PAM和(例如:)它的pam_userdb模块,就可以提高基于外部用户库(即不使用/etc /passwd)的认证。注意:当guest_enable生效后会有一个限制,就是本地用户也被映射到guest_username(译者:也就是说虚 拟用户与本地用户不能同时使用)。EXAMPLE目录里有配置虚拟用户的例子。

Q13) 求助!vsftpd支持不同的用户使用不同的配置吗? 
A) 
支持,而且功能强大。看man帮助里的user_config_dir选项。

Q14) 求助!我可以把vsftpd的数据连接(data connections)限制到指定范围的端口吗? 
A) 
可以。看配置选项pasv_min_portpasv_max_port

Q15) 求助!我看到了"OOPS: chdir"这样的信息。 
A) 
如果这是匿名用户在登录,就检查系统用户ftp的家目录是否正确。如果你使用了anon_root这个选项,也要检查该选项是否正确。

Q16) 求助!vsftpd显示的是GMT时间,而不是本地时间
A) 
这个可以通过设置use_localtime=YES来解决。

Q17) 求助!我能禁用某些FTP命令吗? 
A) 
可以。有一些单独的选项(比如dirlist_enable),或者可以通过cmds_allowed选项指定允许的命令集。

Q18) 求助!我可以改变vsftpd的工作端口吗? 
A1) 
可以。如果以standalone方式运行vsftpd,可以用vsftpd.conf中的listen_port选项(指定端口)。 
A2) 
可以。如果以inetdxinetd方式运行vsftpd,那么这个问题由inetdxinetd负责。你就必须修改inetdxinetd的配置文件(可能是/etc/inetd.conf/etc/xinetd.d/vsftpd)。

Q19) 求助!vsftpd可以使用LDAP服务器进行验证吗?或者使用Mysql数据库? 
A) 
是的。vsftpd可以使用PAM进行验证,所以你需要配置PAM使用pam_ldappam_mysql模块。这包括安装PAM模块,然后编辑vsftpdPAM配置文件(可能是/etc/pam.d/vsftpd)。

Q20) 求助!vsftpd支持每IP限制(per-IP limits)吗? 
A1) 
是的。如果以standalone方式运行vsftpd,可以使用max_per_ip选项。 
A2) 
是的。如果以xinetd方式运行vsftpd,可以用xinetd的配置参数per_source

Q21) 求助!vsftpd支持带宽限制吗? 
A) 
支持。看man帮助(vsftpd.conf.5)中的"anon_max_rate" "local_max_rate"选项。

Q22) 求助!vsftpd支持基于IPIP-based)的访问控制吗? 
A1) 
可以结合tcp_wrappers实现(前提是编译是加了tcp_wrappers支持)。通过设置tcp_wrappers=YES启用它。 
A2) 
xinetd方式运行vsftpdxinetd可以结合tcp_wrappers

Q23) 求助!vsftpd支持IPv6吗? 
A) 
从版本1.2.0开始就支持了。看vsftpd.confman帮助。

Q24) 求助!vsftpd编译失败,错误是不能找到-lcapunable to find -lcap)。 
A) 
安装libcap package再试。好像Debian用户遇到这个问题多一些。

Q25) 求助!我的配置文件是/etc/vsftpd.conf,可是好像不起作用! 
A) RedHat
用户会遇到这个问题  - 一些RedHat版本中vsftpd的配置文件是/etc/vsftpd/vsftpd.conf. 

Q26) 求助!vsftpd编译失败,报sysutil.c中有不完整的类型(types)。 
A) 
你的系统可能不支持IPv6。要么在一个现代一些(支持IPv6)的系统中使用老版本的vsftpd(例如 v1.1.3),要么等没有这个问题的版本出来。

Q27) 求助!下载(尤其是大量小文件)时看到很多这样的信息:“500 OOPS: vsf_sysutil_bind” 
A) vsftpd-1.2.1
已经解决了这个问题。

Q28) 求助!vsftpd可以隐藏或拒绝访问某些文件吗? 
A) 
可以。看看vsftpd.confman帮助中的hide_filedeny_file选项。

Q29) 求助!vsftpd支持FXP吗? 
A) 
支持。FTP服务器不需要特别配置就可以支持FXP。但由于vsftpdIP地址上的安全限制,你可能不会成功。想放宽这种限制,可以看看 vsftpd.confman帮助(vsftpd.conf.5)中关于pasv_promiscuous(和不太推荐使用的port_promiscuous)选项。

Q30) ...... 
A) 
想进一步了解vsftpd,请阅读vsftpd.confman帮助和配置示例。


FTP错误代码 
1xx - 
肯定的初步答复 
这些状态代码指示一项*作已经成功开始,但客户端希望在继续*作新命令前得到另一个答复。 
•  110 
重新启动标记答复。 
•  120 
服务已就绪,在 nnn 分钟后开始。 
•  125 
数据连接已打开,正在开始传输。 
•  150 
文件状态正常,准备打开数据连接。 
2xx - 
肯定的完成答复 
一项*作已经成功完成。客户端可以执行新命令。 
•  200 
命令确定。 
•  202 
未执行命令,站点上的命令过多。 
•  211 
系统状态,或系统帮助答复。 
•  212 
目录状态。 
•  213 
文件状态。 
•  214 
帮助消息。 
•  215 NAME 
系统类型,其中,NAME  Assigned Numbers 文档中所列的正式系统名称。 
•  220 
服务就绪,可以执行新用户的请求。 
•  221 
服务关闭控制连接。如果适当,请注销。 
•  225 
数据连接打开,没有进行中的传输。 
•  226 
关闭数据连接。请求的文件*作已成功(例如,传输文件或放弃文件)。 
•  227 
进入被动模式 (h1,h2,h3,h4,p1,p2) 
•  230 
用户已登录,继续进行。 
•  250 
请求的文件*作正确,已完成。 
•  257 
已创建“PATHNAME” 
3xx - 
肯定的中间答复 
该命令已成功,但服务器需要更多来自客户端的信息以完成对请求的处理。 
•  331 
用户名正确,需要密码。 
•  332 
需要登录帐户。 
•  350 
请求的文件*作正在等待进一步的信息。 
4xx - 
瞬态否定的完成答复 
该命令不成功,但错误是暂时的。如果客户端重试命令,可能会执行成功。 
•  421 
服务不可用,正在关闭控制连接。如果服务确定它必须关闭,将向任何命令发送这一应答。 
•  425 
无法打开数据连接。 
•  426 Connection closed; transfer aborted. 
•  450 
未执行请求的文件*作。文件不可用(例如,文件繁忙)。 
•  451 
请求的*作异常终止:正在处理本地错误。 
•  452 
未执行请求的*作。系统存储空间不够。 
5xx - 
永久性否定的完成答复 
该命令不成功,错误是永久性的。如果客户端重试命令,将再次出现同样的错误。 
•  500 
语法错误,命令无法识别。这可能包括诸如命令行太长之类的错误。 
•  501 
在参数中有语法错误。 
•  502 
未执行命令。 
•  503 
错误的命令序列。 
•  504 
未执行该参数的命令。 
•  530 
未登录。 
•  532 
存储文件需要帐户。 
•  550 
未执行请求的*作。文件不可用(例如,未找到文件,没有访问权限)。 
•  551 
请求的*作异常终止:未知的页面类型。 
•  552 
请求的文件*作异常终止:超出存储分配(对于当前目录或数据集)。 
•  553 
未执行请求的*作。不允许的文件名。

常见的 FTP 状态代码及其原因 
•  150 - FTP 
使用两个端口:21 用于发送命令,20 用于发送数据。状态代码 150 表示服务器准备在端口 20 上打开新连接,发送一些数据。 
•  226 - 
命令在端口 20 上打开数据连接以执行*作,如传输文件。该*作成功完成,数据连接已关闭。 
•  230 - 
客户端发送正确的密码后,显示该状态代码。它表示用户已成功登录。 
•  331 - 
客户端发送用户名后,显示该状态代码。无论所提供的用户名是否为系统中的有效帐户,都将显示该状态代码。 
•  426 - 
命令打开数据连接以执行*作,但该*作已被取消,数据连接已关闭。 
•  530 - 
该状态代码表示用户无法登录,因为用户名和密码组合无效。如果使用某个用户帐户登录,可能键入错误的用户名或密码,也可能选择只允许匿名访问。如果使用匿名帐户登录,IIS 的配置可能拒绝匿名访问。 
•  550 - 
命令未被执行,因为指定的文件不可用。例如,要 GET 的文件并不存在,或试图将文件 PUT 到您没有写入权限的目录。

November 25, 2010

最近安装了RHEL 6的朋友们可能会发现,系统里面没自带的.repo文件了,所以做本地源比较麻烦。下面和大家分享一下使用光盘镜像做yum源的方法。

使用本地源和用光盘镜像做源的原理是一样的,只要在.repo文件中指明源的目录就可以了,http、ftp、本地文件夹都是可以的。

下面的情况是我把RHEL 6装到了虚拟机里面,在vmware里面把RHEL6的镜像设置成了每次开机自动连接,并在RHEL6系统的rc.local里面写了

mount /dev/cdrom /media

这样保证每次系统启动的时候都能把光盘里面的内容挂载到/media目录中。

下面的工作就是写个.repo的文件了,文件名自己随便起,我一般都用local.repo。下面就是我写的RHEL5和RHEL6最简单的本地repo文件:

RHEL 5

[local-Server] baseurl=file:///media/Server enabled=1 gpgcheck=0 [local-VT] baseurl=file:///media/VT enabled=1 gpgcheck=0 [local-Cluster] baseurl=file:///media/Cluster enabled=1 gpgcheck=0 [local-ClusterStorage] baseurl=file:///media/ClusterStorage enabled=1 gpgcheck=0

RHEL 6

[local-Server] baseurl=file:///media/Server enabled=1 gpgcheck=0 [local-HA] baseurl=file:///media/HighAvailability enabled=1 gpgcheck=0 [local=LB] baseurl=file:///media/LoadBalancer enabled=1 gpgcheck=0 [local-RS] baseurl=file:///media/ResilientStorage enabled=1 gpgcheck=0
November 11, 2010

红帽企业版Linux生命周期

| Category : 牛俊杂谈 | Posted by susir at 09:25 | Comments:0

概述

红帽为红帽企业版Linux (RHEL)(即3、4或5版)“生命周期”的各大版本提供规定时限的支持和维护服务。生命周期使客户和合作伙伴能够有效地规划、部署和支持红帽企业版Linux。

红帽企业版Linux生命周期为红帽企业版Linux在从最初发布之日(也称为全面上市日期)起的十年期限内的每个大版本确定了多个维护级别。

红帽企业Linux的软件更新通过勘误报告形式提供。勘误可以在需要时单独提供,也可以通过小版本的形式集中提供(例如,版本5.2,有时也称为“服务包”)。勘误可包含安全与错误修复,以及特性增强。所有勘误都根据适当的红帽企业版Linux版本而进行全面的测试和鉴定。

RHEL生命周期的设计旨在降低每个大版本在长时间内的变化等级,以提高可预测性,并降低维护成本。所有相关的勘误在整个生命值期内可由活动用户访问。红帽公布本生命周期服务的目的是尽可能地提供更高的透明性,而且可能在发生冲突的情况下遵守这些政策。

红帽企业版Linux的每个大版本在十年生命值期内独立维护与支持。对于红帽企业版Linux的每个大版本,任何勘误都以增量方式适用于之前发布的勘误。

在整个生命值期内,红帽通过商业上合理的努力保持所有小版本和不同时期的勘误之间的核心运行环境的二进制兼容性(可能的例外包括关键安全问题)。此外,红帽企业Linux的大版本包含来自以前大版本的有限的一套后向兼容的库,用于帮助完成应用从一个大版本向另一个大版本的移植。

7年生命周期
生产 1(约4年)生产 2(约1年)生产 3(约2年)
第1年第2年第3年第4年第5年第6年第7年
生命周期的示意图。七年生命周期的时间跨度和日期可能会调整。

详细说明

红帽企业版Linux大版本的生命周期的总长度为十年,其中包括七年的常规生命周期和可选的三年扩展s生命周期(Extended Life Cycle),并划分为四个独立的生命周期阶段。

包含扩展生命周期阶段的完整生命周期:
生产 1(4年)生产 2(1年)生产 3(2年)扩展生命周期(ELS) (3年)
第1年第2年第3年第4年第5年第6年第7年ELS 第1年ELS 第2年ELS 第3年

下表详细列出了在十年生命周期的每个阶段内执行的软件维护类型:

生命周期阶段
描述生产 1生产 2生产 3
不限问题数量的技术支持1
异步的安全勘误
异步的错误修复勘误2
小版本
更新的硬件启用3本地有限制4 本地通过虚拟化
软件增强5
更新的安装镜像
  1. 支持服务的全部细节作为《订阅协议》的一部分提供。
  2. 在创建错误修复勘误的过程中,红帽可选择通过Hotfix作为临时措施而为客户解决对业务有严重影响的灾难性问题。
  3. 本地硬件启用由向后移植硬件驱动程序等提供。通过虚拟化执行硬件启用则通过在新版本红帽企业Linux上运行先前版本的企业Linux作为虚拟客户机而实现。详见下文(虚拟化)。
  4. 仅限于不需要重大软件更改的硬件,详情参见正文(生产2)。
  5. 大版本是软件增强的主要渠道。

生产1生命周期阶段i:

在生产1阶段,至少可能发布具有重要或关键影响且经过鉴定的安全勘误,以及紧急优先级的错误修复勘误,而与小版本无关。

如果可用,红帽可自行决定提供更新硬件启用和所选的增强软件功能,一般通过小版本提供。小版本也将包括可用的和经过鉴定的勘误。在本生命周期阶段,小版本的重点是采用日益严格的入选标准解决中度或高度优先级的缺陷。

在生产1生命周期阶段将为小版本提供更新的安装镜像。

生产2生命周期阶段ii:

在生产2生命周期阶段,至少可能发布具有重要或关键影响且经过鉴定的安全勘误,以及紧急优先级的错误修复勘误,而与小版本无关。

如果可用,红帽可自行决定通过小版本提供不需要重大软件更改的更新硬件启用。在这一阶段,新软件功能不可用。所有可用且经过鉴定的勘误将通过小版本提供。在这个生命周期阶段,小版本的重点是至少解决高优先级的缺陷。

在生产2生命周期阶段,如果由于红帽自行决定对安装程序做出更改,则仅为小版本提供更新的安装镜像。

生产3生命周期阶段iii:

在生产3生命周期阶段,至少可能发布具有重要或关键影响且经过鉴定的安全勘误,以及所推出的某些关键任务错误修复。

在生产3生命周期阶段将不提供新功能、新硬件启用或更新的安装镜像。本阶段不提供小版本。

扩展生命周期阶段iv:

作为常规红帽企业Linux订阅可选的附加订阅v,好卖提供了扩展生命周期支持 (ELS)。ELS在红帽企业Linux常规的七年生命周期之后,以红帽企业Linux特定小版本形式为少量程序包提供了具有关键影响的安全修复和选定的紧急优先级缺陷修复(如果推出并经过鉴定)。每个ELS流的维护期为相关版本的常规生命周期结束之日后立即开始的3年(将潜在的生命周期延长至十年)。ELS仅限于特定的硬件架构。

虚拟化

红帽计划为位于七年生命周期内、作为虚拟客户机运行在红帽企业Linux较晚版本上的红帽企业Linux版本提供支持。然而,要获得支持资格,红帽可能要求客户机和主机版本都已应用最新推出的勘误。位于“延长生命周期支持”内的RHEL的每个版本都作为主机版本上的客户机支持,而支持期限为常规的七年生命周期。

硬件认证(包括相关的硬件限制)基于用作主机的企业Linux的版本。红帽可自行决定为特定的虚拟化场景(例如半虚拟化驱动程序)提供额外的优化。

红帽企业版Linux虚拟化-支持矩阵提供了所支持的操作系统、版本和硬件架构组合的详细信息。

生命周期日期


红帽企业版Linux 3
全面上市: 
2003年10月23日
生产1阶段生产2阶段生产3阶段扩展生命周期阶段
开始结束开始结束开始结束开始结束
2003年10月23日2006年7月20日2006年7月20日2007年6月30日2007年6月30日2010年10月31日2010年10月31日2013年10月31日
红帽企业版Linux 4
全面上市:
2005年2月14日
生产1阶段生产2阶段生产3阶段扩展生命周期阶段
开始结束开始结束开始结束开始结束
2005年2月14日2009年3月31日2009年3月31日2010年4季度2010年4季度2012年2月29日2012年2月29日2015年2月28日
红帽企业版Linux 5
全面上市:
2007年3月15日
生产1阶段生产2阶段生产3阶段扩展生命周期阶段
开始结束开始结束开始结束开始结束
2007年3月14日2011年4季度2011年4季度2012年4季度2012年4季度2014年3月31日2014年3月31日2017年3月31日

红帽企业版Linux 5发行注记

服务器:客户端:
  • i. 生产1生命周期阶段以前称作“全面支持”阶段。
  • ii. 生产2生命周期阶段以前称作“部署”或“过渡”阶段。
  • iii. 生产3生命周期阶段以前称作“维护”阶段。
  • iv. 关于ELS附加订阅的详细信息,请参阅 http://www.redhat.com/rhel....
November 9, 2010

ks快速部署红帽linux

| Category : 感恩.分享 | Posted by susir at 23:50 | Comments:0
2010.11.9日分享内容
点击在新窗口中浏览此图片


PPT先放出来。。。视频正在录制中。。。详情请联系我。。

下载地址:http://susir.zzl.org/kejia...
November 9, 2010

公告

| Category : 感恩.分享 | Posted by susir at 23:42 | Comments:0
本博客不定期分享红帽产品相关知识点。希望广大技术爱好者加入交流,共同提高我们本着,以动手实践为荣 , 以只看不练为耻;以总结分享为荣 , 以跪求其解为耻为宗旨!!!感谢广大博友的支持。本博客技术讨论QQ群号:54114398 欢迎广大博友加入交流,
QQ群:(^o^)RHCA战友群      群号:54114398
MSN群地址:OpenSources@groups.live.com

October 28, 2010

将5张以CD合成一长DVD

| Category : Susir知识库 | Posted by susir at 10:54 | Comments:0
1 将5张以CD合成一长DVD
touch /root/make_dvd.sh
内容如下
#!/bin/bash

# by Chris Kloiber <ckloiber@redhat.com>

# A quick hack that will create a bootable DVD iso of a Red Hat Linux
# Distribution. Feed it either a directory containing the downloaded
# iso files of a distribution, or point it at a directory containing
# the "RedHat", "isolinux", and "images" directories.

# This version only works with "isolinux" based Red Hat Linux versions.

# Lots of disk space required to work, 3X the distribution size at least.

# GPL version 2 applies. No warranties, yadda, yadda. Have fun.


if [ $# -lt 2 ]; then
        echo "Usage: `basename $0` source /destination/DVD.iso"
        echo ""
        echo "        The 'source' can be either a directory containing a single"
        echo "        set of isos, or an exploded tree like an ftp site."
        exit 1
fi

cleanup() {
[ ${LOOP:=/tmp/loop} = "/" ] && echo "LOOP mount point = \/, dying!" && exit
[ -d $LOOP ] && rm -rf $LOOP
[ ${DVD:=~/mkrhdvd} = "/" ] && echo "DVD data location is \/, dying!" && exit
[ -d $DVD ] && rm -rf $DVD
}

cleanup
mkdir -p $LOOP
mkdir -p $DVD

if [ !`ls $1/*.iso 2>&1>/dev/null ; echo $?` ]; then
        echo "Found ISO CD images..."
        CDS=`expr 0`
        DISKS="1"

        for f in `ls $1/*.iso`; do
                mount -o loop $f $LOOP
                cp -av $LOOP/* $DVD
                if [ -f $LOOP/.discinfo ]; then
                        cp -av $LOOP/.discinfo $DVD
                        CDS=`expr $CDS + 1`
                        if [ $CDS != 1 ] ; then
                                DISKS=`echo ${DISKS},${CDS}`
                        fi
                fi
                umount $LOOP
        done
        if [ -e $DVD/.discinfo ]; then
                awk '{ if ( NR == 4 ) { print disks } else { print ; } }' disks="$DISKS" $DVD/.discinfo > $DVD/.discinfo.new
                mv $DVD/.discinfo.new $DVD/.discinfo
        fi
else
        echo "Found FTP-like tree..."
        cp -av $1/* $DVD
        [ -e $1/.discinfo ] && cp -av $1/.discinfo $DVD
fi

rm -rf $DVD/isolinux/boot.cat
find $DVD -name TRANS.TBL | xargs rm -f

cd $DVD
mkisofs -J -R -v -T -o $2 -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table .
/usr/lib/anaconda-runtime/implantisomd5 --force $2

cleanup
echo ""
echo "Process Complete!"
echo ""
3 cd /root
chmod a+x make_dvd.sh
假设我的5张cd在
/wind/redhat/rhel-5-server-i386-disc1.iso
/wind/redhat/rhel-5-server-i386-disc2.iso
/wind/redhat/rhel-5-server-i386-disc3.iso
/wind/redhat/rhel-5-server-i386-disc4.iso
/wind/redhat/rhel-5-server-i386-disc5.iso
./make_dvd.sh /wind/redhat /mydoc/rhel-5-server-i386-DVD.iso
然后在/mydoc目录下产生rhel-5-server-i386-DVD.iso
5 mkdir /rhel_dvd
mount -o loop /mydoc/rhel-5-server-i386-DVD.iso /rhel_dvd
6gedit /etc/yum.repos.d/rhel_local.repo
内容如下:
[Cluster]
name=Red Hat Enterprise Linux $releasever-$basearch-Cluster
baseurl=file:///rhel_dvd/Cluster
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[ClusterStorage]
name=Red Hat Enterprise Linux $releasever-$basearch-ClusterStorage
baseurl=file:///rhel_dvd/ClusterStorage
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[Server]
name=Red Hat Enterprise Linux $releasever-$basearch-Server
baseurl=file:///rhel_dvd/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[VT]
name=Red Hat Enterprise Linux $releasever-$basearch-VT
baseurl=file:///rhel_dvd/VT
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

7执行createrepo命令,如果找不到命令,则要先安装createrepo的rpm包,自己google吧
为了方便,创建一个sh文件
touch /root/yum.sh
内容如下:
mkdir -p /var/rhel/{Server,Cluster,ClusterStorage,VT}
createrepo -o /var/rhel/Cluster -g /rhel_dvd/Cluster/repodata/comps-rhel5-cluster.xml /rhel_dvd/Cluster
createrepo -o /var/rhel/ClusterStorage -g /rhel_dvd/ClusterStorage/repodata/comps-rhel5-cluster-st.xml /rhel_dvd/ClusterStorage
createrepo -o /var/rhel/Server -g /rhel_dvd/Server/repodata/comps-rhel5-server-core.xml /rhel_dvd/Server
createrepo -o /var/rhel/VT -g /rhel_dvd/VT/repodata/comps-rhel5-vt.xml /rhel_dvd/VT
mount --bind /var/rhel/Cluster/repodata /rhel_dvd/Cluster/repodata
mount --bind /var/rhel/ClusterStorage/repodata /rhel_dvd/ClusterStorage/repodata
mount --bind /var/rhel/Server/repodata /rhel_dvd/Server/repodata
mount --bind /var/rhel/VT/repodata /rhel_dvd/VT/repodata
yum clean all
chmod a+x yum.sh
./yum.sh
完成
October 15, 2010

Android手机下设置登录VPN服务器图文介绍(PPTP模式)

以下为PPTP模式设置步骤,如果您的网络不能使用PPTP模式连接,再选择L2TP模式连接。点击这里查看Android L2TP设置

第一步: 打开手机主菜单,选择“设置”,然后选择“无线和网络”

第二步:选择“虚拟专用网设置”

第三步:选择“添加虚拟专用网”

第四步:选择“添加VPN PPTP”

第五步:进入PPTP连接设置界面

第六步:点击输入虚拟专用网名称“pptp”(此名称可自己随便定义)

第七步:点击填写您所登录的服务器地址(用户登录站点后查看VPN帐户选项卡中的服务器地址列表),点击“确定”

第八步:DNS搜索范围可不填,也可选填如“8.8.8.8”,然后返回

第九步:点击刚创建的VPN连接登录,用户名和密码填写在vpncup.com网站上注册时候的用户名和VPN登录密码(由于VPNCUP将站点登录密码和VPN登录密码分开管理,登录网站可在后台VPN帐户中修改VPN登录密码),然后点击“连接”

完成,由于安卓版本繁多及所使用网络,还有路由器是否支持VPN等等各种原因,使用安卓登录VPN可能比苹果及XP等要困难些,还有安卓是否已经root等权限的问题,所以如果通过此图文介绍的教程用户尝试了PPTP及L2TP模式都连不上VPN的,可以通过各大安卓的论坛找到高手是怎么更改root权限及相应版本是如何打VPN补丁的,有些用户通过更改下权限就可以了,可以尝试下下面这个命令“chmod 777 /etc/ppp/ip-up-vpn”,谢谢!
October 15, 2010

Apple Iphone和Apple iTouch设置登录VPN服务器图文介绍(PPTP模式)

以下为PPTP模式设置步骤,如果您的网络不能使用PPTP模式连接,再选择L2TP模式连接。点击这里查看Apple L2TP设置

第一步:点击桌面上的“设置”图标进入设置

第二步:点击“通用”进入通用设置

第三步:点击“网络”,进入网络设置

第四步:点击“VPN”进入VPN设置

第五步:点击“添加VPN配置”

第五步:按照下面的示意图,在协议类型上选择“PPTP”,在“描述”栏中填入“VPN”,在服务器栏中填入您能够使用的VPN服务器地址(用户登录站点后查看VPN帐户选项卡中的服务器地址列表),在账户和密码栏中填入您在VPNCUP上注册的用户名和VPN登录密码(由于VPNCUP.COM将站点登录密码和VPN登录密码分开管理,登录网站后台中的VPN帐户中修改VPN登录密码),其他设置保持不变,然后点击“存储”,注意加密级别要选自动,不加密将连不上服务器。

第六步:点击“VPN”开关,就会开启VPN连接,连接成功后,iphone右上角会出现"VPN"小图标

第七步:打开浏览器,试试能不能上 www.youtube.com,如果可以则表示VPN连接成功!

October 15, 2010

Ubuntu设置登录VPN服务器图文介绍

现ubuntu最新版本10.04 LTS已发布,在此使用此平台给用户介绍说明设置连接VPN的流程,如果您使用的是其他版本,由于早期版本PPTP有个小bug,可参照最后说明如何设置。

首先在此假设我们已经配置好网络和更新源了,并且已安装了最新更新。

第一步:打开网络连接,选择VPN选项卡,然后点击添加按钮

第二步:选择连接的VPN类型,现在PPTP,点击新建

第三步:Gateway(网关)填写vpn的服务器地址(用户登录站点后查看VPN帐户选项卡中的服务器地址列表),然后填写用户名和密码,再点击Advanced(高级)

第四步:在验证方式框中去掉EAP,选择勾上MPPE,然后点击确认即可以

第五步:连接到VPN服务器

然后看如果连接小图标下有个小锁表明已经连接成功


由于ubuntu早期版本pptp有个小bug,需要配置一下才能连接上VPN服务器

首先配置好网络和更新源

运行命令#sudo apt-get install network-manager-pptp pptp-linux,然后添加一个VPN连接设置,但是完成后有可能连接不上,是因为这个默认会使用EAP来做认证,但在network-manager中不能disable这个eap认证,所以要用gconf-edit才行。在打开的终端中输入gconf-editor(不需要加sudo)

$gconf-editor

进入之后查找System->Networking->Connections->xxx->vpn,然后新建一个键值refuse-eap(String yes)

分页: 1/21 第一页 1 2 3 4 5 6 7 8 9 10 下页 最后页 [ 显示模式: 摘要 | 列表 ]