|
新人(linux系统以及SS服务端部署上)第一次操作,根据百度搜索到的资料分享下部署的经验和碰到的问题, 介绍下安装背景,精简版Red Hat Enterprise Linux 7.1 全程使用root帐号 - yum install python-setuptools && easy_install pip //安装系统依赖包(应该是这样叫吧)
- yum -y install wget //安装系统依赖包(应该是这样叫吧)
- pip install shadowsocks //安装ss
- vi /etc/shadowsocks.json //创建Shadowsocks的配置文件:3 h! F8 g9 h, N$ E* _3 O
{# q, A0 k4 k2 O
"server":"0.0.0.0",/ D% M0 |( {% M+ m8 d5 k/ C
"server_port":19383,% G5 |8 a2 S; x' }9 T# r+ x; K
"local_port":1080,- |8 S; U+ [& t, a* b5 ^# x4 H
"password":"YourPassword",
# D) S9 t0 ~1 p) A' ~# ["timeout":600,7 }8 @3 Q9 ]) B, x6 p; {9 d
"method":"aes-256-cfb",
5 ^4 W# X" r4 C"fast_open":false,2 K4 j" \9 e( p2 k. r
"workers":1
1 Q( @0 X0 x V7 h} / C% ]' ~% |$ K I4 @
这里特别说明下,之前的SERVER PORT 号小于10000就会出提示:9 c1 a$ G/ R# j2 _5 q
Traceback (most recent call last):
u9 {$ {" R- F# @& NFile "/usr/bin/ssserver", line 9, in <module>6 t( M# u8 C6 @' b1 t& N* z& n! ?
loadentry_point('shadowsocks==2.6.8', 'console_scripts', 'ssserver')()- W& I* G* `% H2 }* @1 a6 g) s
File "/usr/lib/python2.7/site-packages/shadowsocks/server.py", line 60, in main
5 N4 e1 S, `( u6 o1 I4 etcp_servers.append(tcprelay.TCPRelay(a_config, dns_resolver, False))
8 O% K! T1 E- e XFile "/usr/lib/python2.7/site-packages/shadowsocks/tcprelay.py", line 584, in __init_
. L6 c7 a+ \! E2 o& [' v5 qserver_socket.bind(sa)
# V3 N# N& J8 @" u7 f. Y; CFile "/usr/lib64/python2.7/socket.py", line 224, in meth v# w+ j M/ r5 J4 g
return getattr(self._sock,name)(*args)
. z9 c. g& ]6 K9 s* E& ksocket.error: [Errno 99] Cannot assign requested address 后面在修改端口到19383后就正常了。非常奇怪。
) A% k5 D- h* c" i9 [/ W
2 Z, L" J- K# o# v# a3 U: ^) e9 p$ ~5.ssserver -c /etc/shadowsocks.json //服务器端启动命令 + h7 } M) a/ P S' W
客户端使用GoAgent+ (需要提前科学上网下载好)
& Q) e% J+ K7 C5 [4 K然后在GoAgent+ 里配置参数后测试。 参考的网页有:( q l) u- m1 W. c" x' D4 D# ?7 t
1. http://teddysun.com/339.html# q8 t4 n. X& e- g) n
2. http://www.hiadmin.org/code/vps_shadowsocks/comment-page-1#comment-149828
+ ? f+ e% d! T6 p7 `3. http://www.v2ex.com/t/118293 , p8 b8 E7 g4 i
这里选择亚马逊AWS EC2服务器的好处是有1年的免费使用时间,可以把服务器部署到美国,东京,欧洲等地方便使用。网络情况也比较理想
; d0 P- O% z# u这给帖子本人在V2EX上发表过。这里分享给各位{:soso_e113:} 还有就是求各位发点金币,想下点干货。{:soso_e113:} 2 W; n5 c& K+ |/ J2 w' l
|