0 votes
366 views
by Rookie
I removed redis with command "sudo apt-get remove redis-server -y" . How to reinstall redis?

1 Answer

+1 vote
by Expert
Man, really?

Use "install" instead of "remove".
by Rookie
edited by

not working, please help me.

root@vultr:~# sudo apt-get install redis-server -y

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following additional packages will be installed:

  redis-tools

Suggested packages:

  ruby-redis

The following NEW packages will be installed:

  redis-server

The following packages will be upgraded:

  redis-tools

1 upgraded, 1 newly installed, 0 to remove and 215 not upgraded.

Need to get 917 kB of archives.

After this operation, 1,355 kB of additional disk space will be used.

Get:1 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu bionic/main amd64 redis-tools amd64 5:5.0.3-3chl1~bionic1 [840 kB]

Get:2 http://ppa.launchpad.net/chris-lea/redis-server/ubuntu bionic/main amd64 redis-server amd64 5:5.0.3-3chl1~bionic1 [77.2 kB]

Fetched 917 kB in 1s (778 kB/s)

(Reading database ... 107085 files and directories currently installed.)

Preparing to unpack .../redis-tools_5%3a5.0.3-3chl1~bionic1_amd64.deb ...

Unpacking redis-tools (5:5.0.3-3chl1~bionic1) over (5:4.0.11-1chl1~bionic1) ...

Selecting previously unselected package redis-server.

Preparing to unpack .../redis-server_5%3a5.0.3-3chl1~bionic1_amd64.deb ...

Unpacking redis-server (5:5.0.3-3chl1~bionic1) ...

dpkg: warning: unable to delete old directory '/etc/redis/redis-server.pre-up.d': Directory not empty

dpkg: warning: unable to delete old directory '/etc/redis/redis-server.pre-down.d': Directory not empty

dpkg: warning: unable to delete old directory '/etc/redis/redis-server.post-up.d': Directory not empty

dpkg: warning: unable to delete old directory '/etc/redis/redis-server.post-down.d': Directory not empty

Setting up redis-tools (5:5.0.3-3chl1~bionic1) ...

Processing triggers for ureadahead (0.100.0-20) ...

Processing triggers for systemd (237-3ubuntu10) ...

Processing triggers for man-db (2.8.3-2) ...

Setting up redis-server (5:5.0.3-3chl1~bionic1) ...

Installing new version of config file /etc/init.d/redis-server ...

Installing new version of config file /etc/redis/redis.conf ...

Processing triggers for ureadahead (0.100.0-20) ...

Processing triggers for systemd (237-3ubuntu10) ...

root@vultr:~# webinoly -verify

Verifying integrity of the entire Webinoly system...

[ERROR] Redis service not running!

[ERROR] Memcached service not running!

[ERROR] SWAP Memory File not found!

*******************************************************

********      > > >  E R R O R < < <        ***********

********   System could not work properly   ***********

*******************************************************

root@vultr:~# sudo systemctl enable redis-server

Synchronizing state of redis-server.service with SysV service script with /lib/systemd/systemd-sysv-install.

Executing: /lib/systemd/systemd-sysv-install enable redis-server

Failed to enable unit: Unit file /etc/systemd/system/redis-server.service is masked.

root@vultr:~# sudo systemctl enable redis-server

Synchronizing state of redis-server.service with SysV service script with /lib/systemd/systemd-sysv-install.

Executing: /lib/systemd/systemd-sysv-install enable redis-server

Failed to enable unit: Unit file /etc/systemd/system/redis-server.service is masked.

root@vultr:~# sudo service redis-server start

Failed to start redis-server.service: Unit redis-server.service is masked.

root@vultr:~#                                           

by Rookie
@QROkes please help me
by Expert
Tony, to be honest, what I would do, take a backup and then start with a new and fresh server. That's the main benefit of the cloud model.

And of course, you now have a very important lesson learned to not remove core webinoly packages manually. You better use the proper Webinoly commands to install and remove packages.

Regards.
by Rookie
thank you, i will follow your tutorial
Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

If you have a question about Webinoly, please ask in English or Spanish.

To report a bug, please ask a question here with the bug tag.

Donations

Webinoly Support Paypal Donations Webinoly Support Bitcoin Donations

Your regular donations is what keep this project moving forward. If you like Webinoly, buy me a coffee or a beer to show support.

Affiliate Links

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...