新人(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的配置文件:! ?0 G# w: x \9 y
{+ U- S4 Q/ A/ Q* Y/ I
"server":"0.0.0.0",
8 m/ J+ X7 n' O6 ]$ |9 y"server_port":19383," k, ^( X$ K, d# X
"local_port":1080,
2 L! G H' g' L- G1 f"password":"YourPassword",
1 y& ]) o: D" u2 M+ Y) G"timeout":600,
5 L! j- v4 N# e4 k; z D5 e"method":"aes-256-cfb",- k0 y; b; K% n8 A7 t
"fast_open":false,: _2 x$ P X8 v+ H( a
"workers":19 x! R, }( x9 S( t- z
}
, Y! B+ T) b0 l4 Z2 {这里特别说明下,之前的SERVER PORT 号小于10000就会出提示:
0 `3 \* t7 X0 l: K$ [- MTraceback (most recent call last):
, q! h9 X7 q0 N2 h+ {7 TFile "/usr/bin/ssserver", line 9, in <module>, D6 A2 j8 _8 c: [+ _
loadentry_point('shadowsocks==2.6.8', 'console_scripts', 'ssserver')()
2 v- r; E( Q5 D9 |- o# `File "/usr/lib/python2.7/site-packages/shadowsocks/server.py", line 60, in main
. b; r: m+ E% f' u5 ~tcp_servers.append(tcprelay.TCPRelay(a_config, dns_resolver, False))
3 @! g$ ?9 M! qFile "/usr/lib/python2.7/site-packages/shadowsocks/tcprelay.py", line 584, in __init_9 \( M9 B. G# V
server_socket.bind(sa)
5 f; ~. ?6 w) q0 [0 NFile "/usr/lib64/python2.7/socket.py", line 224, in meth
( i$ ^1 |. F& X5 C4 C. \! dreturn getattr(self._sock,name)(*args)+ H) Y' \" c" t) q. M6 V
socket.error: [Errno 99] Cannot assign requested address 后面在修改端口到19383后就正常了。非常奇怪。
. N5 X# ]7 O4 A0 w# D1 k$ @1 F1 T0 v+ l5 R& W: t- {4 p& ~4 _
5.ssserver -c /etc/shadowsocks.json //服务器端启动命令
v: N4 K: |0 c客户端使用GoAgent+ (需要提前科学上网下载好)# J' O6 y9 R _+ R
然后在GoAgent+ 里配置参数后测试。 参考的网页有:
' w* ? w. j- k& t1. http://teddysun.com/339.html
9 c; G5 s* j0 E* C* C7 V2. http://www.hiadmin.org/code/vps_shadowsocks/comment-page-1#comment-149828
, q5 m7 w& Q5 A3. http://www.v2ex.com/t/118293
; V5 f8 I, n* B* X# k' c8 e5 C这里选择亚马逊AWS EC2服务器的好处是有1年的免费使用时间,可以把服务器部署到美国,东京,欧洲等地方便使用。网络情况也比较理想 7 i( l9 u$ v0 s
这给帖子本人在V2EX上发表过。这里分享给各位{:soso_e113:} 还有就是求各位发点金币,想下点干货。{:soso_e113:}
& s% I3 ?: n7 y; L |