admin

自用linux vps 快速恢复和搭建
1、安装bbr wget --no-check-certificate https://github.com/t...
扫描右侧二维码阅读全文
29
2019/09

自用linux vps 快速恢复和搭建

1、安装bbr

  wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh
chmod +x bbr.sh

./bbr.sh

2、安装ssr
3.1 安装chacha20的库
yum -y groupinstall "Development Tools"
wget https://download.libsodium.org/libsodium/releases/LATEST.tar.gz
tar xf LATEST.tar.gz && cd libsodium-stable
./configure && make -j4 && make install
echo /usr/local/lib > /etc/ld.so.conf.d/usr_local_lib.conf
ldconfig
cd ~

3/2 wget -c https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/ssr.sh
chmod +x ssr.sh && bash ssr.sh

4、添加防火墙端口

1、 快速安装nginx 和 php-fpm 为了避免以后麻烦还是使用lnmp一键包
yum -y install screen
screen -S lnmp
wget http://soft.vpser.net/lnmp/lnmp1.6.tar.gz -cO lnmp1.6.tar.gz && tar zxf lnmp1.6.tar.gz && cd lnmp1.6 && LNMP_Auto="y" DBSelect="0" PHPSelect="5" SelectMalloc="1" ./install.sh lnmp
恢复备份数据

/usr/local/nginx/conf/vhost

wget -c
ftp://ftpuser:*@ftpuser.ftp.aliapp.com/myfolder/back-for-vps/www-wwwroot-20190929.tar.gz
ftp://ftpuser:*@ftpuser.ftp.aliapp.com/myfolder/back-for-vps/www-conf-20190929.tar.gz
ftp://ftpuser:*@ftpuser.ftp.aliapp.com/myfolder/back-for-vps/www-etc-20190929.tar.gz

cd /home/wwwroot/
覆盖nginx php配置文件、设置 /home/wwwroot/ 子目录权限
/usr/local/nginx/conf
/usr/local/php/etc/

chattr -i /home/wwwroot/*/.user.ini

tar -xzvf www-wwwroot-*.tar.gz
chown www:www -R /home/wwwroot/*
chattr +i /home/wwwroot/*/.user.ini
chmod +x backup.sh

yum install lftp

crontab -e

0 3 * * * /home/wwwroot/backup.sh

59 23 * /sbin/reboot

Last modification:September 29th, 2019 at 06:15 pm
If you think my article is useful to you, please feel free to appreciate

Leave a Comment

captcha
请输入验证码