To install PHP-FPM run the command: $ sudo pacman -S php php-fpmĪfter the installation is complete, enable the PHP-FPM on boot and start the service by executing the command: $ sudo systemctl enable php-fpm It equips your webserver with the ability to handle a huge volume of network traffic simultaneously. An abbreviation for PHP FastCGI Process Manager, PHP-FPM is a handy web tool that speeds up a website’s performance. The component to install is PHP-FPM which also bundles PHP. To log in to your database instance, run the command: $ mysql -u root -pĮnter the mysql root password that you set during “ mysql_secure_installation” command Step 3) Install PHP & PHP-FPM This includes removing anonymous users, disabling remote root login, removing the test database and finally r eloading the privileges tables to which you should answer Yes to all by typing the Y key. The rest of the prompt will require you to perform a few hardening tweaks to your MariaDB database engine. If you feel that you need to change the password hit ‘ Y’ on the keyboard and provide a strong password and confirm it. Initially, you will be notified that the root account is protected and that you can proceed at your discretion and ignore changing the root password. First, you will be required to set the root password. So change to root user and run the command below to begin hardening MariaDB $ mysql_secure_installation To prevent that from happening,we need to secure our database engine and enforce a list of other restrictions. This can create a loop hole for a potential breach. $ sudo mysql_install_db -user=mysql -basedir=/usr -datadir=/var/lib/mysqlĪfter the initialization is complete, enable and start the MariaDB service as shown $ sudo systemctl enable mariadbīy default, upon installation, MariaDB database engine does not have a password for the root user. Once installed, proceed and initialize the MariaDB data directory and create system tables as shown below. To install MariaDB database engine, run the command: $ sudo pacman -S mariadb To confirm this, use the netstat command as shown: $ sudo netstat -plntu To check the version of Nginx installed, run: $ nginx -vīy default, Nginx listens on port 80. Additionally, you can confirm that the Nginx web server is up by launching your browser and typing your server’s IP address in the URL bar as shown. The output indicates that Nginx is up and running. To confirm that Nginx is running, execute the command: $ sudo systemctl status nginx Once installed, enable Nginx to start upon boot and start Nginx service by running the commands. To install Nginx, run the command: $ sudo pacman -S nginx So, proceed and update Arch packages using the command: Let’s begin! Step 1) Install Nginx Web Serverīefore the installation of any package, it’s always a good idea to update the system packages. We are going to install each of these components and test their installation on Arch Linux. Lastly, we have PHP which is a server-side scripting language used for developing dynamic web pages. MariaDB is a fork of MySQL and is mostly preferred since the takeover of MySQL by Oracle. MariaDB / MySQL are open source database Engines for storing website data. It’s popular for serving high traffic sites and is usually preferred to Apache in production servers. Nginx is a high-performance and stable web server which can also be used as a reverse proxy. LEMP is an abbreviation for Linux Nginx (pronounced as Engine X) MariaDB / MySQL and PHP. LEMP is a popular stack used by web developers for testing and hosting websites and applications. In this guide, you will learn how to install LEMP stack on an Arch Linux server.
0 Comments
Leave a Reply. |