Tag Archives: terminal

How to install php , mySQL ect tools on Xubuntu linux

1. Install different php versions on my platform and switching them.

$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt-get update
$ sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0

Switch PHP version:

from php5.6 to php7.0:

$ sudo a2dismod php5.6 ; sudo a2enmod php7.0 ; sudo service apache2 restart

from php7.0 to php5.6:
sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart

2. Install apache 2.4

$ sudo add-apt-repository ppa:ondrej/apache2
$ sudo apt-get update
$ sudo apt-get install apache2

3. Install MySQL 5.6

$ sudo add-apt-repository -y ppa:ondrej/mysql-5.6
$ sudo apt-get update
$ sudo apt-get install mysql-server-5.6

4.Command to find our available php 7 modules

$ sudo apt-cache search php7-*
$ sudo apt-get install libapache2-mod-php7.1 php7.1-mysql php7.1-curl php7.1-json

X. Checking versions:
$ php -v

$ mysql -V
or with file >>>


$ sudo apt-get remove --purge mysql*
$ sudo apt-get autoremove
$ sudo apt-get autoclean

$ sudo apt-get purge php.*