Building a set of LNMP for hcaas container virtual machine

Time:2021-2-19

Container virtual machine is hcaas( https://cubepaas.com )It can create virtual machines of any specification (minimum 0.1V CPU, 40MB memory) in seconds, and charge according to the actual use of CPU / MEM of container virtual machines, which is very suitable for learning / testing. The virtual machine of container implements data persistence through commit writable image layer of container, makes special transformation to the image of container, supports systemctl / iptables, and the user’s usage is exactly the same as that of virtual machine.

There are a lot of middleware to be installed to build a website, which can be quickly built with LNMP package.
LNMP one click installation package is a shell program written in Linux shell, which can install LNMP (nginx / MySQL / PHP) and production environment for CentOS / RHEL / Fedora / aliyun / Amazon, Debian / Ubuntu / raspbian / deepin / Mint Linux VPS or independent host

Step 1: create a virtual machine with one click

Create a container virtual machine from the menu container virtual machine,
Virtual machine OS: select the virtual machine operating system. Hcaas provides two operating systems: Ubuntu 18.04 64 bit and CentOS 7.4 64 bit. CentOS 7.4 is used here.
Open port: port 22 is open by default. Port 803306 needs to be opened for nginx and mysql.
Virtual machine specification: there are some compilation steps in the process of installing LNMP. It is recommended that CPU 1vcpu or higher. The 32x specification is selected here
Building a set of LNMP for hcaas container virtual machine
After saving, jump to the container virtual machine list page. Second level start!
Building a set of LNMP for hcaas container virtual machine

Step 2: log in to the virtual machine

Click the SSH login mode button, the specific information of login will be displayed in the pop-up box, and the virtual machine can be logged in by inputting the pop-up box information in the terminal.
Building a set of LNMP for hcaas container virtual machine
For security, use chpasswd to modify the login password

You can also log in using webshell on the page
Building a set of LNMP for hcaas container virtual machine

Step 3: install LNMP

Reference website https://lnmp.org/install.html , run the following command

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

Building a set of LNMP for hcaas container virtual machine
Wait a few minutes and a half hours and LNMP will be installed!

Step 4: how to visit?

Remember SSH’s address before? Yes, this represents the server address. You only need to access its “80” port. In hcaas, ports are mapped, so in the list of container virtual machines, click “view ports”
Building a set of LNMP for hcaas container virtual machine
The corresponding port 31905 is found. Open in browser idc.cubepaas.com:31509 Find the default home page of LNMP!
Building a set of LNMP for hcaas container virtual machine

Recommended Today

Implementation example of go operation etcd

etcdIt is an open-source, distributed key value pair data storage system, which provides shared configuration, service registration and discovery. This paper mainly introduces the installation and use of etcd. Etcdetcd introduction etcdIt is an open source and highly available distributed key value storage system developed with go language, which can be used to configure sharing […]