house-moving
1. Backup data
-
Backup website -
Backup database -
Backup oh my zsh configuration
2. Work order application for refund
Hello, the refund operation will release your business, and all data in the business will be cleared. If you confirm, please continue with the following operations. Upon special application, your service: (deleted)
The application for unsubscribing the remaining usage time has entered the process, and the refund link is as follows: (deleted)
Please open this link as soon as possible to confirm the submission of a refund. The refund amount is subject to the amount displayed by the system when you open this link. The amount will be returned within about 2 working days (if there is a voucher payment, the voucher payment part cannot be returned).
Note:
1. Please be sure to check whether the instance information in the link matches the instance you need to refund.
2. About refund fees: for orders placed after August 12, 2017, and refunded within three months after the successful payment of the order, the account balance will still be returned to the original payment channel. For business refunds, historical order refunds and refunds to the original payment channel after three months of order payment, if the refund fails, the account balance will still be returned. Please refer to: https://help.aliyun.com/knowledge_detail/37095.html
3. Please do not upgrade or renew your business again. After a successful refund, your invoicable limit will be automatically deducted. Please do not apply for an invoice for a refund order to avoid affecting your withdrawal application when the invoicable limit is negative.
3. Purchase student lightweight server
4. Reassemble the system
#Debian/Ubuntu: apt-get install -y xz-utils openssl gawk file #RedHat/CentOS: yum install -y xz openssl gawk file
#Debian/Ubuntu: apt-get update #RedHat/CentOS: yum update
bash <(wget --no-check-certificate -qO- ' https://moeclub.org/attachment/LinuxShell/InstallNET.sh ') -u 18.04 -v 64 -a
bash <(wget --no-check-certificate -qO- ' https://moeclub.org/attachment/LinuxShell/InstallNET.sh ') -d 10 -v 64 -a
5. Modify Linux password
sudo su root
passwd root
Enter new UNIX password: Retype new UNIX password:
6. Install oh my zsh
apt install -y zsh
apt-get install git
bash -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
git clone https://ghproxy.com/https://github.com/ohmyzsh/ohmyzsh.git .oh-my-zsh cd .oh-my-zsh/tools sh install.sh
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://ghproxy.com/https://github.com/zsh -users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://ghproxy.com/https://github.com/zsh -users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
apt install -y autojump
Alias setproxy="export ALL_PROXY=socks5://127.0.0.1:1080"//Set the system proxy Alias unsetproxy="unset ALL_PROXY"//Close the system proxy alias ip="curl -i https://ip.cn "//View the current IP address Alias pc="proxychains"//It is convenient to use proxychains Alias setwww="chmod 755 - R/home/wwwroot&&chown www: www - R/home/wwwroot"//Set the owner and permission of the website directory
chown: changing ownership of `/home/wwwroot/default/.user.ini’: Operation not permitted
chattr -i /home/wwwroot/domain.com/.user.ini
7. Log in to Ubuntu using the SSH key
ssh-keygen -t rsa
Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Created directory '/root/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in/root/. ssh/id_rsa. # This is the private key Your public key has been saved in/root/. ssh/id_rsa. pub. # This is the public key The key fingerprint is:
cd .ssh cat id_rsa.pub >> authorized_keys
56 # To disable tunneled clear text passwords, change to no here! 57 PasswordAuthentication # The default PasswordAuthentication is yes, which means password login is allowed. After changing to no, password login is prohibited 58 #PermitEmptyPasswords no
#ubuntu service ssh restart #debian /etc/init.d/ssh restart
8. Modify the port
#Port 22 Port YOUR_PORT
service ssh restart
9. Install lnmp
apt-get install screen
screen -S lnmp
wget http://soft.vpser.net/lnmp/lnmp1.7.tar.gz -cO lnmp1.7.tar.gz && tar zxf lnmp1.7.tar.gz && cd lnmp1.7 && ./ install.sh lnmp
10. Restore Site
11. Restore the database
Variable $cfg ['TempDir '] (./tmp/) cannot be accessed
lnmp nginx restart
12. Apply for universal domain name certificate
curl https://get.acme.sh | sh
export DP_Id="123456"\ export DP_Key="sADDsdasdgdsf"
acme.sh --issue --dns dns_dp -d '*.example.com' -d example.com
acme.sh --installcert -d '*.example.com' --key-file /usr/local/nginx/conf/ssl/example.com/example.com.key \ --fullchain-file /usr/local/nginx/conf/ssl/example.com/fullchain.cer \ --reloadcmd "lnmp nginx restart"
acme.sh --issue --dns dns_dp -d '*.example.com' -d example.com --keylength ec-256
acme.sh --installcert -d '*.example.com' --ecc \ --key-file /usr/local/nginx/conf/ssl/example.com/example.com_ecc.key \ --fullchain-file /usr/local/nginx/conf/ssl/example.com/fullchain_ecc.cer \ --reloadcmd "lnmp nginx restart"
acme.sh --renew-all
acme.sh --upgrade --auto-upgrade
Extras
1. Backup the website to Zaopai Cloud
git clone https://github.com/kzw200015/backup2upyun.git
apt install -y python3
cd /root/backup2upyun
apt install -y python3-pip pip3 install upyun progressbar
cp config.py.example config.py
chmod +x main.py
./main.py
LANG='en_US.UTF-8' LC_ALL='en_US.UTF-8' 0 2 * * * /root/backup2upyun/main.py
2. Install Aria2
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubiBackup/doubi/master/aria2.sh && chmod +x aria2.sh && bash aria2.sh
https://github.com/mayswind/AriaNg
3. Install H5ai
apt install -y imagemagick
apt install -y ffmpeg
vim /usr/local/php/etc/php.ini
Unforgettable commands
1. Compression
tar cvfz xxx.tar.gz /xxx/
2. Unzip
tar -zxvf xxx.tar.gz tar -jxvf ×××.tar.bz2
Author: mikusa
Link to this article: https://www.himiku.com/archives/replace-my-server.html
Copyright notice: Unless otherwise stated, all articles are my own creation. Please contact the author for reprinting and quotation, and indicate the source (author, original link, etc.).