首先编译centos5的环境

yum -y install gcc automake make

2.安装socks5必要的包

yum -y install pam-devel openldap-devel cyrus-sasl-devel

3.下载,编译安装ss5(socks5)

wget http://static.auvps.com/uploads/2013/04/ss5-3.6.1-1.tar.gz


tar zxvf ss5-3.6.1-1.tar.gz

cd ss5-3.6.1

./configure

make


make install

#启动ss5服务

/etc/init.d/ss5 start

添加ss5到服务中,并随机启动

chkconfig --add ss5

chkconfig ss5 on

ss5 默认使用1080端口,并允许任何人使用。
我们可以修改 /etc/opt/ss5/ss5.conf 中的


# SHost         SPort   Authentication


# auth 0.0.0.0/0   -         -

修改为:

# SHost            SPort    Authentication


# auth 0.0.0.0/0     -           u

如果要修改端口号的话vi /etc/rc.d/init.d/ss5找到

/usr/sbin/ss5 –t

在后面 添加上

-u root -b 0.0.0.0:8833 ( 8833为要更改的端口号)

还有在

/usr/local/sbin/ss5 –t

后面添加同一的内容:-u root -b 0.0.0.0:8833
在 /etc/opt/ss5/ss5.passwd 中添加 用户名和密码 如:
auvps  auvps
使用用户验证,重启ss5服务

/etc/init.d/ss5 restart