In this tutorial, we will show you how to install PhpRedmin on your CentOS 7. For those of you who didn’t know, Redis is an open-source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, and sorted sets. Redis also supports data types such as Transitions, Publish and Subscribe. ‘Redis ’ is considered more powerful than ‘Memcache’. It would be smart to bring ‘Redis’ into practice and put ‘Memcache’ down for a while.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you the step-by-step installation PhpRedmin on a CentOS 7 server.
Prerequisites
- A server running one of the following operating systems: CentOS 7.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Install PhpRedmin on CentOS 7
Step 1. First, let’s start by ensuring your system is up-to-date.
yum clean all yum -y update
Step 2. Installing a LAMP server.
A CentOS 7 LAMP stack server is required. If you do not have LAMP installed, you can follow our guide here. Also, install the required modules:
yum install git gcc make tcl php70w-pear php70w-devel
Step 3. Installing PhpRedmin.
Now we can get Phpredmin from Github:
git clone -b php7 https://github.com/phpredis/phpredis.git cd phpredis/ phpize ./configure make && make install
Next, you should load the Redis module in your PHP:
echo 'extension=redis.so' > /etc/php.d/redis.ini
Restart the apache service for the changes to take effect:
systemctl restart httpd
Finally, test if your Redis module has been loaded successfully:
### php -i |grep redis /etc/php.d/redis.ini, redis Registered save handlers => files user redis rediscluster This program is free software; you can redistribute it and/or modify
Then we can install Phpredmin:
cd /var/www git clone https://github.com/sasanrose/phpredmin.git mkdir -p ./phpredis/logs/apache2handler/ chown apache:apache ./phpredmin/ -R
Create a virtual host for PhpRedmin:
nano /etc/httpd/conf.d/phpredmin.conf
Add the following lines:
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>
Restart the apache service for the changes to take effect:
systemctl start httpd.service systemctl enable httpd.service
Step 4. Disable SELINUX.
You can disable SELINUX or you can add a rule for permission, you can follow our guide here.
Step 5. Accessing PhpRedmin.
PhpRedmin will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://your-domain.com/phpredmin
or http://server-ip/phpredmin
. If you are using a firewall, please open port 80 to enable access to the control panel.
Congratulations! You have successfully installed PhpRedmin. Thanks for using this tutorial for installing PhpRedmin on CentOS 7 server. For additional help or useful information, we recommend you check the official PhpRedmin website.