Install XAMPP 7.0 on Ubuntu and Mac OSx using Redis and Memcached Extensions
Wall Script
MailxEngine
Follow Me:
Tuesday, December 27, 2016

Install XAMPP 7.0 on Ubuntu and Mac OSx using Redis and Memcached Extensions

Now, it’s time to update your PHP web server. We had few vulnerabilities with previous versions like openSSL and others. PHP 7 is very fast, advanced and has improved execution time. XAMPP is the most popular PHP development environment, it saves time and effort by providing easy way to install Apache-MySQL-PHP framework. This post helps you how to install XAMPP 7.0 with Redis and memcached extensions for Ubuntu and Mac operating systems. Follow the below steps to install XAMPP.

Display Browser Notifications from Web Application


XAMPP 7.0.3 Installation Commands for Ubuntu and Mac

Download XAMPP 7.0.3 for 64 bit
wget https://www.apachefriends.org/xampp-files/7.0.13/xampp-linux-x64-7.0.13-0-installer.run

For Mac OS you can download XAMPP 7.0.3 directly.

Make Execute Installation
sudo chmod +x xampp-linux-x64-7.0.13-0-installer.run

Run Installation
sudo ./xampp-linux-x64-7.0.13-0-installer.run

XAMPP instructions
Select the components you want to install; clear the components you do not want to install. Click Next when you are ready to continue.
XAMPP Core Files : Y (Cannot be edited)
XAMPP Developer Files [Y/n] : Y
Is the selection above correct? [Y/n]: Y

Installation Directory
XAMPP will be installed to /opt/lampp
Press [Enter] to continue:
Do you want to continue? [Y/n]:Y

Run XAMPP
sudo /opt/lampp/lampp start

XAMPP Access Forbidden
Open your browser and access http://IP-ADDRESS/ you will find this Access forbidden screen.
Launch instance

XAMPP Configurations
Edit XAMPP configurations.
vi /opt/lampp/etc/extra/httpd-xampp.conf

Replace following line Require all granted
<Directory "/opt/lampp/phpmyadmin">
    AllowOverride AuthConfig Limit
    Require all granted
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>

Security Settings for PhpMyAdmin
sudo /opt/lampp/xampp security

Follow this instructions.
XAMPP: Your XAMPP pages are NOT secured by a password.
XAMPP: Do you want to set a password? [yes] no
XAMPP: MySQL is accessable via network.
XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes] yes
XAMPP: Turned off.
XAMPP: Stopping MySQL...ok.
XAMPP: Starting MySQL...ok.
XAMPP: The MySQL/phpMyAdmin user pma has no password set!!!
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Password:*******
XAMPP: Password (again):*******
XAMPP: Setting new MySQL pma password.
XAMPP: Setting phpMyAdmin's pma password to the new one.
XAMPP: MySQL has no root passwort set!!!
XAMPP: Do you want to set a password? [yes] yes
XAMPP: Write the password somewhere down to make sure you won't forget it!!!
XAMPP: Password:*******
XAMPP: Password (again):*******
XAMPP: Setting new MySQL root password.
XAMPP: Change phpMyAdmin's authentication method.
XAMPP: The FTP password for user 'daemon' is still set to 'xampp'.
XAMPP: Do you want to change the password? [yes] no
XAMPP: Done.

PhpMyAdmin
You can access PhyMyAdmin at http://IP-Address/phpmyadmin/
Launch instance

Enable Redis Extension for XAMPP 7.0 on Ubuntu

Download PHP 7.0 dev and execute following commands
$ apt-get install php7.0-dev
$ wget https://github.com/phpredis/phpredis/archive/php7.zip -O phpredis-php7.zip
apt-get install unzip
$ unzip phpredis-php7.zip
$ cd phpredis-php7
$ phpize
$ ./configure
$ make
$ make install

Now go to modules folder inside phpredis-php7 folder.
$ cd modules

Copy redis.so extension file in XAMPP extensions folder. Replace XXXXXX with your folder number.
$ cp redis.so /opt/lampp/lib/php/extensions/no-debug-non-zts-XXXXXXX/

Now edit php.ini.
$ vi /opt/lampp/etc/php.ini

Include following line and save.
extension="redis.so"

Restart server.
sudo /opt/lampp/lampp restart

Enable Redis Extension for XAMPP 7.0 on Mac OSx
Install php 7.0 dev and Redis.
$ brew install homebrew/php/php70
$ brew install homebrew/php/php70-redis

Copy redis.so extension file into Xampp PHP extensions.
$ sudo cp /urs/local/Cellar/php70-redis/3.0.0/redis.so /user/username/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-XXXXXXX/

Edit php.ini file with text editor.
$ vi /users/username/Applications/XAMPP/xamppfiles/etc/php.ini

Include following line and restart XAMPP Server.
extension="redis.so"

Install Redis Server for Mac and Ubuntu

Download Redis server and execute following commands
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz
$ tar xzf redis-2.8.3.tar.gz
$ cd redis-2.8.3
$ make

Start Redis Server.
$ src/redis-server


Enable Memcached Extension for XAMPP 7.0 on Ubuntu

$ sudo apt-get install -y php7.0-dev git pkg-config build-essential libmemcached-dev

$ git clone https://github.com/php-memcached-dev/php-memcached.git

$ cd php-memcached

$ git checkout php7
$ phpize
$ ./configure --disable-memcached-sasl
$ make
$ sudo make install

Copy memcached.so extension into XAMPP extensions folder, replace XXXXX with your folder directory name.
$ cp /usr/lib/php/20151012/memcached.so /opt/lampp/lib/php/extensions/no-debug-non-zts-XXXXXX/

Edit PHP.ini
$ vi /opt/lampp/etc/php.ini

Enable Memchached extension.
extension="memcached.so"


Enable Memcached Extension for XAMPP 7.0 on Mac OSx

$ brew install --HEAD homebrew/php/php70-memcached

$ cp /urs/local/Cellar/php70-memcached/HEAD-e65be32/memcached.so /user/username/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-XXXXXXX/

$ vi /users/username/Applications/XAMPP/xamppfiles/etc/php.ini

extension="memcached.so"

Memcached Server for Ubuntu
$ apt-get install memcached
$ service memcached restart

Memcached Server for Mac
Download Memcached Server and extract with ZIP software.

$ cd memcached-1.4.15
$ ./configure

$ make
$ sudo make install
$ memcached

Memcached listens on port 11211 by default, to change it, use the -p option.
$ memcached -p 8000
Was this article helpful?
Thanks! Your feedback helps us to improve 9lessons.info


3 comments:

  1. You don't really need xampp. Just `brew install php70 php70-memcached php70-redis`, and its done. Its that simple.

    ReplyDelete
  2. Install XAMPP 7.0 on Ubuntu and Mac OSx using Redis and Memcached Extensions. good very good

    ReplyDelete
  3. Pls tell in detail and usege about this post

    ReplyDelete

Make in India