Join the community today
Become a Member

Beta Branch Openresty echo-nginx-module, set-misc-nginx-module & ngx_devel_kit added to .08 beta

Discussion in 'Beta release code' started by eva2000, May 8, 2015.

Tags:
  1. eva2000

    eva2000 Administrator Staff Member

    53,247
    12,117
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,655
    Local Time:
    11:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Centmin Mod .08 beta02 has three new Openresty based additions to it's custom Nginx module compilation list, echo-nginx-module, set-misc-nginx-module and ngx_devel_kit (a requirement for set-misc-nginx-module). Centmin Mod Nginx is source compiled and as such makes it easy to add and extend Nginx with additional Nginx modules. An example of how to extend Centmin Mod Nginx with webdav Nginx module support prior to it's official inclusion in more recent Centmin Mod .08 beta builds.

    Centmin Mod .08 beta02 and higher's centmin.sh has 5 variables that control Openresty Nginx modules inclusion into Centmin Mod Nginx. The first NGINX_OPENRESTY variable controls whether the Openresty Nginx modules are installed. If set to 'n', then Openresty modules (currently 5 modules) will be disabled and not compiled into Centmin Mod Nginx and not show up when you run command nginx -V.


    The 5 Openresty Nginx modules compiled in when NGINX_OPENRESTY='y' include:
    You're responsible for learning how to make use of these Nginx modules as I only provide them as is and provide no support for them other than their inclusion in Centmin Mod Nginx web server. Read their respective Github repository link's readme and instructions for usage.

    from centmin.sh
    Code:
    NGINX_OPENRESTY='y'            # Agentzh's openresty Nginx modules
    ORESTY_MEMCVER='0.15'        # openresty memc module https://github.com/openresty/memc-nginx-module
    ORESTY_SRCCACHEVER='0.28'    # openresty subrequest cache module https://github.com/openresty/srcache-nginx-module
    ORESTY_DEVELKITVER='0.2.19'  # openresty ngx_devel_kit module https://github.com/simpl/ngx_devel_kit
    ORESTY_SETMISCVER='0.28'     # openresty set-misc-nginx module https://github.com/openresty/set-misc-nginx-module
    ORESTY_ECHOVER='0.57'          # openresty set-misc-nginx module https://github.com/openresty/echo-nginx-module
    SSH command, nginx -V shows your Nginx version you have installed along with gcc and OpenSSL version that is compiled with Nginx and all compiled and supported Nginx modules

    Github Code Commits



    Actual Github commits for adding these 3 new Centmin Mod Nginx modules are located below - you can use these changes and webdav example as a blue print for understanding how to extend and add your own Centmin Mod Nginx modules.

    Github commits for 3 new Nginx modules

    General Info on Adding New Nginx Modules



    There's 5 basic steps involve in adding a new Nginx module into Centmin Mod Nginx server for Centmin Mod .08 beta02 and higher. They involve editing 5 Centmin Mod files.
    1. centmin.sh - add VARIABLE name to define the nginx module's version number if there is one
    2. inc/downloadlinks.inc - add 2 VARIABLES to define the module download link and filename
    3. inc/downloads.inc - add download function to download the module using download link defined in inc/downloadlinks.inc and test the download validity i.e. untar it using filename defined in inc/downloadlinks.inc
    4. inc/nginx_configure.inc - add check variables to grab latest nginx module extracted directory and put it into a directory variable to be called from Nginx ./configure options only if NGINX_OPENRESTY='y'
    5. inc/nginx_upgrade.inc - add to existing file check, the new module download file name (defined in inc/downloadlinks.inc). This ensures, when you run centmin.sh menu option 4 to upgrade Nginx, if the new nginx module download file doesn't exist in /svr-setup, it will download it and extract it before the Nginx compilation begins
     
    Last edited: May 8, 2015
  2. eva2000

    eva2000 Administrator Staff Member

    53,247
    12,117
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,655
    Local Time:
    11:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    For existing Centmin Mod .08 beta 02 users or .07 stable users who want to try these new changes, you'll need to update to latest Centmin Mod .08 beta 02 code to get these code changes AND then recompile Nginx via centmin.sh menu option 4 and specify you nginx version when prompted i.e. 1.9.0. This will then recompile Nginx with the 3 new modules

    Code:
    --------------------------------------------------------
    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 Upgrade Sub-Menu
    12). Zend OpCache Install/Re-install
    13). Install ioping.sh vbtechsupport.com/1239/
    14). SELinux disable
    15). Install/Re-install ImageMagick 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). Update - Nginx + PHP-FPM + Siege
    22). Add Wordpress Nginx vhost + WP Super Cache
    23). Exit
    --------------------------------------------------------
    Enter option [ 1 - 23 ] 
    Upgrading Centmin Mod involves 2 parts.
    1. Upgrading the actual Centmin Mod code which you downloaded via zip file or via github. This is heart of Centmin Mod where the code is the engine that runs centmin.sh shell based menu and all the automation you're accustomed to.
    2. Upgrade software that Centmin Mod installed or manages. For this part following outline at Upgrade - How to upgrade Centmin Mod is best.
    So essentially, you can upgrade from .07 to .08 in place, but not everything is upgraded as some things like server initial environment setup isn't changed i.e. how swap, tmp setup and allocation are created etc. The main parts from part 2 above are what in place upgrades do i.e. Nginx and PHP-FPM compilation and config/settings parameters and MariaDB version from 5.5 to 10.0.x. If you want the full environment changed including tmp and swap setup to .08's configuration, then you would need a fresh OS install and fresh .08 initial install. You can think of it like upgrading Windows 7 to Windows 8. An in place upgrade will upgrade code but won't change your computer environment from when you installed Windows 7 i.e. disk configuration and partition sizes won't change from when you initially installed Windows 7. Only way to change that would be fresh Windows 8 install.

    There's 3 ways you can upgrade your .07 stable or .08 beta02 code you have on your server. They are outlined in respective upgrade sections of the first posts linked below:
    1. For .07 stable 1st post see section on upgrades Install - Centmin Mod 1.2.3-eva2000.07 stable install
    2. For .08 beta 02 1st post see section on upgrade to latest code CentOS 7.x - How to help test .08 CentOS 7 Betas with Github code ?
    3. For either .07 stable or .08 beta02 via github command line Upgrade - Working with git command line for updating Centmin Mod local copies
    Github commit log for
     
    Last edited: May 8, 2015
  3. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    11:20 PM
    Thanks.

    I'm running v1.2.3 i think, how would I go and upgrade to the latest beta in order to get access to set misc?

    Installing centmin it was pretty easy, is it this easy upgrading too?
     
  4. eva2000

    eva2000 Administrator Staff Member

    53,247
    12,117
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,655
    Local Time:
    11:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    2nd post above outlines how to upgrade existing Centmin Mod .07 stable or .08 betas to latest code.

     
  5. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    11:20 PM
    "Upgrading the actual Centmin Mod code which you downloaded via zip file or via github. This is heart of Centmin Mod where the code is the engine that runs centmin.sh shell based menu and all the automation you're accustomed to."

    Yes, should I extract it to here:
    /usr/local/src/

    Just like /usr/local/src/centmin-v1.2.3mod/

    then execute centmin.sh and upgrade nginx?
     
  6. eva2000

    eva2000 Administrator Staff Member

    53,247
    12,117
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,655
    Local Time:
    11:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yes if you're using existing .07 stable which has path /usr/local/src/centmin-v1.2.3mod, .08 beta has different path /usr/local/src/centminmod-123.08centos7beta02 if you are using existing .08 beta - see how differences handled for git update method Upgrade - Working with git command line for updating Centmin Mod local copies | Centmin Mod Community to get an idea where the extracted zip and directory name ends up as.
     
  7. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    11:20 PM
    Yes sir.

    Currently I am using: centmin-v1.2.3mod

    I have uploaded: centminmod-123.08centos7beta02

    Now, my next step would be run the centmin.sh then select option #4 to upgrade nginx. Will this also include the set misc, or would I have to add any settings for this? :)

    Sorry for tons of questions.
     
  8. eva2000

    eva2000 Administrator Staff Member

    53,247
    12,117
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,655
    Local Time:
    11:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yes once updated copy is uploaded to your server and you have chmod +x centmin.sh again. Run centmin.sh menu option 4 to recompile Nginx and set Nginx version when asked to whatever you want existing version number i.e. 1.7.12 or updated 1.9.0 (recommended)
     
  9. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    11:20 PM
    Done! I am now on 1.9.0!! That was easy.

    I hope in future updates you'll add more modules that we can enable manually by "y" or "n" which would be easy for everyone in case they want a module. Or if they don't want it, they don't need to enable it. *hint* test-cookie.

    Thanks!!
     
  10. eva2000

    eva2000 Administrator Staff Member

    53,247
    12,117
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,655
    Local Time:
    11:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Well as I mentioned before, I can only add modules I am familiar with, have tested or are relatively easy to install to default Nginx server installed by Centmin Mod. Other Nginx modules which are more involved will need users who use them/require them, to outline their install and usage for me to understand them (basically show me how you install and use the module manually).