How To Install Centmin Mod Nginx LEMP Web Stack

Centmin Mod LEMP web stack installer auto installs on CentOS, Nginx, PHP-FPM, MariaDB MySQL and CSF Firewall.

* 1.2.3-eva2000.07 stable release only supports CentOS 6.x and Oracle Linux 6.x.

  • 1.2.3-eva2000.08 beta is an on going project to add CentOS 7.x support as well. See change log.
    I've made a new .08 beta dual installation how to video where I simultaneously installed Centmin Mod .08 beta on both CentOS 6.6 + CentOS 7.0 servers side by side :D

Uses the new SSH one liner install method

https://www.youtube.com/watch?v=MsAIxsK1d_g

![](" /> Enjoy !

14 Replies

Centmin Mod .08 beta 03 LEMP stack auto installer has just been released with added support for Nginx vhost traffic statistics and Nginx Lua + LuaJIT support https://community.centminmod.com/posts/13961/ :)

Nginx Vhost Traffic Statistics https://community.centminmod.com/thread … sion.3022/">https://community.centminmod.com/threads/centmin-mod-nginx-live-vhost-traffic-statistics-preview-discussion.3022/

Nginx Lua + LuaJIT Support https://community.centminmod.com/thread … ions.3023/">https://community.centminmod.com/threads/centmin-mod-nginx-lua-luajit-support-preview-discussions.3023/

Centmin Mod .08 beta 03 is planning to go stable by end of June if all goes to plan. So if anyone wants to do last minute beta testing check out the 8 step guide for installation at https://community.centminmod.com/posts/15231/ :)

wow really nice keep building this project and always update it with more features, I loved it and used it once . Its great project by you. take care with its future.

I'm not quite comfortable with the fact that Centmin Mod installs its own source-compiled versions of nginx and PHP-FPM instead of using proven reliable packages from the base OS and epel+remi repositories that it enables anyway. There's not much point in using a stable binary distribution like CentOS if you're going to ignore well-tested binary packages and compile your own all the time. You might as well just use a cutting-edge distro like Arch Linux or non-LTS Ubuntu, or even go hardcore Gentoo.

Let's say you installed PHP 5.4 (the default recommended version). That version of PHP will stop receiving security fixes after September 14, 2015only 3 weeks from today. Then what? Do we rely on the Centmin Mod team to backport security fixes to their source-compiled version of PHP 5.4? Force-upgrade to a newer version that the maintainers say may be incompatible? Force-downgrade to a version that is officially maintained by Red Hat & CentOS? None of this would have been an issue if you just did "yum install php".

@pakspecial:

wow really nice keep building this project and always update it with more features, I loved it and used it once . Its great project by you. take care with its future.
Thanks for kind words, FYI Centmin Mod 1.2.3-eva2000.08 stable is out now - see what's new at http://centminmod.com/whatsnew.html

@hybinet:

I'm not quite comfortable with the fact that Centmin Mod installs its own source-compiled versions of nginx and PHP-FPM instead of using proven reliable packages from the base OS and epel+remi repositories that it enables anyway. There's not much point in using a stable binary distribution like CentOS if you're going to ignore well-tested binary packages and compile your own all the time. You might as well just use a cutting-edge distro like Arch Linux or non-LTS Ubuntu, or even go hardcore Gentoo.

Let's say you installed PHP 5.4 (the default recommended version). That version of PHP will stop receiving security fixes after September 14, 2015only 3 weeks from today. Then what? Do we rely on the Centmin Mod team to backport security fixes to their source-compiled version of PHP 5.4? Force-upgrade to a newer version that the maintainers say may be incompatible? Force-downgrade to a version that is officially maintained by Red Hat & CentOS? None of this would have been an issue if you just did "yum install php".
hybinet depends on what you need from Nginx.. no distro YUM repo provided Nginx or Debian/Ubuntu apt-get provided repo of Nginx will provide the Nginx modules that Centmin Mod Nginx comes with by default - see list and configuration at http://centminmod.com/nginx.html including both HTTP/2 and ngx_pagespeed and Nginx lua support. But yes I understand what you mean for YUM repo maintainers like CentOS who usually can backport fixes into same version packages.

Centmin Mod PHP-FPM allows users to update PHP via centmin.sh menu option 5 to whatever PHP version they want to use. Just specify the version number at command prompt i.e. 5.4.44, 5.5.28, 5.6.12 or 7.0.0RC1. See example of updating to PHP 5.6.12 at https://community.centminmod.com/posts/17168/ and also outlined at http://centminmod.com/phpfpm.html where you can setup Centmin Mod with a different default PHP version i.e. PHP 5.6.12 if you want just by editing centmin.sh prior to initial install.

Centmin Mod was built so that end users can update Nginx and PHP-FPM whenever they want with whichever Nginx or PHP versions they want to use without any reliance on my to update Centmin Mod most of the time (with exception of bleeding end versions like PHP 7.0.0RC1 needed a minor update from me).

See FAQ 18 at http://centminmod.com/faq.html as to why Nginx and PHP-FPM are compiled via source compile. Basically, Centmin Mod end users can update to latest versions via tarball which is some cases is faster than waiting for distro or 3rd party provided YUM repos i.e. Nginx 1.9.x with HTTP/2 support and PHP 7.0.0RC and also PHP 7.0.0 master dev support if you specify PHP version as 7.0.0 at prompt.

Centmin Mod shell menu allows users to update Nginx via option 4 and PHP-FPM via option 5 without any waiting on me to update Centmin Mod :)

