ss-panel的最低要求是php5.6 mysql5.5

Nginx

1
2
sudo apt-get update
sudo apt-get install nginx

MySQL

sudo apt-get install mysql-server
安装过程中会让你设置数据库管理员密码,后面要用到

php

apt-get install php7.0 php7.0-fpm php7.0-mysql php7.0-gd php7.0-curl php7.0-mbstring php7.0-dom

下载代码

/var/www为例,你可以选择其他位置

1
2
3
git clone https://github.com/orvice/ss-panel.git
curl -sS https://getcomposer.org/installer | php
php composer.phar install

导入表

1
2
3
4
5
6
7
mysql -u root -p
#输入你设置的密码
create database shadowsocks;
use shadowsocks;
source /var/www/ss-panel/db.sql;
flush privileges;
exit;

配置Nginx

vim /etc/nginx/sites-enabled/ss-panel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
server {
listen 80;
server_name example.com;
root /var/www/ss-panel/public/;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

## 配置ss-panel
cp .env.example .env
修改.env中对应的MySQL信息

添加管理员

php xcat createAdmin

重载Nginx

sudo service nginx start

后端

1
2
3
git clone -b manyuser https://github.com/mengskysama/shadowsocks-rm.git
apt-get install python-pip
sudo pip install cymysql

进入shadowsocks-rm/shadowsocks目录,
修改config.py的数据,与.env的配置类似

如果你不需要API的话,切记修改PANEL_VERSION = 'V3'PANEL_VERSION = 'V2'
如果你不需要API的话,切记修改PANEL_VERSION = 'V3'PANEL_VERSION = 'V2'
如果你不需要API的话,切记修改PANEL_VERSION = 'V3'PANEL_VERSION = 'V2'
出现 Slim Application Error, 运行sudo chmod -R 777 /var/www/ss-panel/storage/即可
参考
https://mechanus.io/yi-ge-xin-shou-xiang-de-ss-panel-bu-shu-jiao-cheng/