How VPS - How to use/setup VPS
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System CentOS

How to Install phpRedisAdmin on CentOS 7

How VPS by How VPS
October 1, 2019
in CentOS
0
0
SHARES
54
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Prerequisites
  2. Step 1: Updating the system
  3. Step 2: Installing Redis from source
  4. Step 3: Starting the Redis server
  5. Step 4: Installing Git, Apache, PHP and other dependencies
  6. Step 5: Installing phpRedisAdmin
  7. Step 6: Visiting phpRedisAdmin
  8. Want to contribute?


phpRedisAdmin is a web application that manages Redis databases with an intuitive graphic user interface.

This tutorial will explain how to install phpRedisAdmin on a Vultr CentOS 7 server instance.

Prerequisites

  • Deploy a fresh Vultr CentOS 7 server instance.
  • Log in as a non-root sudo user.

Step 1: Updating the system

Use the following command to update your CentOS 7 system to the latest stable status:

sudo yum update -y && sudo reboot

After the system restarts, use the same sudo user to log in.

Step 2: Installing Redis from source

Since the version of Redis in the YUM repo is out of date, you can install the latest stable version of Redis from source, which is 3.2.0 at the time of writing.

Install dependencies:

sudo yum install gcc make

Install Redis 3.2.0 to /opt/redis/3.2.0:

cd ~
wget http://download.redis.io/releases/redis-3.2.0.tar.gz
tar -zxvf redis-3.2.0.tar.gz
cd redis-3.2.0
make
sudo make PREFIX=/opt/redis/3.2.0 install

As a matter of convenience, you can add the path of Redis into the PATH environment variable:

sudo cp /etc/profile /etc/profile_backup
echo 'export PATH=$PATH:/opt/redis/3.2.0/bin' | sudo tee -a /etc/profile
source /etc/profile
echo $PATH

Step 3: Starting the Redis server

For now, let’s start the Redis server using the default configuration:

redis-server

After the Redis server starts, you will probably see several warning messages. Troubleshooting steps for various warnings are listed below.

First of all, stop the Redis server by inputting the following command from another SSH console:

redis-cli shutdown

1) If you see “WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.”:

echo 'net.core.somaxconn = 511' | sudo tee -a /etc/sysctl.conf
echo '511' | sudo tee -a /proc/sys/net/core/somaxconn

2) If you see “WARNING overcommit_memory is set to 0!”:

echo 'vm.overcommit_memory = 1' | sudo tee -a /etc/sysctl.conf
sudo sysctl vm.overcommit_memory=1

3) If you see “WARNING you have Transparent Huge Pages (THP) support enabled in your kernel.”:

echo 'never' | sudo tee -a /sys/kernel/mm/transparent_hugepage/enabled

Having these warning messages eliminated, run the Redis server again:

redis-server

In another SSH console, run the Redis CLI to input some data:

redis-cli

In the redis-cli console, you can manipulate any data as you wish:

127.0.0.1:6379> set key1 hello
OK
127.0.0.1:6379> get key1
"hello"

If you want to quit, Press Ctrl + C.

Step 4: Installing Git, Apache, PHP and other dependencies

Install these components using YUM:

sudo yum install git httpd php php-redis php-devel php-mbstring

Here, I use Apache to serve phpRedisAdmin, you can choose Nginx or any other web server instead.

Modify the default settings of Apache in order to enhance security:

sudo sed -i 's/^/#&/g' /etc/httpd/conf.d/welcome.conf
sudo sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/httpd/conf/httpd.conf

Create a virtual host for phpRedisAdmin:

sudo vi /etc/httpd/conf.d/phpRedisAdmin.conf

Populate the file with the following code segment. Be sure to replace the values of ServerAdmin, ServerName, ServerAlias, ErrorLog, and CustomLog with your own ones.

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/html/phpRedisAdmin/
    ServerName phpredisadmin.example.com
    ServerAlias www.phpredisadmin.example.com
    <Directory /var/www/html/phpRedisAdmin/>
    Options FollowSymLinks
    AllowOverride All
    </Directory>
    ErrorLog /var/log/httpd/phpredisadmin.example.com-error_log
    CustomLog /var/log/httpd/phpredisadmin.example.com-access_log common
</VirtualHost>

Save and quit:

:wq

Step 5: Installing phpRedisAdmin

Download phpRedisAdmin using git:

cd ~
git clone https://github.com/ErikDubbelboer/phpRedisAdmin.git
cd phpRedisAdmin
git clone https://github.com/nrk/predis.git vendor

Create the configuration file using a sample file:

cp includes/config.sample.inc.php includes/config.inc.php

Note: In the future, you can use this file to customize phpRedisAdmin, like adding more Redis servers, enabling HTTP authentication, and such. But for now, let’s use the default settings.

Move the directory to the virtual host location we setup earlier:

cd ~
sudo chown -R apache: ~/phpRedisAdmin
sudo mv ~/phpRedisAdmin /var/www/html

Step 6: Visiting phpRedisAdmin

Start and enable Apache:

sudo systemctl start httpd.service
sudo systemctl enable httpd.service

Modify firewall rules in order to allow visitors to access phpRedisAdmin:

sudo firewall-cmd --zone=public --permanent --add-service=http
sudo firewall-cmd --reload

Finally, visit phpRedisAdmin from your web browser. Be sure that redis-server is running.

http://<your-Vultr-server-IP>

You will be presented with the interface of phpRedisAdmin, where you can view and manage your Redis databases. This concludes the tutorial.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
How VPS

How VPS

Related Posts

Failed to download metadata for repo 'appstream' on Centos 8
CentOS

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Install BoltWire CMS on CentOS 7
CentOS

How to Install BoltWire CMS on CentOS 7

February 14, 2020
Showterm.io – A Terminal/Shell Recording, Upload and Share Tool for Linux
CentOS

Setup HTTP Authentication With Nginx on CentOS 7

February 14, 2020
Next Post

Securing an Apache Server on CentOS 6

How To Install Lighttpd (LLMP Stack) on CentOS 6

How to Install Shopware CE on CentOS 7

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Follow Us

  • 121 Followers
  • 87.2k Followers

Recommended

Useful Commands to Create Commandline Chat Server and Remove Unwanted Packages in Linux

Installing Plex Media Server on CentOS 7

3 years ago

How to Compress and Decompress a .bz2 File in Linux

4 years ago

Installing Debian 8 on Vultr

3 years ago

How to Compile Nginx From Source on Debian 10

3 years ago

Instagram

    Please install/update and activate JNews Instagram plugin.

Categories

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel

Topics

Apache Web Server Bluehost Review 2019 Bluehost Review 2020 Bluehost Review 2021 Centmin Mod CentminMod centos install htop fsck htop install HTTP DoS attack Install Snort on an Ubuntu install Zabbix on CentOS install Zabbix on CentOS 7 Linux Commands linux guide linux install htop linux vps setup guide MariaDB MariaDB Error Mysql mysqld error optimize MariaDB optimize Mysql snort Ubuntu
No Result
View All Result

Highlights

Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

Webmin Reviews

Virtualmin Reviews

CentOS Web Panel Reviews

Ajenti Reviews

ISPConfig Reviews

Trending

Failed to download metadata for repo 'appstream' on Centos 8
CentOS

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

by How VPS
February 25, 2022
0

I tried to update some extensions by use yum on centOs which I specified in Dockerfile. After...

How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020
Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

February 17, 2020
Webmin Reviews

Webmin Reviews

February 17, 2020
How VPS – How to use/setup VPS

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Visit our landing page to see all features & demos.
LEARN MORE »

Recent News

  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8 February 25, 2022
  • How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”? November 17, 2020
  • How to optimize Mysql or MariaDB November 3, 2020

Categories

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel

[mc4wp_form]

© 2018 JNews - City News Magazine WordPress theme. All rights belong to their respective owners.
JNews is a top selling 2018 WordPress News, Blog, Newspaper & Magazine Theme.

No Result
View All Result
  • Home

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.