sudo pacman -Syu
sudo pacman -S mysqlOnce MySQL installs, start both mysql and the secure installation process. You will also be able to set the MySQL root password during the installation.
sudo systemctl start mysqld && mysql_secure_installationWhen initially prompted for the MySQL root password, you can go ahead and press enter, as it has not yet been set. Your installation should look like this:
Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MySQL root user without the proper authorization. Set root password? [Y/n] y New password: Re-enter new password: Password updated successfully! Reloading privilege tables.. ... Success! By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y ... Success! By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y - Dropping test database... ... Success! - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y ... Success! Cleaning up... All done! If you've completed all of the above steps, your MySQL installation should now be secure. Thanks for using MySQL!
sudo systemctl restart mysqld
sudo pacman -S nginxnginx does not start on its own. To get nginx running, type:
sudo systemctl start nginxYou can confirm that nginx has installed an your web server by directing your browser to your IP address. You can run the following command to reveal your server's IP address.
curl -s icanhazip.com
sudo pacman -S php-fpmOnce its installed, start it up.
sudo systemctl start php-fpmFinally, we need to tell nginx to run php using php-fpm. To accomplish this, first open up the nginx configuration file:
sudo nano /etc/nginx/nginx.confFind the location block that deals with php applications and replace the text in the section with the following:
location ~ \.php$ { fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; fastcgi_index index.php; root /srv/http; include fastcgi.conf; }Save, exit, and restart nginx:
sudo systemctl restart nginx
sudo nano /srv/http/info.phpAdd in the following line:
<?php phpinfo(); ?>Then Save and Exit.
sudo systemctl restart nginxYou can see the nginx and php-fpm configuration details by visiting http://youripaddress/info.php
sudo systemctl enable nginx mysqld php-fpmWith that, LEMP is installed.
Article ID: 218
Created On: Sun, Dec 29, 2013 at 6:46 AM
Last Updated On: Sun, Jan 5, 2014 at 8:15 PM
Authored by: ASPHostServer Administrator [asphostserver@gmail.com]
Online URL: http://faq.asphosthelpdesk.com/article.php?id=218