Linux server management panel, using AMH to automatically deploy LNMP environment
AMH It is the first panel in China that supports flexible multi-environment, software modular architecture design, and high scalability flexibility. The LNMP environment is automatically deployed, and the panel supports different WEB application environments such as LNMP, LAMP, LNGX, and LNAMP. AMH has provided free version support for 10 years without interruption, and the latest version has added commercial authorization for free authorization. In the past, paid licensed software, including exception monitoring, database and file synchronization, traffic protection management, load balancing, etc., were all available free of charge.
AMH It is a fast, concise and lightweight Linux server management panel, suitable for beginners to use. Visual software installation is simple and convenient, which greatly saves server maintenance time.
Next, use AMH to automatically deploy the LNMP environment on RedHat 7. Microsoft Cloud Azure.com provides free Standard B1s (1 vcpu, 1 GiB memory) cloud server, and the Linux version only supports RedHat 7.7.
For beginners, it is enough to use, you can use wordpress to build a free Blog blog. You can also install mysql5.6 and php7.4, although only 100G outbound traffic per month,blogThe images in can be distributed around the world using Amazon Cloud's CDN.
AMH official website:https://amh.sh/
Use AMH to automatically deploy the LNMP environment
In this test, the AMH automatically deploys the LNMP environment and selects the Azure B1s server.
Configure the Linux basic environment
First, configure the Linux basic environment on the Azure B1s server.
For SSH remote connection, please refer to:Azure Linux Microsoft cloud host uses the Root super user to log in
Install the YUM enhancement tool, because it is RedHat 7, and the DNF command has not been released at that time, so you can only use the YUM command for software installation.
The DNF command (Dandified yum) is the next-generation version of the traditional YUM package manager for RedHat-based systems. It is the default package manager for Fedora 22, CentOS8 and RHEL8.
yum install yum-utils yum update
install dnf command
yum install dnf
Install epel and remi software sources, dnf repolist all command can view all data sources
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm dnf install https://rpms.remirepo.net/enterprise/remi-release-7.rpm dnf makecachea
Install DNF command auto-update
dnf install dnf-automatic systemctl start dnf-automatic.timer
Install the development tools package group
dnf group install 'Development Tools' -y
Configure SWAP virtual memory
The swap partition in Linux is similar to the virtual memory of Windows. When the physical memory is insufficient, the problem of too small memory can be solved by creating a swap partition.
use free -m
Check the server virtual memory, Microsoft B1s enables 2G virtual memory by default, if you think the 2G SWAP swap partition is too small, delete the Swap swap partition, and recreate a 4G or larger virtual memory SWAP swap partition.
use swapon -s
command to view the location of the swap partition.
# stop Swap swap partition swapoff /mnt/resource/swapfile # delete swap partition rm -rf /mnt/resource/swapfile # delete boot /etc/fstab configuration content sed -i "/'\/mnt/resource/swapfile swap swap swap defaults 0 0'//" /etc/fstab
Create a Swap swap partition
# Create 8G Swap swap partition virtual memory sudo dd if=/dev/zero of=/swapfile bs=1024 count=8388608 # View Swap swap partition size ls -lh /swapfile # Change swap file permissions sudo chmod 600 /swapfile # format the Swap file sudo mkswap /swapfile # enable the Swap file sudo swapon /swapfile # set boot echo '/swapfile swap swap sw 0 0' | sudo tee -a /etc/fstab
It is very important to modify the time zone of the server. Sometimes the time of the client and the server is different, and some software will not work.
sudo timedatectl set-timezone Asia/Shanghai
Permanently close the firewall. If you need the firewall function, you can set the firewall in the network option on the cloud platform of the Azure B1s server. The firewall setting on the cloud platform is more flexible.
# to view the firewall status systemctl status firewalld # to close the firewall systemctl stop firewalld # to permanently close the firewall systemctl disable firewalld
After the basic configuration is complete, reboot restarts the server and starts to install the LNMP environment.
Automatic deployment of LNMP environment
Enter the AMH panel installation page:https://amh.sh/install.htm
Click Custom Installation and select the version to be installed. Here, select nginx1.20 for web server software, musql5.6 for database software, and php8.0 version for php.
Log in to the Linux server with the root account, and execute the following command to install AMH:
wget http://dl.amh.sh/amh.sh && bash amh.sh nginx-1.20,mysql-5.6,php-8.0
Installation Tips
Install amh if prompted wget: command not found
Please execute the following command to install the wget command before installing AMH:
#centos system yum install -y wget #Ubuntu system apt-get install -y wget
If the server cannot resolve the amh.sh domain name during the amh installation process,
Please change the DNS of the server before installing AMH. Execute the following command to replace the DNS resolution:
echo -e "options timeout:1 attempts:1 rotate\nnameserver 8.8.8.8\nnameserver 114.114.114.114" >/etc/resolv.conf;
If you cannot access the panel after successfully installing amh, please check whether the hosting provider has security group/firewall restrictions, and please open the port, such as opening the panel 8888 and 9999 ports.
Systems supported by AMH7.0 compilation and installation
Supports all stable versions of CentOS, Ubuntu, and Debian currently released, and fully supports systems using x86/x86_64, aarch64/arm64 architecture:
- CentOS Stream 9 x64 New
- CentOS Stream 8 x64
- CentOS 7 x64
- Debian 11 x64 (bullseye)
- Debian 10 x64 (buster)
- Debian 9 x64 (Stretch)
- Debian 8 x64 (Jessie)
- Debian 8 i386 (Jessie)
- Debian 7 x64 (wheezy)
- Debian 7 i386 (wheezy)
- Ubuntu 22 x64 New
- Ubuntu 20x64
- Ubuntu 18x64
- Ubuntu 16 x64
- Ubuntu 16 i386
- Ubuntu 14x64
- Ubuntu 14 i386
On the Chinese installation interface, enter Y and press Enter to install AMH.
The compilation and installation speed is a bit slow, please wait patiently for a while.
It took 37 minutes to successfully install the AMH panel in the LNMP environment.
Enter the access address to log in to the host panel: https://20.231.211.35:9999
AMH username: admin
AMH password: 70dddd708f17
There are five items on the main panel, server CPU information, server disk information, server network card flow chart, server memory information, and server system information. Synchronize the system time of the server first in the server system information.
Next, you can manage the website and database on the server on the AMH panel. You don’t need to use SSH to connect to the server. You can control all the settings on the server on the host panel.
Click the settings in the upper right corner, in the settings you can modify the access port, and register an authorized account. Now the authorized account of AMH is free to apply, and you only need to register on the official website.
The registration of the authorized account is also very simple. After entering the account password, verify the mobile phone and that's it! After that, you can install server application software in the software store. Some software that needs to be purchased for authorization are professional-level software, which is basically not used by novice users. When you need it, you can recharge and buy it in time.
In the software store, there are some software that can be installed, which can be installed on demand.
If you want to successfully build a blog site, you need to install the following software in the software store.
CDN reverse proxy
Update to lngx-2.6 version. Add WebSocket (ws) anti-generation option, fix the problem that the https configuration is not updated when closing or starting the cache, add the ipv6 listening option, fix the problem of changing the environment nginx when the website has concurrency restrictions, broadband speed limit or traffic protection CDN mode, and repair the list of virtual hosts Click on the rule file to jump to switch the environmental management issue. Environment module for AMH-LNGX reverse proxy. LNGX is Linux+Nginx+X, where X is unrestricted. The lngx website environment provides support for cache management and setting of anti-generation sites, supports online keyword addition and replacement, supports setting different types of file replacement, and supports adding custom beginning and end html code blocks, etc. You can create an lngx environment as the front end of other environment applications, such as creating an lngx environment in different locations and enabling caching as a CDN accelerated image of the site, etc.
pseudo static rules
Updated and upgraded to amrewrite-2.0 version, added anti-leeching rule setting options, simplified command line operation, fixed subdomain host rule list not displaying association problems, optimized domain name jumping, URL rewriting options, adjusted and added 4 default new rules . AMRewrite is an AMH panel environment host URL rewriting module. The module provides adding, editing, deleting rules, maintaining rule files and verifying the correctness of rules.
SSL certificate management
Update and upgrade to amssl-3.6 (v17) version, update and fix the problem that the default site of the application certificate is not enabled, and fix the problem that ipv4 cannot enable http2 when there is ipv6 monitoring. AMSSL is the HTTPS/SSL certificate support module of the AMH panel. It supports custom configuration certificates, automatic rapid deployment of Lets Encrypt certificates (file verification or DNS verification of wildcard wildcard certificates), automatic renewal functions, certificate optimization, http /2. Functions such as mandatory https (HSTS), supported AMH environments include LNMP, LAMP, LNMH, and LNGX. HTTPS is based on SSL to create a secure encrypted HTTP channel, that is, the secure version of HTTP. The AMSSL module supports online custom generation of KEY private key, CSR signature, and CRT certificate file, and supports data input to manage certificates, enabling HTTPS/SSL access support for virtual hosts in the environment.
Memcached caching software
Updated to version 1.6.18 compatible with the latest gcc12.2 installation. Memcached is a high-performance distributed memory object caching system for dynamic web applications to reduce database load. It improves the speed of dynamic, database-driven websites by caching data and objects in memory to reduce the number of database reads.
Memcached PHP client enhanced version
Update and upgrade to pecl_memcached-3.1 (v5) version, support the latest PHP8.0. Both pecl_memcache and pecl_memcached are php extensions of Memcached software, and their functions are somewhat different. The latter is an enhanced version of the former. Memcached (client/php extension) is a cache project that can handle any number of connections and use non-blocking network IO. Because its working mechanism is to open up a space in memory, and then create a HashTable, Memcached will manage these HashTables by itself.
Redis caching software
Update to the latest Redis-6.2.6 (v3) version, optimize the stop program, and deal with the failure to stop redis when using a password. Redis is a high-performance open source key-value database. Redis is written in ANSI C language, supports network, can be memory-based or persistent log type, Key-Value database, and provides APIs in multiple languages. Redis is similar to Memcached. It supports relatively more stored value types, including string (string), list (linked list), set (set), zset (ordered set) and hash (hash type).
Redis PHP client
Upgrade to pecl_redis-5.3 version, which is compatible with and supports the latest php8.0, and you can choose to install pecl_redis2.2, 4.3 or 5.3 version. pecl_redis is the php environment extension module of AMH panel Redis software. Redis is a high-performance open source key-value database. pecl_redis is the PHP environment interface extension module of Redis. This extension needs to be installed when using Redis in the PHP environment.
If you need mail service, you also need to install dovecot+postfix+amsmtp to build an SMTP post office!