Join the community today
Register Now

custom config after installation

Discussion in 'Install & Upgrades or Pre-Install Questions' started by th0nkang, Jan 26, 2023.

  1. th0nkang

    th0nkang New Member

    12
    1
    3
    Jun 29, 2022
    Ratings:
    +5
    Local Time:
    5:40 AM
    Usually I add custom config before running the installer.sh script. Sometimes I forgot to add the custom config and just reinstall the server OS and start over.
    My little custom config "script":
    Code (Text):
    mkdir -p /etc/centminmod
    touch /etc/centminmod/custom_config.inc
    echo "NGINX_SSLCACHE_ALLOWOVERRIDE='y'" >> /etc/centminmod/custom_config.inc
    echo "NGINX_STAPLE_CACHE_OVERRIDE='y'" >> /etc/centminmod/custom_config.inc
    echo "NGINX_STAPLE_CACHE_TTL='86400'" >> /etc/centminmod/custom_config.inc
    echo "SET_DEFAULT_MYSQLCHARSET='utf8mb4'" >> /etc/centminmod/custom_config.inc
    echo "AUTOHARDTUNE_NGINXBACKLOG='y'" >> /etc/centminmod/custom_config.inc
    echo "ZSTD_LOGROTATE_NGINX='y'" >> /etc/centminmod/custom_config.inc
    echo "ZSTD_LOGROTATE_PHPFPM='y'" >> /etc/centminmod/custom_config.inc
    echo "LETSENCRYPT_DETECT='y'" >> /etc/centminmod/custom_config.inc
    echo "DUALCERTS='y'" >> /etc/centminmod/custom_config.inc
    echo "SELFSIGNEDSSL_ECDSA='y'" >> /etc/centminmod/custom_config.inc
    echo "NGINX_LIBBROTLI='y'" >> /etc/centminmod/custom_config.inc
    echo "NGXDYNAMIC_BROTLI='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_PGO_ALWAYS='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_PGO='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_BROTLI='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_LZFOUR='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_LZF='y'" >> /etc/centminmod/custom_config.inc
    echo "PHP_ZSTD='y'" >> /etc/centminmod/custom_config.inc
    echo "PHPFINFO='y'" >> /etc/centminmod/custom_config.inc
    Is there something I need to do when I want to apply the custom config after the installation based on my custom config?

     
  2. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    8:40 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Looks good to me nothing else you need to do :)
     
  3. th0nkang

    th0nkang New Member

    12
    1
    3
    Jun 29, 2022
    Ratings:
    +5
    Local Time:
    5:40 AM
    ah, I think you missed my question ;).
    but for answering my own question. I just need to recompile nginx and php (and temporarily add AUTODETECPHP_OVERRIDE='y' to custom config when recompile php), and add default character utf8mb4 to my.cnf when i forgot to add custom config prior the initial install.
    thanks for replying anyway.
     
    Last edited: Jan 29, 2023
  4. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    8:40 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Oh re-read that

    adding additional variables to persistent config is as you'd expect, just double check you aren't adding a variable twice as the last one's value will override the previous same variable name