Focus on cloud service provider activities
Notes on website operation and maintenance

AliCloud ECS server attaching data disk and installing LNMP1.3 version process record

Every 6.1 is the day for the military brother to upgrade the version of LNMP one click script, as promised until this year LNMP1.3 The official version is released. According to the official documents provided, it must include optimizing scripts, upgrading component versions, supporting PHP7 versions, adding MYSQL5.7 support, and fixing various recent security problems. Although the other OneInstack script has also been used by a large number of users recently, many users are accustomed to LNMP, so they have been using it all the time, but the update speed is slightly slow.

However, for general Web site building requirements, the LNMP script environment can relatively meet the common application environment. After all, there are many usage documents that can be viewed after so many years of user use. Today, a friend asked Lao Zuo to help him mount the data disk and install the latest version of the LNMP1.3 edition. So I'll record this process. After all, I haven't used version 1.3 since this update. I'll check the changes by the way.

First, AliCloud ECS attaches data disks

Lao Zuo doesn't know what his friend thinks. The default Alibaba Cloud ECS server system disk is 40GB. He has to buy a 50GB data disk, and the website data is only a few gigabytes. Is the idea of the local tyrant different from ours?

1. Check data disk

 AliCloud ECS attach data disk

We can see that the/dev/xvdb/data disk has 53GB unmounted. This is the data disk purchased by this friend. Because the LNMP one click package will be used, and the site will use the HOME folder, we can mount the data disk to the HOME directory.

2. Attach the data hard disk (fdisk/dev/xvdb)

 Attach data hard disk

When prompted, enter n p 1, enter enter, enter wq

3. View the mount status (fdisk - l)

 ali-lnmp-3

We can see that the mount disk is already in, and we need to load it into the directory.

4. Format partition, create directory and mount

mkfs.ext3 /dev/xvdb1
echo '/dev/xvdb1  /home ext3    defaults    0  0' >> /etc/fstab
mount -a

Generally, the environment we use has a HOME directory, so there is no need to create a directory. For example, if you need to mount a special directory, you need mkdir to create a directory. After mounting, we will go to see if it is successful.

 Format partition, create directory and mount

We can see that the directory has been created and mounted. There is a 50GB drive letter in the HOME directory. We can install the LNMP environment package.

Second, install LNMP1.3 one key package

screen -S lnmp
wget -c http://soft.vpser.net/lnmp/lnmp1.3-full.tar.gz && tar zxf lnmp1.3-full.tar.gz && cd lnmp1.3-full && ./ install.sh lnmp

We use the official one click package for installation, but Alibaba Cloud ECS servers drag the default data packets very slowly, so I use the official domestic nodes.

Domestic node package: https://api.sinas3.com/v1/SAE_lnmp/soft/lnmp1.3-full.tar.gz

Then we choose to set the MYSQL password, PHP version, MYSQL database version, and install cache optimization according to the actual needs. Compared with ONEINSTACK installation settings, it is simple, because other components support us to install after LNMP installation. Compared with the installation process of LNMP1.2, the interface is the same, except for the update options of PHP 7 and MYSQL.

 Install LNMP1.3 one key package

If we see this interface, it indicates that the installation is complete, and then we can restart it to take effect.

In conclusion, through the above process, we can install the LNMP one click package program after attaching it to the AliCloud ECS server. By default, the HOME directory is used, so we can mount it to the HOME directory. Here is a question that needs to be solved. For example, if the AliCloud system disk has 40GB, can we combine the system disk with the purchased data disk and then mount it for use. According to the general introduction of P, configure the LVM implementation, but it is a bit troublesome.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » AliCloud ECS server attaching data disk and installing LNMP1.3 version process record


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge