新人(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的配置文件:+ {! g3 y' C |1 y
{) ]* B2 u# ~; U& w
"server":"0.0.0.0",
7 R$ `9 m* _- E$ Z- B5 S/ C"server_port":19383,
, h% f5 a% ?; Z5 ]) U# }"local_port":1080,3 t/ d: u V! h
"password":"YourPassword",
' B/ Y" ]9 T' ~" ~- L"timeout":600,
p! V8 G p' q; w- a9 W"method":"aes-256-cfb",
) K6 n9 M, O5 D7 q* ~1 R$ _"fast_open":false,* i K: |1 E. s* Q, C
"workers":1
! l7 z+ s+ C- r' `9 I# Y6 [}
) T0 U* k3 I4 I1 F这里特别说明下,之前的SERVER PORT 号小于10000就会出提示:
& }! J8 D1 V% O2 ?5 GTraceback (most recent call last):) J( {: o3 c, ?/ q
File "/usr/bin/ssserver", line 9, in <module>
- f1 S A( O$ D9 rloadentry_point('shadowsocks==2.6.8', 'console_scripts', 'ssserver')()$ A: k: Z8 `3 i
File "/usr/lib/python2.7/site-packages/shadowsocks/server.py", line 60, in main8 Y6 J0 A7 l- q" B8 `4 N3 v
tcp_servers.append(tcprelay.TCPRelay(a_config, dns_resolver, False))0 W0 t: M$ W% o! l) W1 C
File "/usr/lib/python2.7/site-packages/shadowsocks/tcprelay.py", line 584, in __init_7 P( T5 H- U7 N C- A0 |. [- A
server_socket.bind(sa)
3 o$ c! g) A5 P3 dFile "/usr/lib64/python2.7/socket.py", line 224, in meth# V I) u( z9 y
return getattr(self._sock,name)(*args)5 O, r/ h* D( t4 `* L" t* X$ Z, [
socket.error: [Errno 99] Cannot assign requested address 后面在修改端口到19383后就正常了。非常奇怪。
' c2 U6 `. W1 V! G% D( T ~5 a$ o1 p, ~9 W
5.ssserver -c /etc/shadowsocks.json //服务器端启动命令 , M' |+ B# D4 c
客户端使用GoAgent+ (需要提前科学上网下载好)
& J5 ]2 N9 m) v/ K; K然后在GoAgent+ 里配置参数后测试。 参考的网页有: I/ B: q: a5 w
1. http://teddysun.com/339.html& H; n0 U3 u! T; M
2. http://www.hiadmin.org/code/vps_shadowsocks/comment-page-1#comment-149828" _* F0 M4 T2 Y5 T7 O
3. http://www.v2ex.com/t/118293
) N7 K* I! ~' @. i+ Y! l. ^0 J这里选择亚马逊AWS EC2服务器的好处是有1年的免费使用时间,可以把服务器部署到美国,东京,欧洲等地方便使用。网络情况也比较理想 " K7 U) K7 M. [# M' `5 @0 T; L
这给帖子本人在V2EX上发表过。这里分享给各位{:soso_e113:} 还有就是求各位发点金币,想下点干货。{:soso_e113:}
! f$ V) \) W! y$ C7 E/ u |