In the field of Internet site development, there is a noun, we must be unfamiliar, that is lamp, the classic Web server environment, composed of linux+apache+mysql+php, later, a name Nginx Web server open source, because of its higher concurrency, System resource utilization is higher, in the market share also gradually increased, in the Netcraft website to see data, between 1995 to 2015, each kind of server usage trend:
As you can see, Apache is still the most popular Web server, Nginx belongs to the rising star, and soon occupies the market. The main features of Nginx are as follows:
1. High-speed concurrent caching and access to static resources
2. Can be used as a reverse proxy or load balancer server
3. Cache server and Mail Service proxy
4. Less resource consumption
5 .....
LNMP is also stepping into the use of various internet companies, therefore, LNMP platform set up the series on the lnmp of the building, this article for the Linux system installation.
The origin of the Linux system, the development of such articles, online, many books, here is ignored, directly began to install Linux system Bar ~
1. System Selection:
At present, the server side uses more operating systems for the CentOS version of the Linux system, and the 6.5 version of the majority, because I have been using the 7.0 version of 64-bit, also in the compilation and installation of various software tread a lot of pits, with centos7.0_x86_64 bit of it, are similar, Just a little difference in the permissions profile path, can be used, and 7.0 release also released several years, can be introduced in the new project, get gradually introduced in the old project, after all, prudent for the big.
2. Installation:
Installed virtual machine and the actual computer way, here for the convenience of what, the use of VMware virtual machine, new virtual machine These steps follow the prompts to the line, not difficult, set up the CPU, memory, hard disk size and network connection mode is OK.
After the virtual machine is created, open the virtual machine's optical drive and install it using the iOS file, as follows:
Then start the virtual machine:
If this error occurs, upgrade VMware:
After starting the interface appears as follows, select "Install CentOS 7":
Select the language of the installation process, which uses the default English:
Click "Continue" to proceed to the next step:
Set the time zone here: Asia/shanghai, the language to choose, the default is English, because it is a server installation, here to choose the minimum principle, the use of the simplest version of the installation, so that the installation of less software, open services are also few, so that the server will be more secure, After using what software we need to install the configuration can be.
Then, select "Installation Destination" to enter the system partition interface, the default is automatically partitioned, here Select the way to manually partition, as follows:
Clicking "Done" will enter the partition interface:
In the partition mode there is now the default selection of "LVM" mode, which is a Linux environment for the partition of the management method, the normal partition of the disk partition can not be resized after partitioning, if a partition space is exhausted, you need to use the symbol to link to other partitions or use the partition tool adjustment, However, this is cumbersome, and LVM can easily adjust the partition size without the need for downtime, where the standard partitioning mode is temporarily selected.
Click "+" to pop up a box to assign a new partition selection:
The partitioning scheme used here is as follows (HDD 20GB):
1. Boot partition:/BOOT:250MB
2. Swap partition: Swap (note that this is not a mount point): 1.5 times times the physical memory, this is 3GB
3. Root partition:/: Remaining space size
For a database server, adding one more partition, such as the/data partition, is better, and it is convenient to back up data and extensions.
The partitions are displayed as follows:
After clicking "Done", the following screen appears:
After clicking on "Accept changes" to apply the partition, return to the following interface:
Click "Begin Installation" to start the installation, as follows:
During the installation process, we need to set up the Super Administrator's account password and create a new user and set their password. After the installation is complete, the following interface appears, click "Reboot" to:
After the reboot is complete, enter the following login page, because the minimum installation mode is used, so the image user interface is not installed:
We enter the newly created username and password to log in just after the installation process:
Let's look at its IP address and use the command ifconfig:
This prompts us to install the Web tool "sudo yum install-y net-tools", the installation process is as follows:
After the installation, you can see it in the View IP:
Here, the installation of the Linux system is complete, followed by a security operation to configure the configuration, such as:
1. System command Backup, it is recommended to do it immediately after the first installation, so that after the monitoring system has a kernel infection when running the command is safe to use a command that has not been modified by hackers
2. Install some system monitoring tools, such as htop,ntopng, can be very good to see the system operating status
3. Close unnecessary services and ports, leaving only the ports that need to be opened
4. Modify the SSH Telnet window, if necessary, using public/private key to log in, you can prevent password retention hack.
5 .....
Next, we will show you how to build a Web server based on Nginx.
Installation of---Linux system LNMP Platform