Skip to content

Instantly share code, notes, and snippets.

@linuxoracledev
Last active November 6, 2019 18:39
Show Gist options
  • Save linuxoracledev/8db4b5db6af40a90569650d5c763e179 to your computer and use it in GitHub Desktop.
Save linuxoracledev/8db4b5db6af40a90569650d5c763e179 to your computer and use it in GitHub Desktop.
LAMP Install Ubuntu 18.04 LTS
#!/bin/bash
# update & upgrade system
sudo apt update & sudo apt upgrade --fix-missing
# install apache & add to firewall
sudo apt install apache2
sudo ufw allow 'Apache'
# restart, enable, stop, start, status, reload apache
sudo systemctl status apache2
sudo systemctl enable apache2
sudo systemctl restart apache2
sudo systemctl stop apache2
sudo systemctl start apache2
sudo systemctl reload apache2
# brows apache default page http://localhost/
# mySql/mariaDb install
sudo apt install mysql-server
sudo mysql_secure_installation
mysql --version
sudo service mysql stop
sudo service mysql start
sudo service mysql restart
# Php install
sudo apt install php libapache2-mod-php php-mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment