Welcome to Centmin Mod Community
Become a Member

Centmin Mod Nginx 1.21.5+ PCRE2 Support

Discussion in 'Centmin Mod News' started by eva2000, Jan 1, 2022.

Tags:
Thread Status:
Not open for further replies.
  1. eva2000

    eva2000 Administrator Staff Member

    53,530
    12,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,677
    Local Time:
    7:55 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Nginx folks have released Nginx v1.21.5 with PCRE2 v10.x library support to replace the older PCRE v8.45 library support. For Centmin Mod 123.09beta01 and higher to support PCRE2, some major changes in Nginx and Nginx modules and dependencies' install routines are needed for the long term. These changes will need beta testing. Update: As at January 27, 2022, the new Nginx PCRE/PCRE2 routine has been merged into Centmin Mod 123.09beta01.
    • A dedicated thread at https://community.centminmod.com/threads/centmin-mod-nginx-1-21-5-pcre2-beta-testing.22326/ has been created to outline how you can help beta test the changes before the official release and commit to Centmin Mod 123.09beta01.
    • All relevant threads on the forum will be tagged with nginx pcre2 tag, so you can follow any relevant threads posted on the forum.
    • To make it easier to share troubleshooting/diagnostic Nginx recompile/upgrade logs, the beta testing patch also adds support for automatically sending logs to a Dropbox cloud storage account of your choosing. This feature will also be merged with final updates to be available as well :) Full details of how to setup Dropbox and Rclone for this is here.
    Example of auto compressed and sent Nginx upgrade logs to Dropbox cloud storage account :D
    Code (Text):
    dropbox_generate 010122-042039
    
    Send Nginx Upgrade Logs To Dropbox Account
    
    /usr/sbin/rclone copy nginx_pcre_checks_010122-042039.log.gz dropbox1:
    
    /usr/sbin/rclone copy centminmod_123.09beta01.b782_010122-042039_nginx_upgrade.log.gz dropbox1:
    
    /usr/sbin/rclone copy pcre2log-010122-042039.log.gz dropbox1:
    

    cm-dropbox-rclone-01.png

     
    Last edited: Jan 27, 2022
  2. eva2000

    eva2000 Administrator Staff Member

    53,530
    12,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,677
    Local Time:
    7:55 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Example of viewing and sharing your logs via Dropbox. Dropbox allows you to natively view compressed .gz logs just by clicking on the compressed .gz log too :cool:

    dropbox-pcre-logs-opt.gif

    dropbox-pcre-logs-share-opt.gif
     
  3. eva2000

    eva2000 Administrator Staff Member

    53,530
    12,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,677
    Local Time:
    7:55 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  4. eva2000

    eva2000 Administrator Staff Member

    53,530
    12,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,677
    Local Time:
    7:55 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    As at January 27, 2022 AEST time, this beta testing is closed now. The new code outlined above has now been merged into the main Centmin Mod 123.09beta01 branch via commit at https://community.centminmod.com/th...upport-related-updates-in-123-09beta01.22397/. This includes updated support to optionally automatically sent Nginx upgrade logs to a specified Dropbox account as outlined here https://community.centminmod.com/threads/sending-nginx-upgrade-logs-to-dropbox-via-rclone.22402/

    By default step 1 above config is in place so the same older PCRE v8.45 is installed with Nginx but changed installation location from PREFIX = /usr/local to PREFIX = /usr/local/nginx-dep for new installs. Existing users can update via SSH command = cmupdate.

    Existing Beta Test Users Update



    Existing Centmin Mod 123.09beta01 users who did take part in beta testing outlined here (above). Need one extra step to remove /usr/local/src/centminmod/inc/sync.inc before cmupdate can run. So for those users, run these 3 commands below:
    Code (Text):
    cd /usr/local/src/centminmod
    rm -f /usr/local/src/centminmod/inc/sync.inc
    cmupdate
    


    Switch To Nginx PCRE2



    With latest Nginx PCRE2 optional support update, to switch to PCRE2 support for Nginx 1.21.5+, you need to update your persistent config file at /etc/centminmod/custom_config.inc (if it doesn't exist create it) and add the variable to enable Nginx PCRE2 support.
    Code (Text):
    NGINX_PCRE_TWO='y'

    Then run centmin.sh menu option 4 and update/recompile to Nginx version 1.21.5 or higher which support PCRE2.

    Example of Centmin Mod Nginx build with Nginx PCRE2 optional support enabled.
    Code (Text):
    ldd $(which nginx)
            linux-vdso.so.1 =>  (0x00007ffedb512000)
            libpcre2-8.so.0 => /usr/local/nginx-dep/lib/libpcre2-8.so.0 (0x00007f885d0e8000)
            libjemalloc.so.1 => /lib64/libjemalloc.so.1 (0x00007f885cd2d000)
            libdl.so.2 => /lib64/libdl.so.2 (0x00007f885cb29000)
            libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f885c90d000)
            libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f885c6d6000)
            libGeoIP.so.1 => /lib64/libGeoIP.so.1 (0x00007f885c4a4000)
            libatomic_ops.so.1 => /usr/local/nginx-dep/lib/libatomic_ops.so.1 (0x00007f885c2a2000)
            libc.so.6 => /lib64/libc.so.6 (0x00007f885bed4000)
            /lib64/ld-linux-x86-64.so.2 (0x00007f885cf61000)
            libfreebl3.so => /lib64/libfreebl3.so (0x00007f885bcd1000)
    

    Code (Text):
    PKG_CONFIG_PATH='/usr/local/nginx-dep/lib/pkgconfig/' pkg-config --modversion libpcre2-8
    10.39
    

    libatomic_ops also got updated in Centmin Mod Nginx builds
    l
    Code (Text):
    PKG_CONFIG_PATH='/usr/local/nginx-dep/lib/pkgconfig/' pkg-config --modversion atomic_ops
    7.6.12
    

    Code (Text):
    yum -q info centmin-libatomic_ops
    Installed Packages
    Name        : centmin-libatomic_ops
    Arch        : x86_64
    Version     : 7.6.12
    Release     : 1.el7
    Size        : 713 k
    Repo        : installed
    From repo   : /centmin-libatomic_ops-7.6.12-1.el7.x86_64
    Summary     : libatomic_ops-7.6.12 for centminmod.com LEMP stack libatomic_ops-7.6.12
    URL         : https://centminmod.com
    License     : unknown
    Description : libatomic_ops-7.6.12 for centminmod.com LEMP stacks
    
     
    Last edited: Jan 27, 2022
Thread Status:
Not open for further replies.