Nginx install script, PHP 5.3.10 (php-fpm), MariaDB 5.2.10, Xcache v1.3.2, Memcached server, CSF firewall, Siege Benchmark, Python 2.72

Print Friendly

Centmin v1.2.0 – Nginx install script for CentOS servers by BTCentral has been updated and released incorporating alot of my modifications which were made to Centmin v1.1.0 base here. I’ve updated my modifications to use Centmin v1.2.0 and higher as a base. Centmin v1.2.0 has fixed my modifications to work with both CentOS 32bit and 64bit servers.

Update: October 8th, 2011

Centmin Mod project gets own domain name: centminmod.com (runs on 3x load balanced Centmin Mod Nginx based web servers :) ). Will eventually transition the download link to centminmod.com.

Update: October 5th, 2011

Centmin Mod get’s it’s own logo. I used Denmark font for the text :)

Centmin Mod Logo

Update: September 24th, 2011

Menu based custom Centmin installer script has been officially released. Starting with Centmin 1.2.1-eva2000.14, you will be able to use a menu based Centmin installer. Just to clarify with the new menu version you DO NOT need to do a full reinstall again, you just download new centmin menu version and extract and run centmin.sh and DO NOT touch option #1, just run option #4 for nginx upgrade and #5 for php upgrade if need be.

As stated in comment replies below, I held off adding addition features to my custom Centmin version until I implemented a menu system. I finally got around to implementing a menu system and have started adding additional menu features to beta versions and then to final public release.

You can now recompile Xcache, APC and Memcached servers as well as upgrade Nginx, PHP, and MariaDB 5.2 MySQL. I’ve also added a menu option to add domain names to Nginx virtual host configuration and adding domain names to NSD name server – automatically creating the nsd.conf zone entry and NSD dns zone file. New installations also automatically setup log rotation for Nginx and PHP-FPM log files. If you are using older Centmin 1.2.1-eva2000.xx release there’s also menu options #14 and #15 which setup logrotate for you.

Centmin menu below:

--------------------------------------------------------
Centmin 1.2.2-eva2000.16 - http://centminmod.com
--------------------------------------------------------
                   Centmin Menu
--------------------------------------------------------
1).  Centmin Install
2).  Add Nginx vhost domain
3).  NSD setup domain name DNS
4).  Nginx Upgrade
5).  PHP Upgrade
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 Upgrade
12). Install ioping.sh vbtechsupport.com/1239/
13). SELinux disable
14). Setup Logrotate for Nginx
15). Setup Logrotate for PHP-FPM
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 ]
--------------------------------------------------------

SSH2 Telnet client tip
If your SSH2 Telnet client options allow for it you can increase the size of your scroll back buffer size to allow larger amounts of outputted text to be shown via scrolling back and forth. This is the option in VanDyke SecureCRT SSH2 telnet client I use. I set my scrollback buffer to maximum size of 128,000 lines.


Here’s my modified Centmin v1.2.1  below which automatically installs the following via bash shell script framework written by BTCentral folks. Updates to my modified version will be updated in this blog post, so bookmark it and check back regularly. Also if you like this post/Centmin mod, feel free to share/vote on social media site links at top of post i.e. facebook, reddit, twitter, google+ etc ;)

  • Nginx v1.2.0
  • PHP 5.3.6 5.3.7 5.3.11 php-fpm install
  • MariaDB 5.2.12 default MySQL server – you’ll want min 512MB of installed memory
  • Memcached 1.4.13
  • Memcache v3.0.5 (do not use v3.0.6 doesn’t seem to work properly)
  • Xcache v1.3.2
  • APC 3.1.10
  • Python v2.72
  • CSF firewall
  • Siege benchmark and Sproxy.
CentOS 5.5/5.6 32bit & 64bit tested only. CentOS 6.x only tested on Centmin v1.2.1-eva2000.04 and higher.

Change log:

(compared to official Centmin v1.2.1/v1.2.2)

v1.2.2-eva2000.16 -29/04/2012

  • Updated PHP from v5.3.10 to v5.3.11 http://php.net/ChangeLog-5.php
  • Updated Nginx from v1.1.19 to v1.2.0 stable release http://nginx.org/en/CHANGES
  • Updated Xcache from v1.3.2 to v2.0.0 for PHP 5.4 support http://xcache.lighttpd.net/wiki/Release-2.0.0
  • Updated APC Cache from v3.1.9 to v3.1.10 beta for PHP 5.4 support http://pecl.php.net/package-changelog.php?package=APC (note: v3.1.10 beta retains v3.1.9 version name in PHPINFO so I modified the APC files to correct version number to v3.1.10 etc)
  • Updated APC configuration template files with additional settings you will need to manually add these to your /usr/local/lib/php.ini. You can compare using download zip’s copy at config/apc/apc-min.ini or apc.ini
  • Updated staticfiles.conf nginx includes file. You can find updated file in zip dowload config/nginx/staticfiles.conf which you can replace and overwrite the one on server at /usr/local/nginx/conf/staticfiles.conf
  • Updated nginx.conf and vhost template to add a 32K buffer to access_log logging. Changes aren’t updated automatically, you will need to update the /usr/local/nginx/conf/nginx.conf manually to remove line log_format bytes_log “$msec $bytes_sent .”; and add the line access_log logs/access.log combined buffer=32k;. You can compare using download zip’s copy at config/nginx/nginx.conf to compare against your live servers copy
  • Added optional Nginx modules from Agentzh’s Openresty bundle, memc-nginx-module and srcache-nginx-module. These modules are disabled by default but can be enabled by setting ‘y’ for new variable named NGINX_OPENRESTY=n. For more details read https://github.com/agentzh/memc-nginx-module and https://github.com/agentzh/srcache-nginx-module. No support is provided by me, optional modules are provided as is