--------------------------------------------------------
Centmin Mod 1.2.3-eva2000.08 - 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/5.5 & 10.x Upgrade Sub-Menu
12). Zend OpCache Install/Re-install
13). Install ioping.sh vbtechsupport.com/1239/
14). SELinux disable
15). Install/Reinstall ImagicK PHP Extension
16). Change SSHD Port Number
17). Multi-thread compression: pigz,pbzip2,lbzip2...
18). Suhosin PHP Extension install
19). Install FFMPEG and FFMPEG PHP Extension
20). NSD Re-install
21). Update - Nginx + PHP-FPM + Siege
22). Add Wordpress Nginx vhost + WP Super Cache
23). Update Centmin Mod Code Base
24). Exit
--------------------------------------------------------
Enter option [ 1 - 24 ]     

hope that helps clarify what Centmin Mod LEMP stack does

example of end user option to update PHP via centmin.sh menu option 5

--------------------------------------------------------
Centmin Mod 1.2.3-eva2000.08 - 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/5.5 & 10.x Upgrade Sub-Menu
12). Zend OpCache Install/Re-install
13). Install ioping.sh vbtechsupport.com/1239/
14). SELinux disable
15). Install/Reinstall ImagicK PHP Extension
16). Change SSHD Port Number
17). Multi-thread compression: pigz,pbzip2,lbzip2...
18). Suhosin PHP Extension install
19). Install FFMPEG and FFMPEG PHP Extension
20). NSD Re-install
21). Update - Nginx + PHP-FPM + Siege
22). Add Wordpress Nginx vhost + WP Super Cache
23). Update Centmin Mod Code Base
24). Exit
--------------------------------------------------------
Enter option [ 1 - 24 ] 5
--------------------------------------------------------
Do you want to run YUM install checks ?  [y/n]

This will increase your upgrade duration time wise.
Check the change log centminmod.com/changelog.html
to see if any Nginx or PHP related new additions
which require checking YUM prequisites are met.
If no new additions made, you can skip the
YUM install check to speed up upgrade time.

[y/n]: n
PHP Upgrade - Would you like to continue? [y/n] y
----------------------------------------------------------------
Install which version of PHP? (version i.e. 5.4.44, 7.0.0, NGDEBUG)
PHP 7.0.0 is experimental in alpha status and may have broken PHP extensions.
NGDEBUG is PHP 7.0.0 minus incompatible PHP extensions
----------------------------------------------------------------
Enter PHP Version number you want to upgrade/downgrade to: 5.6.12
----------------------------------------------------------------
Want to update to latest php-fpm.conf ? (overwrites will auto backup existing php-fpm.conf)
existing php.ini will be backed up at /usr/local/lib/php.ini-oldversion_070815-165838
existing php-fpm.conf will be backed up at /usr/local/etc/php-fpm.conf-oldversion_070815-165838
----------------------------------------------------------------
Update & overwrite your existing php-fpm.conf [y/n]: n
----------------------------------------------------------------
-----------------------------------------------------------------------------------------
Detected PHP 5.6 branch.
You can compile Zend OPcache (Zend Optimizer Plus+) support
as an alternative to using APC Cache or Xcache cache.
But Zend OPcache only provides PHP opcode cache and
DOESN'T do data caching, so if you web apps such as Wordpress,
Drupal or vBulletin require data caching to APC or Xcache,
it won't work with Zend OPcache.

