Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save stardigits/5903bf238ca44abf38de4789545612cf to your computer and use it in GitHub Desktop.
Save stardigits/5903bf238ca44abf38de4789545612cf to your computer and use it in GitHub Desktop.
How to Install Latest Mariadb, PHP, Apache on MX-19.2 (Debian 10/Buster)

How to Install Latest Mariadb, PHP, Apache on MX-19.2 (Debian 10/Buster)

Mariadb 10.15

Source Info: https://downloads.mariadb.org/mariadb/repositories/#distro=Debian&distro_release=buster--buster&mirror=nethub&version=10.5

Update apt repository source list

sudo apt-get install software-properties-common dirmngr
sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
sudo add-apt-repository 'deb [arch=amd64] http://mariadb.nethub.com.hk/repo/10.5/debian buster main'

Install

sudo apt update
sudo apt install mariadb-server mariadb-client

PHP 7.4

Source Info: https://computingforgeeks.com/how-to-install-latest-php-on-debian/

Update apt repository source list

sudo apt -y install lsb-release apt-transport-https ca-certificates 
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list

Install

sudo apt update
sudo apt install -y php7.4 php7.4-{bcmath,mbstring,curl,xml,json}

Apache 2

Source Info:

#!/bin/bash
# Install Script
# Update & Install Necessaries
sudo apt-get install -y software-properties-common dirmngr lsb-release apt-transport-https ca-certificates && \
# Google Chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
#sudo dpkg -i google-chrome-stable_current_amd64.deb && \
# VS Code
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - && \
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" &&\
# Mariadb
sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc' && \
sudo add-apt-repository 'deb [arch=amd64] http://mariadb.nethub.com.hk/repo/10.5/debian buster main' && \
# PHP
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list && \
# Nodejs
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
#curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
#curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
# Install VSCode, Mariadb & PHP
sudo apt update && \
sudo apt install -y --download-only code mariadb-server mariadb-client php7.4 php7.4-{bcmath,mbstring,curl,xml,json} nodejs libvips && \
# Install apache2, ffmpeg
sudo apt install -y --download-only apache2 ffmpeg
# Install Composer
#php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
#php -r "if (hash_file('sha384', 'composer-setup.php') === 'e5325b19b381bfd88ce90a5ddb7823406b2a38cff6bb704b0acc289a09c8128d4a8ce2bbafcd1fcbdc38666422fe2806') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
#php composer-setup.php && \
#php -r "unlink('composer-setup.php');" && \
# Uninstall firefox
# apt remove firefox thunderbird && \
#!/bin/bash
# Install Script
# Update & Install Necessaries
sudo apt-get install software-properties-common dirmngr lsb-release apt-transport-https ca-certificates && \
# Google Chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
sudo dpkg -i google-chrome-stable_current_amd64.deb && \
# VS Code
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - && \
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" &&\
# Mariadb
sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc' && \
sudo add-apt-repository 'deb [arch=amd64] http://mariadb.nethub.com.hk/repo/10.5/debian buster main' && \
# PHP
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list && \
# Nodejs
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
#curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
#curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
# Install VSCode, Mariadb & PHP
sudo apt update && \
sudo apt install -y code mariadb-server mariadb-client php7.4 php7.4-{bcmath,mbstring,curl,xml,json} nodejs libvips && \
# Install Composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php -r "if (hash_file('sha384', 'composer-setup.php') === 'e5325b19b381bfd88ce90a5ddb7823406b2a38cff6bb704b0acc289a09c8128d4a8ce2bbafcd1fcbdc38666422fe2806') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
php composer-setup.php && \
php -r "unlink('composer-setup.php');" && \
# Install apache2, ffmpeg
#apt install -y apache2 ffmpeg && \
# Unsintall firefox
# apt remove firefox thunderbird && \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment