Sed -i "s/ request_terminate_timeout =.*/request_terminate_timeout = 60/" /etc/php/8.2/fpm/pool.d/www.conf Sed -i "s/ date.timezone.*/date.timezone = UTC/" /etc/php/8.2/fpm/php.ini */display_errors = Off/" /etc/php/8.2/fpm/php.ini */error_reporting = E_ALL \& ~E_NOTICE \& ~E_STRICT \& ~E_DEPRECATED/" /etc/php/8.2/fpm/php.ini Please note: We are suppressing PHP error output here by setting these options to production values Openssl dhparam -out /etc/nginx/dhparams.pem 2048 Generate dhparam file for stronger Nginx SSL security Sed -i "s/ date.timezone.*/date.timezone = UTC/" /etc/php/8.2/cli/php.ini Configure sessions directory permissionsĬhmod +t /var/lib/php/sessions Install Nginx and PHP-FPM */display_errors = On/" /etc/php/8.2/cli/php.ini */error_reporting = E_ALL/" /etc/php/8.2/cli/php.ini Systemctl restart memcached Update PHP CLI configuration Mv composer.phar /usr/local/bin/composer Install and configure Memcached Please Note: We are no longer including php8.2-xmlrpc as that has moved to PECL Install Composer Sed -i "s/#ClientAliveCountMax 3/ClientAliveCountMax 3/" /etc/ssh/sshd_config Install PHP8.2 and common PHP packagesĪpt install -y php8.2-cli php8.2-dev php8.2-pgsql php8.2-sqlite3 php8.2-gd php8.2-curl php8.2-memcached php8.2-imap php8.2-mysql php8.2-mbstring php8.2-xml php8.2-imagick php8.2-zip php8.2-bcmath php8.2-soap php8.2-intl php8.2-readline php8.2-common php8.2-pspell php8.2-tidy php8.2-xsl php8.2-opcache php8.2-apcu Sed -i "s/#ClientAliveInterval 0/ClientAliveInterval 60/" /etc/ssh/sshd_config Sed -i "s/#TCPKeepAlive yes/TCPKeepAlive yes/" /etc/ssh/sshd_config If you want the SSH Daemon to keep your connections alive, you can run the following commands: Ln -sf /usr/share/zoneinfo/UTC /etc/localtime Set SSH to KeepAlive Please note: We are no longer using the ondrej repository for Nginx as the official mainline version now includes http2 and is several versions ahead of Ondrej at this point.Īpt-get update apt-get install -y build-essential curl nano wget lftp unzip bzip2 arj nomarch lzop htop openssl gcc git binutils libmcrypt4 libpcre3-dev make python3 python3-pip supervisor unattended-upgrades whois zsh imagemagick uuid-runtime net-tools zip dirmngr apt-transport-https Set the timezone to UTC Add some PPAs to stay currentĪpt-get install -y software-properties-commonĮcho "deb `lsb_release -cs` nginx" | sudo tee /etc/apt//nginx.list We choose the port range 50000->50099 in order to allow passive FTP connections. # Skip the following 3 lines if you do not plan on using FTP Install fail2ban and enable firewallĪpt-get update apt-get upgrade -y apt-get install -y fail2ban ufw curl wget htop nano ssh snapd Please note: There may be breaking changes between PHP 7.2/7.3/7.4 and 8.2. Based on on-going experience and community feedback we tweak our stacks and keep this doc continuously updated. By provisioning a base Ubuntu Jammy image, and following these steps exactly, you would be able to duplicate our server image. This document details how we've set up our Ubuntu LEMP (Linux (E)Nginx Mysql and PHP) 8.2 stack.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |