Recently, our new VPS customers have suddenly increased and we don't know where our friends are from. Maybe a forum mentioned our VPS, as long as you hear the cry of "tutorial", you can feel this eagerness from the other side of the earth. Installing Nginx on Linux, MySQL, PHP (also known as LNMP) is a line of command, and there is no need for any "tutorial". Even if you need a google/baidu tutorial, you can find the ghost, there is no need to "ask" again. For example, install Nginx, MySQL, and PHP on Ubuntu 12.04:
$ sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql nginx php5-fpm
It is not recommended for beginners to use the one-click Installation tool from the very beginning. The one-click Installation Tool hides details, which is not conducive to learning. However, after having configured the system several times and having been familiar with Linux, It is very convenient to use some one-click Installation Tools, in addition to installing necessary software, the one-click Installation tool also has some additional functions, such as "Disable SELINUX", "Change SSH port", and "add a vhost. The one-click Installation Tool Centmin Mod introduced here is improved by the original Centmin script. It seems that the original Centmin has stopped updating.
Note that Centmin Mod can only run on CentOS/RHEL systems and replaces the original MySQL with MariaDB, the default MySQL version of almost all mainstream Linux releases (Fedora/RHEL, openSUSE, Arch Linux, and Slackware) will be switched to MariaDB, and Red Hat will use MariaDB in RHEL 7.0, google is also replacing MySQL with MariaDB.
Update the entire system before running the Centmin Mode script. If necessary, restart the system:
# yum -y update
# reboot
Download and decompress the CentMin Mod package, and add the executable permissions for centmin. sh:
# wget http://centminmod.com/download/centmin-v1.2.3-eva2000.03.zip
# unzip centmin-v1.2.3-eva2000.03.zip
# cd centmin-v1.2.3mod/
# chmod +x centmin.sh
Run this script:
# ./centmin.sh
--------------------------------------------------------
Centmin Mod 1.2.3-eva2000.03 - http://centminmod.com
--------------------------------------------------------
Centmin Mod Menu
--------------------------------------------------------
1). Centmin Install
2). Add Nginx vhost domain
3). NSD setup domain name DNS
4). Nginx Upgrade / Downgrade
5). PHP Upgrade / Downgrade
6). XCache Re-install
7). APC Cache Re-install
8). XCache Install
9). APC Cache Install
10). Memcached Server Re-install
11). MariaDB 5.2.x Branch Upgrade Only
12). MariaDB 5.2.x to MariaDB 5.5 YUM upgrade
13). Install ioping.sh vbtechsupport.com/1239/
14). SELinux disable
15). Install/Re-install imagick PHP Extension
16). Change SSHD Port Number
17). Multi-thread compression: pigz,pbzip2,lbzip2,p7zip etc
18). Suhosin PHP Extension install
19). Install FFMPEG and FFMPEG PHP Extension
20). NSD Re-install
21). Exit
--------------------------------------------------------
Enter option [ 1 - 21 ] 1
...
*************************************************
* Centmin Mod install completed....
*************************************************
The above menu prompt is clear. Select 1 ). centmin Install starts to Install Nginx/MySQL/PHP. After the installation is complete (it may take about 10 to 30 minutes), access the VPS directly from the browser through the IP address to see Nginx Test Page.
If you need to Add an Nginx vhost configuration, select 2). Add Nginx vhost domain:
# ./centmin.sh
--------------------------------------------------------
Centmin Mod 1.2.3-eva2000.03 - http://centminmod.com
--------------------------------------------------------
Centmin Mod Menu
--------------------------------------------------------
1). Centmin Install
2). Add Nginx vhost domain
3). NSD setup domain name DNS
4). Nginx Upgrade / Downgrade
5). PHP Upgrade / Downgrade
6). XCache Re-install
7). APC Cache Re-install
8). XCache Install
9). APC Cache Install
10). Memcached Server Re-install
11). MariaDB 5.2.x Branch Upgrade Only
12). MariaDB 5.2.x to MariaDB 5.5 YUM upgrade
13). Install ioping.sh vbtechsupport.com/1239/
14). SELinux disable
15). Install/Re-install imagick PHP Extension
16). Change SSHD Port Number
17). Multi-thread compression: pigz,pbzip2,lbzip2,p7zip etc
18). Suhosin PHP Extension install
19). Install FFMPEG and FFMPEG PHP Extension
20). NSD Re-install
21). Exit
--------------------------------------------------------
Enter option [ 1 - 21 ] 2
--------------------------------------------------------
Enter vhost domain name you want to add (without www. prefix): vpsee.com
---------------------------------------------
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
Reloading nginx: [ OK ]
---------------------------------------------
vhost for vpsee.com created successfully
vhost conf file for vpsee.com created: /usr/local/nginx/conf/conf.d/vpsee.com.conf
upload files to /home/nginx/domains/vpsee.com/public
vhost log files directory is /home/nginx/domains/vpsee.com/log
Current vhost listing at: /usr/local/nginx/conf/conf.d/
Sep 11 22:26 2.3K virtual.conf
Sep 11 22:26 798 ssl.conf
Sep 11 22:55 1002 vpsee.com.conf
---------------------------------------------
If you want to Install the PHP accelerator APC, run centmin. sh and select 9). APC Cache Install; if you want to change the SSH port? Want to disable SELinux? Check the menu prompts above.