LAMP Stack - Linux, Apache, MySQL and PHP
Table of contents
Prerequisite
- Using SSH key, read on How to generate SSH on Mac.
- Knowing and change user permission, read on User & Permission.
- For micro image size, read on SwapFile.
Install Apache
apt-get install apache2 -y
service apache2 restart
service apache2 status
Config Apache
- Get SSL/TLS certificate from CF Origin Certificate
- Create public and private key files on the server
certificate
mkdir /etc/ssl nano /etc/ssl/cf_public.crt
private key
nano /etc/ssl/cf_private.key
Remove Apache
sudo apt autoremove
sudo apt remove apache2.*
dpkg -S `which apache2`
sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common
# or, sudo apt-get purge apache2 apache2-utils apache2-bin apache2.2-common
sudo service apache2 start
# if removed, returns: apache2: unrecognized service
Install LAMP using Tasksel
sudo apt install tasksel
sudo tasksel install lamp-server
sudo apt install php-curl php-gd php-mbstring php-xml php-xmlrpc