Have you recently purchased or want to buy a new server and are ready to build a personal blog / corporate website. Then you are right, here is a set of solutions for you. (whether you are an enterprise operation or maintenance person or a personal webmaster)
This year, I have put a lot of effort into it, and my company is booming. This is very gratifying. But as a geek-born entrepreneur, it is one of my missions to not forget the original intention of bringing convenience to everyone. Thank you very much for your support.
Therefore, in my spare time, I have created some wheels and are committed to building a light and fast website construction solution for you. (Query article title, find it quickly)
Step 1. How to choose a reliable and stable server
Warning: Do not save money on website server expenses. The web server needs to be stable and reliable. (If you save, you will pay more and even lose your data.)
It is recommended to choose the following cloud platform service providers, they will give you a great experience:
Google Cloud, Microsoft Azure Cloud, Amazon Web Services, SoftLayer Cloud, Alibaba Cloud. And other best cloud service platforms in your country.
Q: Why do you recommend these businesses?
A: Because these merchants have many years of operational experience, they already have large-scale users. At the same time, their platforms provide snapshot or recovery mode to facilitate backup and migration of our services. Stable services protect our data security. In addition, if your website has specific sensitive information, you need to choose a server without a copyright, such as a server in Romania.
Here are a few Shell server testing tools:
UnixBench one-click running (provided by teddysun.com)
wget --no-check-certificate https://github.com/teddysun/across/raw/master/unixbench.sh && chmod +x unixbench.sh && ./unixbench.sh
Test server performance (provided by www.oldking.net)
curl -Lso- https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash
Test server network only (provided by www.oldking.net)
wget https://raw.githubusercontent.com/oooldking/script/master/superspeed.sh && chmod +x superspeed.sh && ./superspeed.sh
Step 2. How to choose the system version
Warning: You should choose the latest stable version of the system, whether it is Linux or Windows or other systems, and install the latest security patches. (Do not choose the development version)
RedHat/CentOS, Debian/Ubuntu, and Windows Server are all used on the server.
RedHat/CentOS and Windows Server are often used more in personal, corporate, and government websites. For some personal webmasters, they will choose a more concise Debian and Ubuntu system. I recommend using the RedHat/CentOS system.
Q: On the selection system, what else should you pay attention to besides what you said above?
A: You should also choose according to the needs of the company’s projects. For example, some government software requirements run on Windwos Server. They need MSSQL or NET. Framework. They have Microsoft’s complete service support, so you must choose Windwos Server.
At the same time, many commercial software are required to be used under RedHat/CentOS. Other systems are not supported or the software is unstable, so you must choose RedHat/CentOS.
If you have enough money, I suggest you buy Red Hat Enterprise Service Support or Microsoft Service Support.
[Recommended system] [Original] Network one-click Reinstall CentOS 7 (Official, Pure, Safe, Efficient)
[Why recommend? This system is pure (avoids service provider monitoring, such as Alibaba Cloud, Tencent Cloud, etc.) and is optimized for system backup migration between machines. Used for your subsequent maintenance. ](provided by tech.cxthhhhh.com)
On some servers, the system allocates disks by default, you need to manually expand the capacity.
Step 3. How to optimize my system and network
The solution I provide is mainly for RedHat/CentOS. So all passed the test on the latest CentOS7.X.
You need to enable Swap memory to prevent errors due to insufficient physical memory.
At the same time you can install some network acceleration software, such as BBR, LotServer and so on.
Here are a few Shell optimization tools:
1. Replace the kernel with one click, install LotServer network optimization, open TCP Fast Open, set 2GB Swap memory. (provided by tech.cxthhhhh.com)
sudo curl -sSL https://raw.githubusercontent.com/MeowLove/AlibabaCloud-CentOS7-Pure-and-safe/master/download/LotServer/install.sh | sudo bash
2. Install the latest kernel with one click and enable the Google BBR protocol. (provided by teddysun.com)
wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && ./bbr.sh
Step 4. How to configure the server environment
Warning: If you purchase commercial software, their company requires you to install a specific system, such as Redhat, then you must follow the software documentation to configure your server environment.
The website environment is configured with a variety of options. Charged and free. You need to choose the software you trust. (I will recommend more support for Chinese language support and stable and secure website environment management software)
Paid plan (with GUI):
1. cPanel (when you build a website) [with Linux support] [Click to go]
2. Plesk (when you build the website) [with Linux and Windows support] [Click to go]
3. AMH (when you build the website) [with Linux support] [Click to go]
4. SolusVM (when you build a sales platform) [with Linux support] [Click to go]
5. WHMCS (when you build a sales platform) [with Linux support] [Click to go]
6. Virtualizor (when you sell the server) [with Linux support] [Click to go]
Free plan (with GUI):
1. BT-aaPanel (when you build a website) [with Linux and Windows support] [Click to go]
2. UPUPW ANK (when you build a website) [with Windows support] [Click to go]
3. AppNode (when you build the website) [with Linux support] [Click to go]
4. VestaCP (when you build a website) [with Linux support] [Click to go]
5. WDCP (when you build a website) [with Linux support] [Click to go]
6. CyberPanel (when you build a website) [with Linux support] [Click to go]
7. CentOS Web Panel (when you build a website) [with Linux support] [Click to go]
8. ISPConfig (when you build the website) [with Linux support] [Click to go]
9. Feathur (when you build the website) [with Linux support] [Click to go]
10. Proxmox (when you sell the server) [with Linux support] [Click to go]
Free plan (no GUI only command):
1. LNMP (when you build a website) [with Linux support] [Click to go]
2. LAMP (when you build a website) [with Linux support] [Click to go]
3. Caddy Web (when you build a website) [with Linux and Windows support] [Click to go]
4. OneinStack (when you build a website) [with Linux support] [Click to go]
I usually use LNMP and BT (aaPanel), so their one-click installation script is here.
BT (aaPanel) one-click installation
wget -O install.sh http://www.aapanel.com/script/install-en.sh && bash install.sh
LNMP one-click installation
wget http://soft.vpser.net/lnmp/lnmp1.5.tar.gz -cO lnmp1.5.tar.gz && tar zxf lnmp1.5.tar.gz && cd lnmp1.5 && ./install.sh lnmp
If you need a one-click installation of the Linux desktop environment and RDP remote connection
[Original] One-click installation of Desktop environment, RDP, Windows support for Linux
Step 5. Make a full backup of the system
Warning: Data is priceless and valuable, and you must back it up frequently. My advice: Make a full backup at least once a month, and an incremental or differential backup once a week.
I have provided a complete set of backup and restore options that you can try.
Note: When you use my recommended CentOS7, it allows you to perform backup restores between different servers. If you use a different system, you can only back up the restore on the same server.
Step 6. Other tools that may help you
1. View system version
2. View all installed kernel versions
rpm -qa | grep kernel
3. Modify Linux DNS
4. One-click installation of KMS service script (provided by teddysun.com)
wget --no-check-certificate https://github.com/teddysun/across/raw/master/kms.sh && chmod +x kms.sh && ./kms.sh
5. One-click installation of FFMPEG (provided by www.ffmpegtoolkit.com)
yum install git wget -y && cd /opt && git clone https://github.com/hostsoft/ffmpegtoolkit.git ffmpegtoolkit && cd ffmpegtoolkit && sh latest.sh
6. Query the usage time of the hard disk (mainly for dedicated server, VPS does not make sense)
yum install smartmontools -y
smartctl -A /dev/sda
7. Frp one-click installation script (intranet penetration tool) (provided by clang of koolshare.cn)
wget --no-check-certificate https://raw.githubusercontent.com/clangcn/onekey-install-shell/master/frps/install-frps.sh -O ./install-frps.sh && chmod 700 ./install-frps.sh && ./install-frps.sh install
8. One-click installation of Aria2+Ariang+Filemanager+H5ai management script (provided by teduis.com)
wget --no-check-certificate https://raw.githubusercontent.com/Thnineer/Bash/master/aria2u.sh && chmod +x aria2u.sh && bash aria2u.sh
9. Online.net machine configuration IPV6 one-click script (provided by Github user jxzy199306)
sudo wget -O /etc/cxthhhhh.com/ipv6-dhclient-script.sh https://raw.githubusercontent.com/jxzy199306/ipv6_dhclient_online_net/master/ipv6_dhclient_online_net.sh && chmod +x /etc/cxthhhhh.com/ipv6-dhclient-script.sh && bash /etc/cxthhhhh.com/ipv6-dhclient-script.sh
10. Any server configuration IPV6 tutorial (provided by tech.cxthhhhh.com)
[Original] Configure IPV6 for the server
11. One-click reloading of clean CentOS 7 scripts without VNC, no CD-ROM mounting (provided by tech.cxthhhhh.com)
[Original] One-click network reloading CentOS 7 (official, pure, safe, efficient)
12. Debian/Ubuntu/CentOS one-click reload script (provided by moeclub.org)
[ Linux VPS ] Debian/Ubuntu/CentOS Network Installation/Reinstallation System/Pure Installation One-Click Script
13. Magic drinking tools (specificity, so no explanation, please don’t use if you don’t understand) (provided by doub.io)
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/ssrmu.sh && chmod +x ssrmu.sh && bash ssrmu.sh
14. Install the Supervisor Daemon
pip install supervisor / yum install supervisor -y
yum install python-setuptools
15. One-click clear Linux login information and command input information
echo > /var/log/wtmp
echo > /var/log/btmp
echo > /var/log/lastlog
16. Rebuild Grub2 boot boot (please refer to your disk)
grub2-mkconfig -o /boot/grub2/grub.cfg
yum reinstall grub2-efi shim
grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
17. Modify the Linux system default language
localectl set-locale LANG=zh_CN.UTF8 (Chinese)
localectl set-locale LANG=en_US.UTF-8 (English)
18. V-2 ray one-click installation for CentOS7 (specificity, so no explanation, please don’t use if you don’t understand) (provided by Github user 233boy)
yum install curl git-core -y && git clone https://github.com/233boy/v2ray && cd v2ray && chmod +x install.sh && ./install.sh local
19. One-click installation of CpuLimit (provided by Github user opsengine)
wget -O cpulimit.zip https://github.com/opsengine/cpulimit/archive/master.zip && unzip cpulimit.zip && cd cpulimit-master && make && cp src/cpulimit /usr/bin
20. How to configure Swap page file (2GB virtual memory)
dd if=/dev/zero of=/var/swap bs=1024 count=2097152
chmod 0644 /var/swap
echo '/var/swap swap swap default 0 0' >> /etc/fstab
22. Linux VPS one-click installation of the desktop environment and RDP remote desktop connection and Windows support (also a platform to manage other servers)
[Original] One-click installation of desktop environment, RDP, Windows support (For Linux)
23. Configure IPV6 website support for aaPanel/Nginx to enable IPV6 support, build IPV6 website
[Original] Nginx sets IPV6 Listening and 301 redirects and enables SSL forced jumps
24. Reinstall Windows Server to Linux Server (Win to Linux) (Win to Linux)
[Solution] How to install Windows Server (2003/2008/2012/2016/XP/7/8/10) to Linux Server (CentOS/Debian/Ubuntu/Other)
Enjoy a wonderful server life
When you have the complete solution above, you can now swim on the Linux server with ease.
[Technical Blog | Technology Blog] Telegram exchange channel: https://t.me/me_share (TG discussion group please pay attention to TG channel top message)
This article was posted on the [CXT] Technical Blog | 技術博客, if you need to forward the share, please indicate the source.