Skip to content

Instantly share code, notes, and snippets.

@bryanisimo
Last active December 7, 2022 06:40
Show Gist options
  • Select an option

  • Save bryanisimo/4de576ebbb836a36d2a739b936df479c to your computer and use it in GitHub Desktop.

Select an option

Save bryanisimo/4de576ebbb836a36d2a739b936df479c to your computer and use it in GitHub Desktop.
sudo apt-get update
sudo apt install gnupg2 wget ca-certificates -y
sudo apt install wget software-properties-common apt-transport-https -y
# PHP 7.4 + Composer
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.4 php7.4-fpm php7.4-cli php7.4-common php7.4-mysql php7.4-zip php7.4-gd php7.4-mbstring php7.4-curl php7.4-xml php7.4-bcmath php7.4-bz2 php7.4-imagick php7.4-mcrypt php7.4-opcache php7.4-sqlite3 php7.4-ssh2 php7.4-uploadprogress php7.4-uuid -y
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
# MySQL 5.7
wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb
# Choose:
# Ubuntu Bionic
# | MySQL Server & Cluster (Currently selected: mysql-5.7) │
# | MySQL Tools & Connectors (Currently selected: Enabled) │
# | MySQL Preview Packages (Currently selected: Disabled)
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6494C6D6997C215E
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29
sudo apt-get update
# Look for 5.7 version
sudo apt-cache policy mysql-server
sudo apt install -f mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* -y
sudo mysql_secure_installation
sudo systemctl disable --now apache2 # Just in case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment