The advantage of this script is to use variables as much as possible, so that novices can set up their own server according to the comments, and the script also adds a large number of comments, which is convenient for people who do not know linux to use. The script is suitable for the operation and maintenance of your own server and VPS.
Script source code:
There is already a directory architecture here, see what else needs to be done.
Open the terminal
1. Because I use the image of Websoft9 in Alibaba, Xiaojiu users can directly download the script attachment and upload it to the root directory, and change the name to :111.zip 2、cd /root/ 3、unzip 111.zip 4. After the decompression is completed, enter crontab -e (if it is an option, then it means that you can choose a text editor, vm or nano is fine) 5. Copy the following text into the text. 50 5 * * 1 sh /root/wuyubakauto/sh/BAK1.sh 50 5 * * 2 sh /root/wuyubakauto/sh/BAK2.sh 50 5 * * 3 sh /root/wuyubakauto/sh/BAK3.sh 50 5 * * 4 sh /root/wuyubakauto/sh/BAK4.sh 50 5 * * 5 sh /root/wuyubakauto/sh/BAK5.sh 50 5 * * 6 sh /root/wuyubakauto/sh/BAK6.sh 50 5 * * 7 sh /root/wuyubakauto/sh/BAK7.sh
(If the editor doesn't know how to use it, check it out online) I use the nano editor, press Ctrl+O to confirm the save Ctrl+X exit text Then I set the script under the path to automatically execute at 5:50 every day (please modify it according to your needs, if not, Baidu crontab -e)
Okay, explain your architecture ubuntu platform Test your website root:
/data/wwwroot/ WeChat station
/data/wwwroot/weixin BBS station
/data/wwwroot/default Script catalog
/root/wuyubakauto/sh
The script for 3306 is to automatically open port 3306 (Websoft9 turns off remote 3306 by default), and it will not load by default, so you can delete or put it if you don't use it. It is nothing more than setting up a boot boot.
Script download:
Tourists, if you want to see the hidden content of this post, please Reply
|