How to install php , mySQL ect tools on Xubuntu linux

Leave a comment

March 12, 2017 by RAYCHEV

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 >>>

Removing

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

$ sudo apt-get purge php.*
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: