Introduction
Phpredmin is simple control panel for Redis-Server. It’s open-source and easy to use, you can check out Phpredmin on Github.
We are assuming that you have root permission, otherwise, you may start commands with “sudo”.
Installing Phpredmin
First of all, you have to compile “phpredis” module so PHP apps can work with the Redis server.
Requirments
Before start installing Phpredmin make sure that you have a configured web server with PHP 7.0 if you don’t you can visit our LAMP stack tutorials:
How to install LAMP (Apache, MySQL, PHP) Stack on Ubuntu 16
How to install LAMP (Apache, MySQL, PHP) stack on Debian 8
If you are using other web-servers you have to set the same configuration on them but that could be quite different.
Let’s get to work.
We are going to start with updating repositories list and then install Requirments.
apt-get update
apt-get install git gcc make tcl php-pear php7.0dev
Now we can get Phpredmin from Github:
git clone -b php7 https://github.com/phpredis/phpredis.git
cd phpredis/
phpize
./configure
make && make install
echo 'extension=redis.so' > /etc/php/7.0/mods-available/redis.ini
phpenmod redis
Now we have to restart our Apache:
systemctl restart apache2
Then we have to install Phpredmin:
cd /var/www
git clone https://github.com/sasanrose/phpredmin.git
mkdir -p ./phpredis/logs/apache2handler/
chown www-data ./phpredmin/ -R
Create the Apache config file:
nano /etc/apache2/conf-available/phpredmin.conf
Paste the text below into the “phpredmin.conf”:
Alias /phpredmin /var/www/phpredmin/public
<Directory /var/www/phpredmin/>
AllowOverride All
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require all granted
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Allow from all
</IfModule>
</Directory>
Be sure that you replace your preferred configuration in the above text.
To enable that config file you just created:
a2enconf phpredmin
At last, you have to restart your Apache and you are good to go:
systemctl restart apache2
go to the following path and open your “.htaccess” with a text editor:
nano /var/www/phpredmin/public/.htaccess
Comment the following line like below:
#php_value short_open_tag 1
Now you can login to your Phpredmin panel with:
http://YOURPUBLICIPADDRESS/phpredmin
This is how your Panel looks like:
Notice: The default credentials are:
admin
admin
It’s highly recommended to change the password after first login.
Here is the tutorial for password changing:
For changing the username and password you should open Phpredmin config file with a text editor, we are going to use nano:
nano /var/www/phpredmin/config.dist.php
You will see something like the picture below:
change your Username and Password then save and exit.