Skip to content

Instantly share code, notes, and snippets.

@yoni333
Last active April 13, 2020 13:20
Show Gist options
  • Save yoni333/57cc09c9ad596cdfea4500ef829c40e7 to your computer and use it in GitHub Desktop.
Save yoni333/57cc09c9ad596cdfea4500ef829c40e7 to your computer and use it in GitHub Desktop.
install lamp on ubuntu 16
#taked from:
#https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04
#https://downloads.mariadb.org/mariadb/repositories/#version=10.2&mirror=yamagata-university&distro=Ubuntu&distro_release=xenial--ubuntu_xenial
#https://tecadmin.net/install-php-7-on-ubuntu/
sudo apt-get update
sudo apt-get install -y apache2
#Set Global ServerName to Suppress Syntax Warnings -> sudo nano /etc/apache2/apache2.conf -> add in the end : ServerName server_domain_or_IP
#check it ->
sudo apache2ctl configtest
sudo systemctl restart apache2
#install zip and curl - you mybee will need it in sometime...
sudo apt-get install -y zip
sudo apt-get install -y curl
#php repository
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
#install php 7.1
sudo apt-get install -y php7.1
#list all available php 7.1 packages
sudo apt-cache search php7.1
#now you can choose from the list what you want. i choose thus
sudo apt-get install -y php-mongodb php-all-dev php-xdebug php-imagick php7.1-cgi php7.1-cli php7.1-dev php7.1-common php7.1-curl php7.1-gd php7.1-json php7.1-mbstring php7.1-mcrypt php7.1-mysql php7.1-xml php7.1-zip
#more 2 packages
sudo apt-get install -y libapache2-mod-php7.1 php7.1-intl
#install mariaDB 10.2 for ubntu 16
#for other version of linux see the link in line 3
#check your linux distro with -> cat /etc/*-release
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/repo/10.2/ubuntu xenial main'
sudo apt update
sudo apt -y install mariadb-server
#restart apache2 server
sudo service apache2 restart
#dont forget to allow http acccess to your server!!!
@Tenriquez39
Copy link

you know why i have this error ? :

Err:10 http://mirrors.hustunique.com/mariadb/repo/10.1/ubuntu xenial InRelease
Could not connect to mirrors.hustunique.com:80 (116.211.105.72), connection timed out

@yoni333
Copy link
Author

yoni333 commented Apr 13, 2020

Looks like this repository for mariadb stop to reaponse.
Go to mariaDB linux download page and see what is the new repo adress

https://downloads.mariadb.org/mariadb/repositories/#distro=Ubuntu&mirror=nodesdirect

@Tenriquez39
Copy link

Tenriquez39 commented Apr 13, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment