Skip to content

Instantly share code, notes, and snippets.

@icaroscherma
Created May 21, 2019 14:36
Show Gist options
  • Save icaroscherma/6b186571d6fd309edbfc33c750e4a979 to your computer and use it in GitHub Desktop.
Save icaroscherma/6b186571d6fd309edbfc33c750e4a979 to your computer and use it in GitHub Desktop.
Installing a LAMP-like env in AWS Ubuntu 18.04
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo sh -c "echo 'deb [arch=amd64,i386] https://mirrors.evowise.com/mariadb/repo/10.2/ubuntu '$(lsb_release -cs)' main' > /etc/apt/sources.list.d/MariaDB-10.2.list"
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
sudo dpkg-reconfigure locales
sudo apt update
sudo apt upgrade
sudo apt install unzip
sudo apt install mariadb-server mariadb-client
sudo apt install mongodb-org
sudo apt install apache2
sudo apt install php7.2 libapache2-mod-php7.2
sudo apt install php7.2-xsl php7.2-mysql php7.2-soap php7.2-mbstring php7.2-bcmath php7.2-cli php7.2-curl php7.2-dev php7.2-intl php7.2-sqlite3 php7.2-xml php7.2-zip php7.2-xmlrpc php7.2-gd
sudo apt install libmcrypt-dev
sudo pecl install mcrypt-1.0.1
sudo bash -c "echo extension=/usr/lib/php/20170718/mcrypt.so > /etc/php/7.2/cli/conf.d/mcrypt.ini"
sudo bash -c "echo extension=/usr/lib/php/20170718/mcrypt.so > /etc/php/7.2/apache2/conf.d/mcrypt.ini"
sudo a2enmod rewrite
sudo chown ubuntu:ubuntu /var/www/html
sudo apt install python3-certbot-apache
sudo service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment