Debian 9上安装和配置Shadowsocks-libev和Shadowsocks-manager完整教程
1. 安装Shadowsocks-libev
- 在Debian 9系统上,使用apt安装Shadowsocks-libev:
bash sudo apt update sudo apt install shadowsocks-libev
- 安装完成后,编辑配置文件:
bash sudo nano /etc/shadowsocks-libev/config.json
- 在配置文件中添加服务器信息:
{ “server”:”your_server_ip”, “server_port”:8388, “password”:”your_password”, “method”:”aes-256-gcm”}
- 启动Shadowsocks服务:
bash sudo systemctl start shadowsocks-libev
2. 安装Shadowsocks-manager
- 使用npm全局安装Shadowsocks-manager:
bash sudo npm install -g shadowsocks-manager –unsafe-perm
- 创建配置文件:
bash sudo nano /etc/shadowsocks-manager/config.json
- 添加服务器信息:
{ “manager”: { “api”: { “access_token”: “your_access_token”, “port”: 4001, “allowed_origins”: [ “http://localhost:4001” ] }, “webui”: { “port”: 4002, “address”: “0.0.0.0”, “keys”: [ “your_access_key” ] } }, “nodes”: [ { “type”: “ss-libev”, “name”: “node1”, “plugin”: { “obfs”: “http”, “obfs_host”: “www.bing.com” }, “settings”: { “host”: “your_server_ip”, “method”: “aes-256-gcm”, “port”: 8388, “password”: “your_password”, “timeout”: 300 } } ]}
- 启动Shadowsocks-manager服务:
bash sudo shadowsocks-manager
常见问题
Q: 如何在Debian 9上卸载Shadowsocks-libev和Shadowsocks-manager?
A: 使用以下命令卸载Shadowsocks-libev和Shadowsocks-manager:
bash sudo apt remove shadowsocks-libev sudo npm uninstall -g shadowsocks-manager
Q: 如何查看Shadowsocks-manager的日志?
A: 使用以下命令查看Shadowsocks-manager的日志:
bash sudo journalctl -u shadowsocks-manager -f
Q: 如何修改Shadowsocks-libev的端口和密码?
A: 编辑配置文件/etc/shadowsocks-libev/config.json
,修改server_port
和password
字段,然后重启Shadowsocks服务。
Q: 如何重启Shadowsocks-manager服务?
A: 使用以下命令重启Shadowsocks-manager服务:
bash sudo systemctl restart shadowsocks-manager
Q: 如何确保Shadowsocks服务持久运行?
A: 使用以下命令设置Shadowsocks-libev和Shadowsocks-manager开机自启动:
bash sudo systemctl enable shadowsocks-libev sudo systemctl enable shadowsocks-manager