-----------------------------------------------------------------------------------------
Do you want to use Zend OPcache [y/n] ? y
*************************************************

Fri Aug  7 17:07:47 UTC 2015
Success: PHP was installed properly

*************************************************
php -v
PHP 5.6.12 (cli) (built: Aug  7 2015 17:06:17)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

Example of updating to PHP 7.0.0RC1 via centmin.sh menu option 5 https://community.centminmod.com/thread … -fpm.4183/">https://community.centminmod.com/threads/php-7-0-0rc-releases-centmin-mod-updating-php-fpm.4183/

@centminmod:

no distro YUM repo provided Nginx or Debian/Ubuntu apt-get provided repo of Nginx will provide the Nginx modules that Centmin Mod Nginx comes with by default - see list and configuration at http://centminmod.com/nginx.html including both HTTP/2 and ngx_pagespeed and Nginx lua support.

That's a good point. I don't see much problem with source-compiling nginx, as it is a small, self-contained program with strong backward compatibility guarantees and not too many security issues. My primary concern is with PHP.

@centminmod:

whatever PHP version they want to use… i.e. 5.4.44, 5.5.28, 5.6.12 or 7.0.0RC1… end users can update Nginx and PHP-FPM whenever they want with whichever Nginx or PHP versions they want to use

All those versions are going to be outdated as soon as 5.4.45, 5.5.29 and 5.6.13 come out. Sticking to a particular patch release is neither practical nor necessary in this age of semantic versioning, which PHP follows pretty well these days. If someone installed 5.4.44, it's reasonable to assume that they will want 5.4.45 as well. Does Centminmod notify the user automatically if a new patch version becomes available, or does the user need to specify exactly which version they need to update to?

PHP 5.4 EOL is approaching very quickly, and even remi ain't going to maintain it much longer. I suggest that you make provisions to fall back (at least on CentOS 7) to the distro-maintained branch of 5.4, which will be safe for the next 9 years. 5.5 is okay for another 10 months or so, and then there will be no fallback. Users need to understand that their preferred setup won't last forever.

Right now Centmin Mod requires users to specify the PHP version they want to use, upgrade or downgrade to. I've actually been working on version notifications within SSH as well in which might make it into next release (or current .09 beta). Also next release might default to PHP 5.5 and/or .08 stable might get updated to default to PHP 5.5

i.e. something like this when you first SSH login each time

##############################################################   
 Centmin Mod:           1.2.3-eva2000.09
 Hostname:              centminmod.com
 OS:                    CentOS release 6.7 (Final)
 Kernel:                2.6.32-042stab093.5
 Uptime:                12 day(s) 4:30:57
 Nginx:                 nginx/1.9.3  [latest: 1.9.4]
 PHP-FPM:               PHP 7.0.0RC1 [latest: check php.net]
 MariaDB MySQL:         10.0.21-MariaDB
 CSF Firewall:          csf: v8.04
##############################################################   

That's great! A reliable update mechanism would alleviate most of the concerns that I usually have about installers and control panels of this sort.

Yeah for now next 123.09beta has added for testing install options for PHP 5.5 and PHP 5.6 by default too https://community.centminmod.com/posts/17623/ :)

Hello,

some body help me install NodeBalancer on two server running Centmin Mod?

thank You

Seems like great material. Thanks for sharing. I hope many people find this useful.

Added Linode stackscript for CentOS 7 and latest beta centmin mod stack install https://community.centminmod.com/thread … ipt.12513/">https://community.centminmod.com/threads/official-centmin-mod-linode-stackscript.12513/

https://www.linode.com/stackscripts/profile/centminmod

https://www.linode.com/stackscripts/view/152674

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct