简体中文 | English
IE / Edge |
Firefox |
Chrome |
Safari |
Opera |
Electron |
---|---|---|---|---|---|
IE9, IE10, IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
A succinct, fast and elegant Airport
Centos 7
install lnmp1.4
下载并安装lnmp一键安装包
- 根据需要添加虚拟主机以添加SSL支持。
yum install screen -y
screen -S lnmp
wget -c http://soft.vpser.net/lnmp/lnmp1.4.tar.gz && tar zxf lnmp1.4.tar.gz
cd lnmp1.4 && ./install.sh lnmp
lnmp vhost add
- 删除目录限制工具 此工具可以快速删除目录限制
cd lnmp1.4/tools
./remove_open_basedir_restriction.sh
出现提示时,输入虚拟主机目录 /home/wwwroot/yourdomain 按Enter确认
- 打开PHP函数 scandir()
sed -i 's/,scandir//g' /usr/local/php/etc/php.ini
- 修改conf
vi /usr/local/nginx/conf/vhost/yourdomain.conf
- 将此添加到服务器
location /
{
try_files $uri $uri/ /index.php$is_args$args;
}
- 修改运行目录
root /home/wwwroot/yourdomain/public;
- conf示例
server
{
listen 80;
server_name yourdomain;
return 301 https://$host$request_uri;
}
server
{
listen 443 ssl;
server_name yourdomain;
ssl_certificate /etc/letsencrypt/live/yourdomain/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yourdomain/privkey.pem;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/yourdomain/public;
include other.conf;
#error_page 404 /404.html;
include enable-php.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
access_log /home/wwwlogs/yourdomain.log;
- 下载面板程序1
cd /home/wwwroot/yourdomain
yum install git -y
git clone -b master https://github.com/ioslide/ssrpanel_mod.git tmp && mv tmp/.git . && rm -rf tmp && git reset --hard
chown -R root:root *
chmod -R 755 *
chown -R www:www storage
php composer.phar install
mv tool/alipay-f2fpay vendor/
mv -f tool/autoload_classmap.php vendor/composer/
- 配置数据库 登录数据库
mysql -u root -p
mysql>CREATE DATABASE database_name;
mysql>use database_name;
mysql>source /home/wwwroot/yourdomain/sql/all.sql
- 配置 ssrpanel
cd /home/wwwroot/yourdomain
cp config/.config.php.example config/.config.php
vi config/.config.php
lnmp restart
php xcat createAdmin //Create an Administrator
php xcat syncusers //Synchronous user
php xcat initQQWry //Download IP parsing library
php xcat resetTraffic //Reset traffic
执行crontab-e命令并添加以下几行
30 22 * * * php /home/wwwroot/your-site-folder/xcat sendDiaryMail
*/1 * * * * php /home/wwwroot/your-site-folder/xcat synclogin
*/1 * * * * php /home/wwwroot/your-site-folder/xcat syncvpn
0 0 * * * php -n /home/wwwroot/your-site-folder/xcat dailyjob
*/1 * * * * php /home/wwwroot/your-site-folder/xcat checkjob
*/1 * * * * php -n /home/wwwroot/your-site-folder/xcat syncnas