v1.2.2-eva2000.15 -14/04/2012

  • Updated Nginx from v1.1.18 to v1.1.19 http://nginx.org/en/CHANGES
  • Updated MariaDB 5.2.11-115 MySQL to MariaDB 5.2.12-115 MySQL http://kb.askmonty.org/en/mariadb-5212-release-notes
  • Updated APC Cache install and re-install routine including setting up password protected file using htpasswd.py tool
  • Updated YUM Install routine to be smarter in checking each package whether it’s already installed and needs updating or whether it’s not installed and needs installing
  • Updated php-fpm.conf files and vhost virtual.conf with pm.status and ping settings. PHP-FPM status/ping is disabled by default, uncomment setting #include /usr/local/nginx/conf/phpstatus.conf; in vhost virtual.conf and restart nginx and php-fpm services to enable. For folks upgrading Centmin Mod, ensure /usr/local/nginx/conf/phpstatus.conf exists, you can find a copy of it in v1.2.2-eva2000.15 zip file’s config/nginx/phpstatus.conf location.
  • Fixed CentOS 6.x EPEL Repo link
  • Fixed NSD v3.2.10 install/reinstall issue by moving NSD install routine further down the order for installation, seems v3.2.10 complains it can’t find the SSL libraries for some reason and fails to compile, so no /etc/nsd directory is created.
  • Add logging support to menu options. Log directory defined by variable CENTMINLOGDIR=’/root/centminlogs’ in inc/centminlogs.inc. When run menu option, the entire process will be logged to a time stamped text log file named ${CENTMINLOGDIR}/centminmod_${SCRIPT_VERSION}_${DT}_*.log so you can review the logs for error messages etc.

v1.2.2-eva2000.14 – 3/04/2012

  • Updated memcached init.d stop/start files with $SERVERIP variable
  • Updated Nginx from v1.1.17 to v1.1.18 http://nginx.org/en/CHANGES
  • Updated libevent from v2.0.17 stable to v2.0.18 stable
  • Updated MariaDB 5.2.10-107 MySQL to MariaDB 5.2.11-115 MySQL http://kb.askmonty.org/en/mariadb-5211-release-notes
  • Updated php-fpm upgrade routine to prompt for php-fpm.conf overwrite with latest version and backup existing php-fpm.conf
  • Updated php-fpm.conf templates with additional settings and changing from dynamic to ondemand PHP process manager with pm.process_idle_timeout defaulting to 10 seconds
  • Updated YUM install/checks for CentOS 5.8 detection
  • Updated MariaDB 5.2.x upgrade routine

v1.2.2-eva2000.13 – 16/03/2012

  • Updated Nginx from v1.1.16 to v1.1.17 http://nginx.org/en/CHANGES
  • Updated Nginx upgrade routine, it automatically backs up CONF/ directory before running upgrade and is controlled via 3 variables in centmin.sh NGINXBACKUP=’y', NGINXCONFDIR=’/usr/local/nginx/conf’, NGINXBACKUPDIR=’/usr/local/nginxbackup’

v1.2.2-eva2000.12 – 12/03/2012

  • Updated Nginx from v1.1.14 to v1.1.16 http://nginx.org/en/CHANGES
  • Updated libevent from v2.0.16 to v2.0.17 https://raw.github.com/libevent/libevent/release-2.0.17-stable/ChangeLog
  • Updated NSD from v3.2.8 to v3.2.10
  • Fixed PHP 5.4.0 upgrade error however PHP 5.4.0 seems to be currently incompatible with APC, Suhosin and FFMPEG extensions right now, so please stick with PHP 5.3.10
  • Fixed Memcache PHP extension reinstall routine
  • Added NSD re-install routine
  • Revised csftweaks.inc settings

