安装系统

停掉服务全新安装UBUNTU 18.04
改密,更新,安BBR

sudo passwd root
apt-get update
wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && ./bbr.sh
lsmod | grep bbr

一键宝塔

wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh

安装系统

停掉服务全新安装UBUNTU 18.04
改密,更新,安BBR

sudo passwd root
apt-get update
wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && ./bbr.sh
lsmod | grep bbr

安装PHP7.1

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.1-fpm php7.1-mcrypt php7.1-cli php7.1-xml php7.1-mysql php7.1-gd php7.1-imagick php7.1-recode php7.1-tidy php7.1-xmlrpc php7.1-mbstring php7.1-curl
php -v

安装nginx,htop,mysql

sudo apt install nginx
apt-get install htop
sudo apt install mysql-server
sudo mysql_secure_installation

添加数据库

mysql -u root -p
create database yavg;
show databases;
exit

设置nginx和php测试

cp /etc/nginx/sites-available/default /etc/nginx/sites-available/defaultOrg

改default的index.nginx-debian.html为index.php

sudo systemctl restart nginx
mv /var/www/html/index.nginx-debian.html /var/www/html/index.php
apt-get install vim
vim /var/www/html/index.php

打开网址

安装博客

修改博客

压缩文件或视频

zip demo.mp4.zip demo.mp4
zip -r videos.zip videos # 压缩文件夹需要加-r

从这里得到的方案https://lala.im/4722.html
我安了盒子https://www.openos.org/post/274/
在/etc/nginx/sites-enabled找到了defuat文件
改为

server {

listen       80;
root /var/www;
index index.html index.php index.htm;
listen       443 ssl http2;
client_max_body_size 100000m;
server_name  yourdomain.com;
if ($server_port !~ 443){
    rewrite ^(/.*)$ https://$host$1 permanent;
}

ssl_certificate    /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
ssl_certificate_key    /etc/letsencrypt/live/yourdomain.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
error_page 497  https://$host$request_uri;
     location @denied {
           return 301 https://$host$request_uri;
    }
    
    location / {
           try_files $uri $uri/ =404;
    }

    location /rutorrent {
           auth_basic "Restricted";
           auth_basic_user_file /etc/nginx/.htpasswd;
           include /etc/nginx/conf.d/php;
           include /etc/nginx/conf.d/cache;
    }

    include /etc/nginx/sites-available/dload-loc;

    location ~ /\.ht {
            deny all;
    }    

}

  1. bbr加速
    暴力BBR https://www.moerats.com/archives/387/
  2. 脚本快速 安装rTorrent + ruTorrent
    https://www.openos.org/post/274/
  3. ROOT权限
    设置root密码.
sudo passwd root

进入root模式.

sudo -s -H
vim /etc/ssh/sshd_config

把下面的参数修改为

Port 22
PermitRootLogin yes
#AllowGroups sudo sshuser.

然后重启ssh服务

service ssh restart
  1. 测试机器性能
  2. 挂载GOOGLE DRIVE
    卸载磁盘
fusermount -qzu GoogleDrive
fusermount -qzu /home/yavg/GoogleDrive
df -h命令查看

新建文件夹

mkdir /home/yavg/GoogleDrive

挂载磁盘

rclone mount google:PT /home/yavg/GoogleDrive --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000