CentOS7 LNMP + phpmyadmin environment (I. Virtual Machine and centos7 installation), centos7lnmp
Some time ago, when I was working with a company's servers, I found a lot of online tutorials messy, and then I sorted out an lnmp environment installation tutorial based on the existing information on the Internet. I have never written a blog for a long time because of my laziness. Taking advantage of the company's recruitment of new people, we sorted out the documents we had previously prepared and published a blog by the way. Okay, let's talk about it. The text begins.
Virtual Machine and CentOS7 Installation
If you have never been familiar with linux, we recommend that you start with virtual machine installation. Most of them use VMware. Here, I am using VMware12. After the installation is complete, click Create new virtual machine to customize it.
Next, select to install the operating system later. Next, select the corresponding version of linux. Here I use 64-bit.
Then select the installation location. Next, configure the number of Virtual Machine cores. Generally, if you install the command line interface, the core 1 is enough. This time I am going to demonstrate it in a graphical interface, so I opened two cores.
Next, allocate the memory. Here the memory needs to be a multiple of 4 MB. Here, my memory is 8 GB, SO 2 GB is allocated to the virtual machine. You can allocate it as needed. Just use the command line to 1 GB.
Next, select the network connection mode. Both bridging and NAT are supported.
Then keep the next step. It is better to store the disk files as a single file for convenient management.
Then, when preparing the virtual machine, click custom hardware to change the system iso path. Click CLOSE. The VM is enabled.
Centos7 will display the following interface, press enter, then ask for installation, press enter, and then the system image will be installed on its own.
Then, go to the following selection language interface.
The following page appears. Wait for the system to check whether the system is complete. First, install and select.
Generally, installation is minimized for production servers. Then configure the required software. Here I select desktop installation for better demonstration.
Select the disk to be installed.
Then, wait for the installation process and set the root password.
If you use a simple password, you need to complete it twice.
After the installation and restart are completed, a license page is displayed. Click "accept license.
After some simple configuration, an account will be created again. This account is used to log on to the system. This is not available on the command line interface.
After the installation is complete, When I ping Baidu, I find that the network cannot be connected. It may be that I forgot to configure the network at the time of installation. It doesn't matter. Next, use the command line to enable Nic configuration.
First, use the su command to switch to the root permission. With the root permission, some linux configurations can be modified.
Type the following command and press the tab key. A file with the specified prefix is displayed.
vi /etc/sysconfig/network-scripts/ifcfg-
For example
The file editing page is displayed as follows. Press I to change no in the last line to yes, Press esc to exit editing, and press wq to press enter to save and exit editing. (Here, the network service is simply enabled, and the IP address is still dynamic, because I am using a Wi-Fi network and cannot fix the IP address .)
Run the following code to restart the network service and run the ping command again to check that the network is enabled.
sudo systemctl restart network.service
Now, the linux system and installation are complete.