新人(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的配置文件:
! S7 R* [7 d7 r$ k, T
{, }- F9 x% V2 s& f
"server":"0.0.0.0",. e- f6 i) ?4 Z+ ~" W) [
"server_port":19383,
2 N( m& G6 G4 n* e0 _9 Z: e8 Z! N"local_port":1080,
; h+ T4 y u; r9 l+ u% c9 k+ J* o"password":"YourPassword",
q6 x6 ^4 h0 B0 ]1 L"timeout":600,
6 a$ G$ a' G! D"method":"aes-256-cfb",1 C6 {7 K. R1 h' [
"fast_open":false,
% L4 p; P/ O2 t S! D"workers":19 l) a/ J) o. f4 ]* @5 Q
} ( E8 x! C; L" h# T
这里特别说明下,之前的SERVER PORT 号小于10000就会出提示:$ L$ `- N0 P" ~4 E- O$ o( h
Traceback (most recent call last):
) H4 g+ w" d7 P: t. E7 YFile "/usr/bin/ssserver", line 9, in <module>0 g3 l( Q0 `2 G& P) Z- v9 q* y5 g
loadentry_point('shadowsocks==2.6.8', 'console_scripts', 'ssserver')()/ X8 [, S1 h, t( L7 Y
File "/usr/lib/python2.7/site-packages/shadowsocks/server.py", line 60, in main
- O. ~; r$ ]: n6 t+ }tcp_servers.append(tcprelay.TCPRelay(a_config, dns_resolver, False))' h) R- v" g) }& i$ M% y
File "/usr/lib/python2.7/site-packages/shadowsocks/tcprelay.py", line 584, in __init_
7 Y1 o+ h1 O4 m9 Gserver_socket.bind(sa)
9 S/ n' j( V; ^$ i( j; |* c$ r: ~File "/usr/lib64/python2.7/socket.py", line 224, in meth8 s" a& E2 G8 K% ?# ]# r% J
return getattr(self._sock,name)(*args)
+ u8 p2 t v9 t$ ]5 R" osocket.error: [Errno 99] Cannot assign requested address 后面在修改端口到19383后就正常了。非常奇怪。
1 {6 T* ^4 V' @, v S2 f0 |; I
1 F) p* B6 N' r) X3 h9 f! f2 ]5.ssserver -c /etc/shadowsocks.json //服务器端启动命令 & E( O0 b+ U) f2 |0 `
客户端使用GoAgent+ (需要提前科学上网下载好); I. u: ]7 n/ u# r+ [
然后在GoAgent+ 里配置参数后测试。 参考的网页有:$ o r; ~: h2 }1 n" q# ^* S
1. http://teddysun.com/339.html: m# ]0 Z, q4 ~+ B1 }; ~+ p
2. http://www.hiadmin.org/code/vps_shadowsocks/comment-page-1#comment-149828# m9 _$ q ?$ y5 S9 `: j" w i* D
3. http://www.v2ex.com/t/118293
: [ f# l" L$ s _, U( d) M8 g这里选择亚马逊AWS EC2服务器的好处是有1年的免费使用时间,可以把服务器部署到美国,东京,欧洲等地方便使用。网络情况也比较理想 5 ^. o$ `) Q/ Y, ~. ^/ Q& E3 T
这给帖子本人在V2EX上发表过。这里分享给各位{:soso_e113:} 还有就是求各位发点金币,想下点干货。{:soso_e113:}
5 Q$ u; |- o# T4 V7 S" R3 z |