lnmp必须
打开 /usr/local/nginx/conf/vhost/ss.conf

然后添加下面这一段到 server

location / { try_files $uri $uri/ /index.php$is_args$args; }

目录权限

chown -R root:root * chmod -R 755 * chown -R www:www storage

修改完了之后,到网站目录下进行一些修改。

cd /home/wwwroot/ss/ chattr -i .user.ini mv .user.ini public cd public

数据导入程序目录下的 glzjin_all.sql

修改配置文件
config/.config.php

创建管理员

php -n xcat createAdmin

同步用户

php xcat syncusers

然后 crontab -e ,计划任务添加以下五段。

30 22 * * * php /home/wwwroot/ss.panel/xcat sendDiaryMail #每日邮件 */1 * * * * php /home/wwwroot/ss.panel/xcat synclogin */1 * * * * php /home/wwwroot/ss.panel/xcat syncvpn 0 0 * * * php -n /home/wwwroot/ss.panel/xcat dailyjob #每日统计 */1 * * * * php /home/wwwroot/ss.panel/xcat checkjob */1 * * * * php -n /home/wwwroot/ss.panel/xcat syncnas

1、添加节点时,请注意用 " - "来分割。

前面为节点名,后面为方式。

比如 “香港 1 - Shadowsocks”

后端安装

安装 libsodium yum -y groupinstall "Development Tools" git clone https://github.com/jedisct1/libsodium.git cd libsodium ./configure && make -j2 && make install echo /usr/local/lib > /etc/ld.so.conf.d/usr_local_lib.conf ldconfig (如果提示cannot import name OrderedDict,可能需要给服务器打补丁:第三方插件ordereddicteasy_install ordereddict )

安装pip模块

cd shadowsocks-manyuser pip install -r requirements.txt

创建配置文件

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

修改配置文件

# Config NODE_ID = 4 (节点id) # hour,set 0 to disable SPEEDTEST = 12 (测速时间) CLOUDSAFE = 1 ANTISSATTACK = 0 AUTOEXEC = 0 MU_SUFFIX = 'usdew.com' (和前端config/.config.php必须一样) MU_REGEX = '%5m%id.%suffix'(和前端config/.config.php必须一样) SERVER_PUB_ADDR = '127.0.0.1' # mujson_mgr need this to generate ssr link API_INTERFACE = 'glzjinmod' # glzjinmod(数据库连接), modwebapi(aip连接) WEBAPI_URL = 'https://www.usdai.com' (aip模式修改) WEBAPI_TOKEN = 'glzjin' (aip模式修改和前端config/.config.php必须一样) # mudb MUDB_FILE = 'mudb.json' # Mysql MYSQL_HOST = '127.0.0.1' MYSQL_PORT = 3306 MYSQL_USER = 'sds' MYSQL_PASS = 'yasds' MYSQL_DB = 'aewsa' MYSQL_SSL_ENABLE = 0 MYSQL_SSL_CA = '' MYSQL_SSL_CERT = '' MYSQL_SSL_KEY = '' # API API_HOST = '127.0.0.1' API_PORT = 80 API_PATH = '/mu/v2/' API_TOKEN = 'abcdef' API_UPDATE_TIME = 60 # Manager (ignore this) MANAGE_PASS = 'ss233333333' # if you want manage in other server you should set this value to global ip MANAGE_BIND_IP = '127.0.0.1' # make sure this port is idle MANAGE_PORT = 23333
如果觉得我的文章对你有用,请随意赞赏