×

Pages

Labels

Search

×

Pages

×
×

Notice

The site is currently undergoing scheduled maintenance, and may not function correctly. Please come back later.

Advertisement

advertisement

Setup Lubuntu 20.04 AMD64 As A LAMP

L.A.M.P. (Linux Apache MySQL PHP) is an acronym used to refer to a linux webserver equipped with Apache, MySQL, and PHP. It is also common to include some additional packages such as PHPMyAdmin. Some administrators may also wish to use MariaDB instead of MySQL. These steps document how to setup Lubuntu with Apache, MySQL, PHP, and PHPMyAdmin.

Steps:
- Type, "sudo apt-get update && sudo apt-get install apache2 mysql-server php libapache2-mod-php php-mysql phpmyadmin php-mbstring".
- You will be prompted to choose a webserver to run PHPMyAdmin. Use the arrow up/down keys to move the cursor to "apache2" (though it should be there by default), the space bar to select "apache2", press the tab key to move the cursor to "Ok", and press the enter key to submit.
- You will be prompted to choose whether or not to "Configure database for phpmyadmin with dbconfig-common". Use the arrow left/right keys to move the selector to "Yes" (it should be there by default), and then press the enter key to submit.
- You will be prompted to create a password for phpmyadmin to use with MySQL, do so. After entering the password, use the tab key to move the selection to "Ok", and then press the enter key to submit. You'll be prompted to confirm by re-entering your password. You'll use this password to login to phpMyAdmin as username "phpmyadmin".

Notes:
- You may also wish to install "php-gmp", and "php-imagick". To do so type, "sudo apt-get install php-gmp php-imagick".
- While Lubuntu is migrating to snap usage, there are still many packages not available as snap so these steps use debian packages only. Lubuntu 20.04 does come with snap installed but no snap packages are pre-installed. You can uninstall the snap system by typing "sudo apt-get remove snapd".
- Upon completion, if you navigate your web browser to "http://localhost/index.html", "http://localhost", or "http://127.0.0.1" you should see a webpage. If you navigate your web browser to "http://localhost/phpmyadmin", or "http://127.0.0.1/phpmyadmin" you should see the PHPMyAdmin login page.
- These steps don't cover configuring any firewall rules. By default, no firewall rules are setup on Lubuntu. To see the current rules, in terminal type "sudo iptables -L".
- These steps don't cover hardening MySQL Server.
- To check the status of Apache, in terminal type "sudo systemctl status apache2". Press the q key to exit the report. To restart Apache, in terminal type "sudo systemctl restart apache2". To stop Apache, in terminal type "sudo systemctl stop apache2". To start Apache, in terminal type "sudo systemctl start apache2".
- These steps don't cover hardening PHPMyAdmin.
- These steps don't cover setting up virtualhosts in Apache.
- Upon completion, you can check to see if PHP is working correctly by creating a PHP file which runs phpinfo(). To do so, type in terminal "echo '<?php phpinfo(); ?>' | sudo tee /var/www/html/info.php". In your web browser navigate to "http://localhost/info.php". You should see a page detailing your php and apache setup. This file is typically not something you want others to view so you should delete it immediately. To do so, type in terminal "sudo rm /var/www/html/info.php".

Authors:James Daniel Marrs Ritchey
License:Ritchey Permissive License v8
Ritchey Permissive License v8:

You means the person, or legal entity exercising permissions granted by this license. Provider means a person (or legal entity) using permissions granted by this license to share the material. Permissions are revoked permanently upon breach of this license. Subject to the terms of this license, any person (or legal entity) is hereby granted otherwise irrevocable royalty-free permission to do anything with material provided under this license. The material is provided as is, without warranties of any kind, guarantees of any kind, or implied fitness for any purpose. The authors, owners, and providers will not be held responsible for anything caused by the material. When sharing the material with others you take on all responsibilities of and relating to consequences (including warranties, implied warranties, guarantees, liabilities, and damages), including those which would normally be the responsibility of the owner, between you and those directly and indirectly receiving the material from you. The material must remain solely under this license. This license is to be upheld in Canada, subject to the laws of Canada, as they were on April 21, 2019. You must be legally capable of being bound to all the requirements of this license, and by using the material you agree to be. The license text is provided under these terms.


Advertisment

advertisement
Copyright © James Daniel Marrs Ritchey.

Siteviews