新人(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的配置文件:
& X* q7 @7 F( V$ Y6 ~; { R# D9 d @
{
; A/ b% @; h% m: Y* Z"server":"0.0.0.0",/ A" o: E. `0 y( K- e" J
"server_port":19383,! E( U% x- \, D; m
"local_port":1080,
4 X5 n( m2 U) Q% ^4 M+ c"password":"YourPassword",
$ T! k" M- o" K0 ~5 S9 w* h4 P"timeout":600,
: b) R1 @' L5 {, g$ V"method":"aes-256-cfb",, M# ^0 d( f. r3 b- c1 d
"fast_open":false,
. f: U& A' h$ `, l( f6 I1 U"workers":1
6 U4 c- m- `) h7 s0 ]} ' y$ A) c4 D8 o0 l5 o6 v2 E4 k% V
这里特别说明下,之前的SERVER PORT 号小于10000就会出提示:/ d; I1 g' F1 H# p- b2 W0 W0 J
Traceback (most recent call last):4 x, O: l. N% G% p; y$ p
File "/usr/bin/ssserver", line 9, in <module>& @7 c2 N$ }7 V; _! R
loadentry_point('shadowsocks==2.6.8', 'console_scripts', 'ssserver')(): ?' X. l$ |. q8 k/ O
File "/usr/lib/python2.7/site-packages/shadowsocks/server.py", line 60, in main
% Q7 F @1 I! T1 q8 Z! ?* C% E' htcp_servers.append(tcprelay.TCPRelay(a_config, dns_resolver, False))
1 f O; Y# Q5 _' z5 BFile "/usr/lib/python2.7/site-packages/shadowsocks/tcprelay.py", line 584, in __init_
0 `9 F3 ~8 K" B" {) E8 o+ g$ Nserver_socket.bind(sa)
- c$ a+ V. n2 y5 Z4 X4 K& c) Q) m4 @File "/usr/lib64/python2.7/socket.py", line 224, in meth- r" V' U5 D* i4 a6 Y
return getattr(self._sock,name)(*args)
+ K4 y! q* v/ I4 v" @/ G" hsocket.error: [Errno 99] Cannot assign requested address 后面在修改端口到19383后就正常了。非常奇怪。 5 O/ w! q5 a( C5 e2 B, P# W8 M
W: x5 O5 [% h
5.ssserver -c /etc/shadowsocks.json //服务器端启动命令 - A, X6 b2 D9 A6 i
客户端使用GoAgent+ (需要提前科学上网下载好)3 L9 c. k$ U0 d1 ]+ W
然后在GoAgent+ 里配置参数后测试。 参考的网页有:
2 K' [. T- W2 Q: l1. http://teddysun.com/339.html
9 l9 t/ O: g8 @% _# ~6 X G2. http://www.hiadmin.org/code/vps_shadowsocks/comment-page-1#comment-149828
' g9 l6 f$ B4 k T7 B3. http://www.v2ex.com/t/118293
. s7 g- F/ y( C/ f' J0 x8 G' z! m这里选择亚马逊AWS EC2服务器的好处是有1年的免费使用时间,可以把服务器部署到美国,东京,欧洲等地方便使用。网络情况也比较理想 ; C( t# v2 \9 Y' Y; t: _
这给帖子本人在V2EX上发表过。这里分享给各位{:soso_e113:} 还有就是求各位发点金币,想下点干货。{:soso_e113:}
- z. r" m4 j, \6 d: j |