思绪的空中生活

debian8安装ssr后端
1、依赖安装apt-get update apt-get install git wget python-setu...
扫描右侧二维码阅读全文
17
2018/08

debian8安装ssr后端

1、依赖安装

apt-get update
apt-get install git wget python-setuptools -y
apt-get install python-pip
pip install cymysql

2、libsodium 安装

apt-get install build-essential -y
wget https://github.com/jedisct1/libsodium/releases/download/1.0.16/libsodium-1.0.16.tar.gz
tar xf libsodium-1.0.16.tar.gz && cd libsodium-1.0.16
./configure && make -j2 && make install
echo /usr/local/lib > /etc/ld.so.conf.d/usr_local_lib.conf
ldconfig
cd ../ && rm -rf libsodium*

3、下载源代码并安装依赖

git clone -b manyuser https://github.com/Anankke/shadowsocks.git
cd shadowsocks
pip install -r requirements.txt

4、配置文件

cp apiconfig.py userapiconfig.py
cp config.json user-config.json
vi userapiconfig.py

5、运行SSR

python server.py 用于调试的
./run.sh 无日志后台运行
./logrun.sh 有日志后台运行

6、开机启动
假设你的shadowsocks是安装在root目录下,可以这样:
vi /etc/rc.local
加入一条:
sh /root/shadowsocks/run.sh
然后:
chmod +x /etc/rc.local
Debian 9开机启动 https://sixu.life/debian-9-etc-rc-local.html
7、使用Supervisor守护进程启动ssr

# 安装
apt-get install supervisor -y

# 写入配置
vi /etc/supervisor/conf.d/ssr.conf

# 写入以下内容
[program:ssr]
command=python /root/shadowsocks/server.py 
autorestart=true
autostart=true
user=root

# 重启Supervisor服务。
/etc/init.d/supervisor restart

# 重启 ssr
supervisorctl restart ssr

# 查看Supervisor服务运行状态。
supervisorctl status

# 如果遇到问题,可以检查日志:
supervisorctl tail -f ssr stderr

# 如果使用supervisor进程守护,需要修改文件vi /etc/default/supervisor,添加一行:
ulimit -n 1024000

8、加速
Debian OpenVZ 魔改 BBR:https://sixu.life/debian-openvz-magic-change-bbr.html
Debian centos bbr加速:https://sixu.life/the-acceleration-effect-of-bbr-is-obvious.html

参考:
https://blog.starryvoid.com/archives/176.html

https://github.com/zyl6698/ss-panel-v3-mod-with-f2fpay/wiki/%E5%AE%89%E8%A3%85%E9%AD%94%E6%94%B9%E5%90%8E%E7%AB%AF

https://github.com/iMeiji/shadowsocks_install/wiki/%E6%90%AD%E5%BB%BA-sspanel-v3-%E9%AD%94%E6%94%B9%E7%89%88%E8%AE%B0%E5%BD%95

相关文章:

  • 中兴f460开启telnet
  • 宝塔面板安装frp
  • pve调整磁盘大小
  • N1将armbian刷入emmc
  • v2board前端 v2ray-poseidon后端 搭建
  • Last modification:November 25th, 2019 at 12:08 am
    If you think my article is useful to you, please feel free to appreciate

    2 comments

    1. 思绪的空中生活

      解决报错:ImportError: No module named cymysql
      ```
      #debian
      apt-get install python-pip
      pip install cymysql

      #centos
      yum install -y python-setuptools && easy_install pip && pip install cymysql
      ```

    2. 思绪的空中生活

      新的:
      git clone -b manyuser https://github.com/Anankke/shadowsocks.git

    Leave a Comment