How to install Apache 2.4, PHP 5.6 or PHP 7.1, MySQL 5.6, Phpmyadmin in Ubuntu 14.04 LTS
Install Apache 2.4
$ sudo add-apt-repository -y ppa:ondrej/apache2
$ sudo apt-get update
$ sudo apt-get -y install apache2
To enable mod_rewrite
$ sudo a2enmod rewrite
Install PHP 5.6
$ sudo apt-get install python-software-properties
$ sudo add-apt-repository -y ppa:ondrej/php
$ sudo apt-get -y update
$ sudo apt-get -y install php5.6
Install PHP 7.1
$ sudo apt-get install python-software-properties
$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt-get update
$ sudo apt-get install -y php7.1
Check PHP Version
$ php -v
Add additional Package
$ sudo apt-cache search php5.6*
$ sudo apt-get install -y php5.6-cli php5.6-cgi php5.6-curl php5.6-imap php5.6-gd php5.6-intl php5.6-mysql php5.6-xmlrpc php5.6-mbstring php5.6-soap php5.6-zip php5.6-xml php5.6-mysqli php5.6-curl php5.6-imap libapache2-mod-php5.6 php5.6-mbstring php5.6-mcrypt
$ sudo apt-get install -y openssl
Install MySQL 5.6
$ sudo add-apt-repository -y ppa:ondrej/mysql-5.6
$ sudo apt-get update
$ sudo apt-get install -y mysql-server
Check MYSQL Version
$ mysql --version
Fix Error if appear:
Port 3306 appears to be closed on my Ubuntu server
The problem was that the server was listening internally only.
For mysql version 5.6 and below
$ sudo nano /etc/mysql/my.cnf
For mysql version 5.7 and above
$ sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
#Replace xxx with your IP Address or Change
bind-address = 0.0.0.0
Install Phpmyadmin
$ sudo apt-get install phpmyadmin
Configure Phpmyadmin
COPY AND PASTE END OF LINE
Include /etc/phpmyadmin/apache.conf
AND SAVE IT
sudo service apache2 restart
To change WWW Folder Permission
$ sudo chmod -R 777 /var/www
Done.
To start Apache 2 on Ubuntu,
$ sudo service apache2 start
To stop Apache 2 on Ubuntu,
$ sudo service apache2 stop
To restart Apache 2 on Ubuntu,
$ sudo service apache2 restart
0 comments:
Post a Comment