Tuesday, October 3, 2017

Debian Stretch: LAMP apache2, mysql 5.7 community and php 7.0

Note: Install on fresh Debian Stretch (no apache and no database)

1. Install apache2


To install apache2 

# apt-get install apache2

2. Install mysql 5.7 community


Download MySql apt configuration from https://dev.mysql.com/get/mysql-apt-config_0.8.7-1_all.deb

# wget --no-check-certificate https://dev.mysql.com/get/mysql-apt-config_0.8.7-1_all.deb

Note: File name may change without notice, check latest mysql-apt-config at https://dev.mysql.com/downloads/repo/apt/

Install MySql apt configuration.

# dpkg -i mysql-apt-config_0.8.7-1_all.deb

Choose MySql 5.7 for stable version and continue by click Ok.

Install mysql 5.7 community

# apt-get install mysql-server mysql-client mysql-common

or

# apt-get install mysql-community-server mysql-community-client mysql-common

Note: at the end of installation, system will ask you to set mysql root password (NOT LINUX ROOT USER)

3. Install php 7.0


To install php 7.0:

# apt-get install php7.0 php7.0-gd php7.0-pgsql php7.0-cli php7.0-common php7.0-mcrypt php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0-xml php7.0-xmlrpc php7.0-bz2 php7.0-zip libapache2-mod-php7.0

Bonus: Install webmin


Download webmin

# wget http://prdownloads.sourceforge.net/webadmin/webmin_1.850_all.deb

Note: check http://www.webmin.com/deb.html for latest version

Install require library

# apt-get install libnet-ssleay-perl libauthen-pam-perl  libio-pty-perl  apt-show-versions

Install webmin

# dpkg -i webmin_1.850_all.deb

Note: follow this http://dedetoknotes.blogspot.co.id/2017/10/fixing-webmin-application-configuration.html to fix php.ini location

Done :)

No comments:

Post a Comment