v1.2.2-eva2000.11 – 06/02/2012

  • Updated PHP from v5.3.9 to v5.3.10 http://www.php.net/archive/2012.php#id2012-02-02-1
  • Updated Nginx from v1.1.11 to v1.1.14 http://nginx.org/en/CHANGES
  • Updated Memcached server from v1.4.10 to v1.4.13
  • Updated MariaDB my.cnf templates adding skip-pbxt_statistics & skip-archive
  • Updated Pigz v2.2.2 to v2.2.3
  • Updated Nginx upgrade routine with NGINXUPGRADESLEEP=’20′ variable to customise how long between Nginx stop command and when source upgrade’s make command is run. On some systems Nginx service shutdown doesn’t immediately or cleanly shutdown Nginx processes, causing Nginx upgrade to fail. The upgrade routine for Nginx will now have a NGINXUPGRADESLEEP =20 second initial delay after Nginx service is shutdown before make is run. The upgrade routine then will check if Nginx processes are still running and if so, trigger a 2nd NGINXUPGRADESLEEP = 20 second delay before running make. You can adjust the delay via NGINXUPGRADESLEEP=’20′.
  • Fixed plzip download url
  • Fixed lzip download url
  • Fixed autoconf/autoconf-2.1.3 PHP-FPM compile on CentOS 5.7
  • Increased nginx.conf gzip level from default 1 to 7
  • Added ImageMagicK via YUM install
  • Added Suhosin PHP Extension Menu Install option for php-fpm
  • Added FFMPEG via YUM install + FFMPEG PHP extension for php-fpm

v1.2.2-eva2000.10 – 15/01/2012

  • Added check for wget which maybe missing on CentOS 6.x minimal install ISO CD images (read)
  • Added more checks for yum install prerequisites prior to Nginx and PHP upgrades to make sure updated changes to Nginx and PHP upgrade routines have the required dependencies etc
  • Fixed command shortcuts to detect if memcached and CSF are actually installed before installing their respective command shortcuts

v1.2.2-eva2000.09 – 12/01/2012

  • Updated PHP from 5.3.8 to 5.3.9 for security and bug fixes, including DoS hash fix http://www.php.net/archive/2012.php#id2012-01-11-1
  • Tuned CSF firewall settings
  • Fixed Sproxy install – missing perl-ExtUtils-MakeMaker
  • Added via yum install iotop, iftop and mytop
  • Added diskalert.sh script to cron.daily cronjob to alert when system partitions reach >90% full. Default email alerts sent to root unless you edit EMAIL=” variable in /etc/cron.daily/diskalert
  • Added alternative download option for CentOS versions greater than >6.x to use Axel download accelerator instead of wget to download apps. Axel download accelerator uses multiple connections to speed up downloads

v1.2.2-eva2000.08 – 20/12/2011

  • Checks for latest working & tested CentOS version

v1.2.2-eva2000.07 – 13/12/2011

  • Updated Nginx from v1.1.8 to v1.1.11 http://nginx.org/en/CHANGES
  • Updated MariaDB MySQL from 5.2.9-102 to 5.2.10-107
  • Fix ngx_cache_purge-1.4.tar.gz download
  • Fix PHP upgrade configure error for older pre-menu Centmin Mod releases: ‘configure: error: utf8_mime2text() has new signature’

v1.2.2-eva2000.06 – 27/11/2011

  • Updated Nginx from v1.1.7 to v1.1.8
  • Updated Memcached server from v1.4.9 to v1.4.10
  • Updated libevent from v2.0.15 stable to v2.0.16 stable
  • Updated nginx.conf for Nginx v1.1.8 changes from limit_zone to limit_conn_zone syntax
  • Added new menu option to install multi-threaded compression tools, pigz, pbzip2, lbzip2, p7zip etc. Choose between better compression ratios (smaller file sizes) vs faster compression speed.
  • Added control panel checks for incompatible control panels ie. WHM/Cpanel, Plesk and DirectAdmin
  • Added Nginx upgrade check for older Centmin mod releases to ensure nginx.conf client_body_in_file_only option is disabled
  • Fixed libevent download

v1.2.2-eva2000.05 – 05/11/2011

  • Updated Nginx from v1.1.6 to v1.1.7
  • Updated Memcached server from v1.4.8 to v1.4.9
  • Updated Nginx virtual.conf settings
  • Updated nginx.conf turn off client_body_in_file_only
  • Updated php-fpm.conf, php-fpm-2pools.conf, php-fpm-min-2pools.conf and php-fpm-min.conf settings
  • Fixed nsdsetup.inc for missing zone: entry when adding domain zone to /etc/nsd/nsd.conf
  • Added inc/sendmail.inc to configure sendmail when detected/installed

v1.2.2-eva2000.04 – 18/10/2011

  • Updated Nginx from v1.1.5 to v1.1.6
  • Updated libevent from v2.0.14 stable to v2.0.15 stable
  • Updated Nginx vhost and template with SSI option you can enable via uncommenting
  • Updated checks for CentOS 5.7 for php configuration and mcrypt support
  • Fixed possible openssl update conflict with previous version of openssl

v1.2.2-eva2000.03 – 09/10/2011

  • Switched default MariaDB MySQL install back to RPM manual install method due to MariaDB YUM REPO issues. Complaints of MariaDB-server-5.2.9-102.el5 public key issues causing MariaDB server install failure.

v1.2.2-eva2000.02 – 08/10/2011

  • Centmin Mod project gets own domain name: centminmod.com (runs on 3x load balanced Centmin Mod Nginx based web servers :) )
  • Included Centmin Mod logo (I used the same Denmark font type :) )
  • Updated Nginx from v1.1.4 to v1.1.5
  • Updated Memcached server from v1.4.7 to v1.4.8
  • Updated ngx_cache_purge nginx module from v1.3 to v1.4. Change log http://labs.frickle.com/nginx_ngx_cache_purge/CHANGES
  • Updated drop.conf setting favicon.ico expires header
  • Added optional custom 404/50x html pages via #include /usr/local/nginx/conf/errorpage.conf; uncomment in vhost file & restart nginx to enable.

v1.2.2-eva2000.01 – 03/10/2011

  • Updated Nginx from v1.0.6 to v1.1.4 for default installs
  • Updated libevent from v2.0.13 stable to v2.0.14 stable
  • Updated libevent download url from http://www.monkey.org/~provos/libevent-${LIBEVENT_VERSION}-stable.tar.gz to https://github.com/downloads/libevent/libevent/libevent-${LIBEVENT_VERSION}-stable.tar.gz
  • Add to nginx.conf & vhost template commented out option for rate limiting connections per IP
  • Added Change SSHD Port number menu option to change from default SSHD Port 22
  • Added openvz_stack.inc for correct service init.d start up scripts stack size on OpenVZ systems
  • Streamlined php-fpm.conf and php-fpm-min.conf settings.
  • Split Nginx add vhost and MariaDB upgrade functions from centmin.sh to own includes files “inc/nginx_addvhost.inc” & “inc/mariadb_upgrade.inc”
  • Fixed nsdsetup.inc missing escape on $TTL for domain zone template

 

v1.2.1-eva2000.14 – 24/09/2011

  • centminfullmenu2.sh renamed to centmin.sh for public release
  • Tune centminfullmenu2.sh – reduce memcached server default memory allocation rom 16MB to 8MB per instance
  • Add to centminfullmenu2.sh a nginx & php-fpm logrotate functions
  • Updated OpenSSL to v1.0.0e
  • Updated MariaDB 5.2.9 if you manual RPM install (set MDB_INSTALL=y and MDB_YUMREPOINSTALL=n). If you use default YUM REPO install (set MDB_INSTALL=n and MDB_YUMREPOINSTALL=y), then you’re at mercy of frequency of REPO’s updates, but currently YUM REPO is still on MariaDB 5.2.7.

v1.2.1-eva2000.13 PRIVATE BETA – 14/09/2011

  • Tune centminfullmenu2.sh Nginx networking settings
  • Tuned centminfullmenu2.sh init.d for memcached, nginx, php-fpm to reduce stack size when OpenVZ systems detected
  • Added centminfullmenu2.sh MariaDB mysql my-mdb-min.cnf and my-mdb-4gb.conf for
  • Added centminfullmenu2.sh php-fpm-min.conf for
  • Added centminfullmenu2.sh apc-min.ini for
  • Added centminfullmenu2.sh xcache-min.ini for

v1.2.1-eva2000.12 PRIVATE BETA – 08/09/2011

  • Hide script cleanup/deletion routine when centminfullmenu2.sh is in Menu Mode (ENABLE_MENU=y)
  • Add to centminfullmenu2.sh NSD domain/ip/nameserver setup menu
  • Add to centminfullmenu2.sh sendmail YUM install routine a check for Postfix existence. If Postfix exists, sendmail YUM install aborts
  • Add to centminfullmenu2.sh Nginx and PHP upgrade menus, error check logging at configure, make and make install stages. Will abort if errors occur at each of the 3 stages.
  • Revised centminfullmenu2.sh Memcached server install to prompt for 1 or 2 memcached server instances to be installed. Previous releases had defaulted to 2x 16MB memcached server instances.
  • Revised centminfullmenu2.sh install routines with added check if custom conf, or file or install already exist or have already been run before. Prevents duplicate config settings from existing if folks accidentally re-run the main install routine again.

v1.2.1-eva2000.11 PRIVATE BETA – 06/09/2011

  • Extended script menu centminfullmenu2.sh with Nginx add vhost & ioping.sh support
  • Updated to Google Perf Tools v1.8.3

v1.2.1-eva2000.10 PRIVATE BETA – 04/09/2011

  • Added script menu support via experimental centminfullmenu2.sh script

v1.2.1-eva2000.09 – 01/09/2011

  • Updated Extras/nginx-vhost domain setup tool
  • Updated Nginx from v1.0.5 to v1.0.6 http://nginx.org/en/CHANGES-1.0
  • Updated Libevent from v2.0.12 to v2.0.13
  • Optimised default MariaDB 5.2 MySQL my.cnf for lower memory usage for low memory based VPS (note: you’ll need more memory for better performance)

v1.2.1-eva2000.08 – 26/08/2011

  • Updated to Google Perf Tools v1.8.2
  • Updated PHP compile options added –with-xpm-dir=${LIBDIR} and IMAP support –with-imap –with-imap-ssl –with-kerberos
  • Added yum install mlocate to CentOS 6.0 detection rountine as slocate doesn’t work

v1.2.1-eva2000.07 – 24/08/2011

v1.2.1-eva2000.06 – 22/08/2011

v1.2.1-eva2000.05 – 19/08/2011

  • Updated to PHP 5.3.7
  • Updated PHP compile options with libjpeg/libpng/freetype & PDO support
  • Added option for MariaDB 5.2.x CentOS YUM REPO installation via MDB_YUMREPOINSTALL=y option enabled by default, with MDB_INSTALL=n & MYSQL_INSTALL=n by default. So you will use yum update MariaDB-*to update MariaDB 5.2.x mysql server.
    [root@localhost ~]# yum list MariaDB-*
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirror.averse.net
     * extras: mirror.averse.net
     * updates: mirror.averse.net
    Excluding Packages in global exclude list
    Finished
    Installed Packages
    MariaDB-client.x86_64  5.2.7-101.el5  installed
    MariaDB-devel.x86_64   5.2.7-101.el5  installed
    MariaDB-server.x86_64  5.2.7-101.el5  installed
    MariaDB-shared.x86_64  5.2.7-101.el5  installed
    MariaDB-test.x86_64  5.2.7-101.el5  installed
    Available Packages
    MariaDB-debuginfo.x86_64  5.2.7-101.el5  ourdelta-mariadb52

v1.2.1-eva2000.04 – 10/08/2011

  • Update for CentOS 6.0 if detected will install EPEL 6 repo for missing libmycrypt related rpms
  • Updated Python from v2.7.1 to v2.7.2 but still leaving default CentOS 5/6 python versions intact
  • Fix MariaDB 5.2.x server unable to start

v1.2.1-eva2000.03 – 2/08/2011

  • Updated Nginx compile config and nginx-update.sh script
  • Added –with-mcrypt if CentOS 5.6/6.0 is detected. Error with CentOS 5.5 hasn’t been resolved so mcrypt not compiled with CentOS 5.5 version.
  • Temporarily removed Nginx v1.0.5 compile option –with-ld-opt=’-ltcmalloc_minimal’ as seem to get an error if compiled via centmin.sh script but manually compiling is fine. Haven’t figured it out yet but only started occuring with Nginx v1.0.5.If compiled via script get error
    checking for --with-ld-opt="-ltcmalloc_minimal" ... not found
    ./configure: error: the invalid value in --with-ld-opt="-ltcmalloc_minimal"

    If compiled manually it detects fine

    checking for --with-ld-opt="-ltcmalloc_minimal" ... found

v1.2.1-eva2000.02 – 31/07/2011

v1.2.1-eva2000.01 – 18/06/2011

  • Synced changes with official Centmin v1.2.1 i.e. add –tries=3 to wget downloads
  • Added Centmin v1.2.1 official release nginx-vhost.sh setup script
  • Fixed broken Seige benchmark and SPROXY download links

 

Change log:

(compared to official Centmin v1.2.0)

v1.2.0-eva2000.05 – 16/06/2011

  • Updated MariaDB MySQL from 5.2.6-101 to 5.2.7-101. MariaDB 5.2.7 Release Notes.
  • Fixed MariaDB download links by adding ${MDB_VERONLY} and ${MDB_BUILD} variables and changing MDB_VERSION variable to “${MDB_VERONLY}-${MDB_BUILD}”
  • Updated Libevent from v2.0.10 to v2.0.12
  • Added config/htpasswdgen/htpasswd.py python based htpasswd encoding generator to create passwords for systems without Apache. Original author of htpasswd.py, Eli Carter.  To encode a password for htpasswd protection run command: python /usr/local/nginx/conf/htpasswd.py -b /usr/local/nginx/conf/htpasswd yourusername yourpassword. Or if you have htpasswd from apache, set password up with command: htpasswd -s /usr/local/nginx/conf/htpasswd yourusername

v1.2.0-eva2000.04 – 13/06/2011

  • Additional php-fpm optimisations
  • Fixed command shortcuts for mysqlstop, mysqlstart, mysqlrestart to take into account MySQL community versions chosen during install instead of MariaDB MySQL
  • Updated MySQL Community default server & MariaDB MySQL my.cnf settings

v1.2.0-eva2000.03 – 11/06/2011

  • Added yum.conf check routine after MariaDB and PHP installs to add mysql* and php* exclusion for default mysql and php during yum updates
  • Updated apc.ini
  • Fixed APC autoconf errors
  • Add centmin-experimental.sh version which adds additional routines to be able to: centmin install, php upgrade, xcache upgrade, apc upgrade, nginx upgrade, standalone xcache or apc installations. Not fully tested yet. So do not use on live production servers.

v1.2.0-eva2000.02 – 10/06/2011

  • Improved various Nginx and php-fpm config settings i.e. for correctly working $_SERVER['PATH_INFO'], $_PATH['PATH_TRANSLATED'] and $_SERVER['PHP_SELF'] php environment variables

v1.2.0-eva2000.01 – 09/06/2011

  • Set MariaDB 5.2.x as default MySQL server installation
  • Updated mysqltuner.pl download link
  • Added Memcached server, libevent
  • Added Memcache PHP extension – please leave at v3.0.5, v3.0.6 doesn’t seem to work
  • Added Python 2.7.1 installed /opt/python2.7.1 leaving CentOS Python 2.4.3-43 intact
  • Updated Nginx FancyIndex module download link to Gitorious archive tarball
  • Changed APC Cache from YUM based install to compiled from source
  • Added APC cache myapc.php admin page at /usr/local/nginx/html/myapc.phpAdded config/apc/apc.ini APC cache settings file
  • Added xcache admin directory to /usr/local/nginx/html/myxcacheadmin/ you need to read config/xcache/xcache_admin_setup_instructions.txt for xcache admin user/pass changes procedure
  • Added xcache admin password setup routine
  • Added memcache.php admin login setup routine
  • Fixed PHP configure error: Cannot find OpenSSL’s libraries
  • Fixed Xcache compile error: Cannot find autoconf
  • Fixed Extras/nginx-update.sh nginx version read variable ${ngver}

 

Note: that Centmin script is meant for freshly installed virgin CentOS 5.x 32bit or 64bit based servers and has only been tested on such. If you try this script on existing server, it’s unknown what the effects are.

Please test the script on a test server before using on a live production server. There’s no support for the modified Centmin script. Script is provided as is.

Download:

 

Related posts:

  1. Nginx install script, PHP 5.3.6 (php-fpm), MariaDB 5.2.6, Xcache v1.3.1, Memcached server, CSF firewall, Siege Benchmark
  2. Rackspace.com Cloud Server – Nginx v1.0.2, PHP-FPM 5.3.6, Xcache v1.3.1, MariaDB 5.2.6 Install
  3. Centmin Nginx, PHP-FPM, MariaDB Menu Based Installer released
  4. Centminmod.com Nginx Auto Installer FAQ updated
  5. Centmin Mod Nginx Auto Installer updated
  6. BuyVM OpenVZ VPS Review: Centmin Nginx installed
  7. MariaDB 5.2.7 MySQL Server Released
  8. MariaDB 5.2.8 MySQL server released with various Aria storage engine fixes
  9. MariaDB 5.1.60 and MariaDB 5.2.10 MySQL Server released
  10. Nginx web server overtakes Microsoft IIS to rank #2 behind Apache in Netcraft Web Server survey

Previous:
Next:


Incoming search terms:

  • mariadb centos 6
  • centos 6 mariadb
  • php 5 3 8 fpm
  • centmin vbtechsupport
  • php 5 3 8 php-fpm
  • php-fpm 5 3 8
  • Nginx install script
  • nginx php 5 3 8
  • centos 6 php-fpm
  • php 5 3 8 nginx
  • mariadb my cnf low memory
  • centmin eva2000
  • mariadb centos6
  • php 5 3 10 fpm
  • centos 6 nginx
  • install MariaDB centos 6
  • mariadb memcached
  • multi-thread compression: pigz pbzip2 lbzip2 p7zip etc
  • php5 3 10


MaxCDN Site Acceleration

Get Cost Effective Content Delivery
Unbeatable speed, stats, & price
http://www.maxcdn.com



319 Comments

  1. Hello

    Are the modules HttpLimitReq and HttpLimitZone already install on the server after installing the script?

    If yes can you please adjust my config with the new lines that those two modules require?

    # Nginx Master configuration
    user nobody;
    error_log logs/error.log;
    #Number of worker you need
    worker_processes 6;
    worker_rlimit_nofile 50000;
    # How many connections a worker can handle maximum.
    events {
    worker_connections 2048;
    }
    http {
    include mime.types;
    default_type application/octet-stream;
    sendfile on;
    server_names_hash_max_size 10000;
    server_names_hash_bucket_size 1024;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 10;
    gzip on;
    gzip_min_length 1100;
    gzip_buffers 4 32k;
    gzip_types text/plain application/x-javascript text/xml text/css;
    ignore_invalid_headers on;
    client_header_timeout 3m;
    client_body_timeout 3m;
    send_timeout 3m;
    client_header_buffer_size 16k;
    large_client_header_buffers 16 16k;
    include “/usr/local/nginx/conf/vhost.conf”;
    include “/etc/cpnginx/cpanelproxy.conf”;
    }

    Thank you

    Also which cpu is better for a forum or just for hosting the database as second server?

    The Intel Core i7 2600K 3.40Ghz or the 2x Intel Xeon 5506 2.13GHz ?

    The passmark shows that the Core i7 is faster:

    http://www.cpubenchmark.net/high_end_cpus.html

    Thank you

  2. pamamolf,

    that nginx.conf doesn’t look like the stock one that centmin modded script comes with ?

    You’ll need to add them in yourself right now instructions at

    http://wiki.nginx.org/HttpLimitReqModule

    If you need help, best place to ask is on Nginx forums http://forum.nginx.org/ :)

    Yes i7 2600K is faster.

  3. Do you mean to add the config lines myself as the modules are already build/install or to install also the modules myself?

    Thank you

  4. Yes all modules listed at http://wiki.nginx.org/Modules under Standard HTTP modules are already included in core of Nginx.

  5. Ok thanks eva2000

    I hope that you will also add the phpmyadmin for easy to handle the databases :)

    I have already a manual working way to do it and i can send you the tutorial if you want just to be easier to autoinstall using the script.

    Thank you

  6. Thanks pamamolf, i plan to add phpmyadmin but the way I want to install it is for it to be only accessible via SSL i.e. https://urltophpmyadmin but setting up SSL needs manual work which I currently don’t know if it can be done purely via bash shell coding. So for now it’s not included.

    new version released.

    v1.2.2-eva2000.01 – 03/10/2011

    • Updated Nginx from v1.0.6 to v1.1.4 for default installs
    • Updated libevent from v2.0.13 stable to v2.0.14 stable
    • Updated libevent download url from http://www.monkey.org/~provos/libevent-${LIBEVENT_VERSION}-stable.tar.gz to https://github.com/downloads/libevent/libevent/libevent-${LIBEVENT_VERSION}-stable.tar.gz
    • Add to nginx.conf & vhost template commented out option for rate limiting connections per IP
    • Added Change SSHD Port number menu option to change from default SSHD Port 22
    • Added openvz_stack.inc for correct service init.d start up scripts stack size on OpenVZ systems
    • Streamlined php-fpm.conf and php-fpm-min.conf settings.
    • Split Nginx add vhost and MariaDB upgrade functions from centmin.sh to own includes files “inc/nginx_addvhost.inc” & “inc/mariadb_upgrade.inc”
    • Fixed nsdsetup.inc missing escape on $TTL for domain zone template
  7. Why you need ssl for phpmyadmin?
    Is there any security issues about it?
    Or you can add it as it is and then add an option for uninstall so noobs like me can do what they want in a very easy way with the databases and then remove the phpmyadmin.

    Also i want to ask why you don’t add the final stable version of nginx nginx-1.0.8 (2011-10-01) and you add the development version nginx-1.1.4 (2011-09-20) ?

    “Add to nginx.conf & vhost template commented out option for rate limiting connections per IP”

    So do i have to uncomment those lines on 2 config files (vhost template?)?

    The script and what you do for us is AMAZING !

    Thank you

  8. Also does the HttpLimitZoneModule config lines that you add on the script helping more for Ddos protection than the HttpLimitReqModule and do you think that both may help more?

    Thank you

  9. Sorry for the triple message :(

    Why not use also the:

    - Updates any pre-installed software (via Yum)
    - Secures /tmp (and /var/tmp) directories
    - Sets server to use your local timezone

    Thank you

  10. pamamolf

    If folks aren’t familiar with phpmyadmin they could incorrectly set it up insecurely, SSL just another layer of protection.

    As to Nginx version, dev version is pretty stable, modded centmin is aimed at being up to date. You can change the default via editing centmin.sh or use nginx upgrade option and specify 1.0.8 to downgrade too if you are already on 1.1.4

    yes to enable rate limiting uncomment 2 lines in nginx.conf

    # limit_conn_log_level error;
    # limit_zone limit_per_ip $binary_remote_addr 16m;

    to

    limit_conn_log_level error;
    limit_zone limit_per_ip $binary_remote_addr 16m;

    and uncomment 1 line in each of your vhosts

    server {
                listen   80 backlog=256;
                server_name www.demo.com;
     
    # limit_conn limit_per_ip 16;

    change to

    server {
                listen   80 backlog=256;
                server_name www.demo.com;
     
    limit_conn limit_per_ip 16;

    or

    add line if not already there

    limit_conn limit_per_ip 16;

    As to http://wiki.nginx.org/HttpLimitZoneModule not sure i understand the question, what i listed above is the whole setup, should help control DDOS attacks of certain types of course you’d need to adjust the value

    limit_conn limit_per_ip 16;

    allows 16 connections by same ip address

    As to

    - Updates any pre-installed software (via Yum)
    - Secures /tmp (and /var/tmp) directories
    - Sets server to use your local timezone

    they already are included in centmin.sh you just need to decide if you want to run then y or n

  11. Ok thanks :)

    I was asking about the HttpLimitZoneModule and the HttpLimitReqModule that the first that you add on the script is limiting connections and the other one is limiting requests.

    And i was asking if it is better to limit connections or requests or both.

  12. Oh i see… limiting requests would affect legit traffic as well if you suddenly have a busier traffic day. I guess implementing both would be best if you really hit by DDOS attack. I don’t have personal experience with either HttpLimitZoneModule or HttpLimitReqModule in live production environment setting, so can’t really give an informed opinion. Best place to ask would be nginx forums http://forum.nginx.org/ :)

  13. Ok thanks :)

    I hope you to find a way to install phpmyadmin the way that you want as i was not able to do them manually:

    1)Create a new user
    2)Set a password for this user
    3)Create a new mysql group
    4)Add the new user to this group
    5)Create a database named database1 (utf8)
    6)Connect and set privileges for this user on the new database

    I need only 6 commands to use always that script but no one was reply yet as i was not able to follow the links that you send me :(

    Thank you

  14. Using the latest v1.2.2-eva2000.01

    Nginx upgrade option fails

    Compiling nginx…
    –2011-10-07 14:48:53– http://nginx.org/download/nginx-.tar.gz
    Resolving nginx.org… 206.251.255.63
    Connecting to nginx.org|206.251.255.63|:80… connected.
    HTTP request sent, awaiting response… 404 Not Found
    2011-10-07 14:48:53 ERROR 404: Not Found.

    tar: nginx-.tar.gz: Cannot open: No such file or directory
    tar: Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error exit delayed from previous errors
    ./centmin.sh: line 1789: cd: nginx-: No such file or directory
    make: *** No rule to make target `clean’. Stop.
    Would you like to compile nginx with IPv6 support? [y/n]

  15. You didn’t enter the correct nginx version number when prompted when you ran nginx upgrade option.

    ie. enter 1.0.8 or 1.1.5 at prompt

    --------------------------------------------------------
    Centmin 1.2.2-eva2000.02 - http://centminmod.com
    Menu/Mods Author: eva2000 (vbtechsupport.com)
    Centmin Original Author: BTCentral (btcentral.org.uk)
    --------------------------------------------------------
                       Centmin Menu                   
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade
    5).  PHP Upgrade
    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 Upgrade
    12). Install ioping.sh vbtechsupport.com/1239/
    13). SELinux disable
    14). Setup Logrotate for Nginx
    15). Setup Logrotate for PHP-FPM
    16). Change SSHD Port Number
    17). Exit
    --------------------------------------------------------
    Enter option [ 1 - 17 ] 4
    --------------------------------------------------------
    **********************************************************************
    * Nginx Update script - Included in Centmin Extras
    * Version: 1.2.2-eva2000.02 - Date: 08/10/2011 - Copyright 2011 BTCentral
    **********************************************************************
     
    This software comes with no warranty of any kind. You are free to use
    it for both personal and commercial use as licensed under the GPL.
     
    Nginx Upgrade - Would you like to continue? [y/n] y
    Install which version of Nginx? (version i.e. 1.0.6): 1.1.5

    Added solution to FAQ at http://centminmod.com/faq.html

  16. I downloaded the latest release which asked me this queston on upgrade, it went fine till it failed on a module.

    configuring additional modules
    adding module in ../ngx-fancyindex-ngx-fancyindex
    + ngx_http_fancyindex_module was configured
    adding module in ../ngx_cache_purge-1.4
    ./configure: error: no ../ngx_cache_purge-1.4/config was found
    *************************************************

  17. chaoticone, which nginx version did you enter when prompted ? 1.0.8 or 1.1.5 ?

    what does output from this command show ?

    ls -alh /svr-setup/ngx_cache_purge-1.4

    Try re-running nginx upgrade option again and see.

  18. It’s been awhile since I used your scripts. I used the new script to upgrade nginx and php-fpm. I also reinstalled memcached but I get the error “failed to set rlimit for open files. Try starting as root or requesting smaller maxconns value.” four times when I try to start memcached. What’s the best way to deal with this. My VPS is running Centos 5.7(Final). My limits.conf has…

    * soft nofile 65536
    * hard nofile 65536
    nginx soft nofile 65536
    nginx hard nofile 65536

    I edited centmin.sh and changed the memcached version to 1.4.7 . The memcached reinstall went fine. There’s something about 1.4.8 that my VPS doesn’t like.

  19. Hey PeZzy, that’s strange error haven’t come across this before but will look into it. What was the previous version of centmin mod script you were running prior to upgrading using v1.2.2-eva2000.03 right ?

  20. centmin-v1.2.1-eva2000.03 was the original script used on my VPS. I updated using your latest script, centmin-v1.2.2-eva2000.03 .

    It didn’t have the imap module for php, so I had to install a couple of libc packages with yum before proceeding with the php upgrade.

    I didn’t install perl-ExtUtils-MakeMaker* – I don’t know what repo has it and what part of the script uses it.

    Also, I don’t normally use the rpmforge repo, but they had perl-Time-HiRes, and if I attempt an install I get…

    Package perl-Time-HiRes is obsoleted by perl, trying to install 4:perl-5.8.8-32.el5_6.3.i386 instead
    Package 4:perl-5.8.8-32.el5_6.3.i386 already installed and latest version

    During the memcached reinstall, I was getting a certificate error trying to download libevent from github. I had to download it manually with `–no-check-certificate’. Apparently OpenSSL has not been updated in a long time, unless you install it from a non-Centos source (openssl-0.9.8e-20.el5.i686).

Trackbacks/Pingbacks

    Leave a Comment