必备工具如果已经安装了就略过
1
|
yum -y install vim git wget screen zip unzip
|
![2019062811064830 2019062811064830](https://linuxword.com/wp-content/uploads/2022/01/2019062811064830.png)
更新系统和安装环境包,一行一条代码,等待上一条执行完毕了再执行下一条
1
2
|
yum -y update
yum -y groupinstall "Development Tools"
|
![2019062811080615 2019062811080615](https://linuxword.com/wp-content/uploads/2022/01/2019062811080615.png)
安装加密包,让后端支持更多加密方式:
1
2
3
4
5
6
|
cd ~
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 ~
|
![2019062811101046 2019062811101046](https://linuxword.com/wp-content/uploads/2022/01/2019062811101046.png)
![2019062811102994 2019062811102994](https://linuxword.com/wp-content/uploads/2022/01/2019062811102994.png)
0x03 安装后端
克隆安装后端程序,一行一条代码,等待上一条执行完毕了再执行下一条
1
2
3
4
5
6
7
|
yum -y install epel-release
yum -y install python-pipgit clone https://github.com/Anankke/shadowsocks-mod.git
cd shadowsocks-mod
git reset --hard efc986b731164aae3fef6fb5b9e8802754e63e3e
pip install -r requirements.txt
cp apiconfig.py userapiconfig.py
cp config.json user-config.json
|
![2019062811125729 2019062811125729](https://linuxword.com/wp-content/uploads/2022/01/2019062811125729.png)
![2019062811130843 2019062811130843](https://linuxword.com/wp-content/uploads/2022/01/2019062811130843.png)
![2019062811133292 2019062811133292](https://linuxword.com/wp-content/uploads/2022/01/2019062811133292.png)
![2019062811134487 2019062811134487](https://linuxword.com/wp-content/uploads/2022/01/2019062811134487.png)
![2019062811140461 2019062811140461](https://linuxword.com/wp-content/uploads/2022/01/2019062811140461.png)
![2019062811141477 2019062811141477](https://linuxword.com/wp-content/uploads/2022/01/2019062811141477.png)
![201906281114518 201906281114518](https://linuxword.com/wp-content/uploads/2022/01/201906281114518.png)
![2019062811151271 2019062811151271](https://linuxword.com/wp-content/uploads/2022/01/2019062811151271.png)
0x04 配置后端
后端开始配置前需要先在前端面板上新建一个节点并记录好新建节点的ID
稍后配置后端需要这个节点的ID
在前端新建节点,我新建的节点ID是3
![2019062811222691 2019062811222691](https://linuxword.com/wp-content/uploads/2022/01/2019062811222691.png)
修改后端配置文件,后端节点的默认配置文件路径是:/root/shadowsocks-mod/
1
|
vim userapiconfig.py
|
修改配置文件中的以下参数,其他的不懂别乱改
1
2
3
4
5
6
|
NODE_ID #改为面板对应的节点ID,上一步新建的节点ID
API_INTERFACE #改为 glzjinmod
MYSQL_HOST #如果面板和节点在一台机这里是localhost或者127.0.0.1 如果是远程面板,这里是远程面板数据库的IP
MYSQL_USER #改为面板机数据库用户名
MYSQL_PASS #改面板机数据库的密码
MYSQL_DB #改为面板机数据库的名字
|
![201906281130117 201906281130117](https://linuxword.com/wp-content/uploads/2022/01/201906281130117.png)
0x05 启动后端
后端相关参数配置完毕后,进入shadowsocks-mod目录执行 ./logrun.sh这样后端就跑起来了
1
2
|
cd /root/shadowsocks-mod
./logrun.sh
|
![2019062811344165 2019062811344165](https://linuxword.com/wp-content/uploads/2022/01/2019062811344165.png)
上一步让后端跑起来了,但是怎么知道后端运行有没有报错呢,我们来执行 ./tail.sh
来查看运行日志,如果日志没有错误那么后端就正常运行。或者执行python server.py 这个命令是调试模式,如果执行python server.py运行没有错误就可以跳过这一步直接运行 ./logrun.sh
1
2
|
cd /root/shadowsocks-mod
./tail.sh
|
![2019062811381089 2019062811381089](https://linuxword.com/wp-content/uploads/2022/01/2019062811381089.png)
0x06 前端验证
现在后端已经跑起来了,那么我们还需要去前端节点列表查看这个节点是否在线,远程节点可能需要等几分钟才显示正常。
![2019062811432742 2019062811432742](https://linuxword.com/wp-content/uploads/2022/01/2019062811432742.png)