Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update install-redis-on-linux.md #2640

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Rajakavitha1
Copy link

@Rajakavitha1 Rajakavitha1 commented Jan 5, 2024

Fixes: #2037

Copy link

netlify bot commented Jan 5, 2024

👷 Deploy request for redis-doc pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 4812c4f

@Rajakavitha1
Copy link
Author

Rajakavitha1 commented Jan 5, 2024

Tested and validated on ubuntu 22.04

rajie@redisub:~$ sudo apt install lsb-release curl gpg
[sudo] password for rajie: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
lsb-release is already the newest version (11.1.0ubuntu4).
curl is already the newest version (7.81.0-1ubuntu1.15).
gpg is already the newest version (2.2.27-3ubuntu2.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
rajie@redisub:~$ curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
rajie@redisub:~$ echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb jammy main
rajie@redisub:~$ sudo spt-get update
sudo: spt-get: command not found
rajie@redisub:~$ sudo apt-get update
Hit:1 http://mirrors.linode.com/ubuntu jammy InRelease
Hit:2 http://mirrors.linode.com/ubuntu jammy-updates InRelease                 
Hit:3 http://mirrors.linode.com/ubuntu jammy-backports InRelease               
Hit:4 http://security.ubuntu.com/ubuntu jammy-security InRelease               
Hit:5 https://ppa.launchpadcontent.net/akamai-ubuntu-launchpad/ppa/ubuntu jammy InRelease
Get:6 https://packages.redis.io/deb jammy InRelease [3821 B]                   
Get:7 https://packages.redis.io/deb jammy/main amd64 Packages [18.4 kB]
Get:8 https://packages.redis.io/deb jammy/main all Packages [4158 B]
Fetched 26.4 kB in 3s (8233 B/s)    
Reading package lists... Done
rajie@redisub:~$ sudo apt-get install redis
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  redis-server redis-tools
Suggested packages:
  ruby-redis
The following NEW packages will be installed:
  redis redis-server redis-tools
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 1718 kB of archives.
After this operation, 9790 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://packages.redis.io/deb jammy/main amd64 redis-tools amd64 6:7.2.3-1rl1~jammy1 [1603 kB]
Get:2 https://packages.redis.io/deb jammy/main amd64 redis-server amd64 6:7.2.3-1rl1~jammy1 [81.8 kB]
Get:3 https://packages.redis.io/deb jammy/main amd64 redis all 6:7.2.3-1rl1~jammy1 [33.4 kB]
Fetched 1718 kB in 5s (363 kB/s)
Selecting previously unselected package redis-tools.
(Reading database ... 74535 files and directories currently installed.)
Preparing to unpack .../redis-tools_6%3a7.2.3-1rl1~jammy1_amd64.deb ...
Unpacking redis-tools (6:7.2.3-1rl1~jammy1) ...
Selecting previously unselected package redis-server.
Preparing to unpack .../redis-server_6%3a7.2.3-1rl1~jammy1_amd64.deb ...
Unpacking redis-server (6:7.2.3-1rl1~jammy1) ...
Selecting previously unselected package redis.
Preparing to unpack .../redis_6%3a7.2.3-1rl1~jammy1_all.deb ...
Unpacking redis (6:7.2.3-1rl1~jammy1) ...
Setting up redis-tools (6:7.2.3-1rl1~jammy1) ...
Setting up redis-server (6:7.2.3-1rl1~jammy1) ...
Setting up redis (6:7.2.3-1rl1~jammy1) ...
Processing triggers for man-db (2.10.2-1) ...
Scanning processes...                                                           
Scanning linux images...                                                        

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
rajie@redisub:~$ sudo systemctl status redis
Unit redis.service could not be found.
rajie@redisub:~$ redis-cli ping
PONG
rajie@redisub:~$ rdis-server -version
Command 'rdis-server' not found, did you mean:
  command 'redis-server' from deb redis-server (5:6.0.16-1ubuntu1)
Try: sudo apt install <deb name>
rajie@redisub:~$ redis-server -version

*** FATAL CONFIG FILE ERROR (Redis 7.2.3) ***
Reading the configuration file, at line 2
>>> '"-version"'
Bad directive or wrong number of arguments
rajie@redisub:~$ redis-server --version
Redis server v=7.2.3 sha=00000000:0 malloc=jemalloc-5.3.0 bits=64 build=7f52fd1717e1b756

Tested and validated on Debian 11 as well:

rajie@redisdeb:~$ curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
rajie@redisdeb:~$ echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb bullseye main
rajie@redisdeb:~$ sudo apt-get update
Hit:1 http://mirrors.linode.com/debian bullseye InRelease
Get:2 http://mirrors.linode.com/debian-security bullseye-security/updates InRelease [48.4 kB]
Hit:3 http://mirrors.linode.com/debian bullseye-updates InRelease              
Get:4 http://download.opensuse.org/repositories/home:/akamai-linux-team/Debian_11  InRelease [1875 B]
Get:5 https://packages.redis.io/deb bullseye InRelease [3827 B]                
Get:6 https://packages.redis.io/deb bullseye/main amd64 Packages [26.3 kB]
Get:7 https://packages.redis.io/deb bullseye/main all Packages [4455 B]
Fetched 84.9 kB in 3s (25.8 kB/s)  
Reading package lists... Done
rajie@redisdeb:~$ sudo apt-get install redis
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  redis-server redis-tools
Suggested packages:
  ruby-redis
The following NEW packages will be installed:
  redis redis-server redis-tools
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 1532 kB of archives.
After this operation, 9763 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://packages.redis.io/deb bullseye/main amd64 redis-tools amd64 6:7.2.3-1rl1~bullseye1 [1418 kB]
Get:2 https://packages.redis.io/deb bullseye/main amd64 redis-server amd64 6:7.2.3-1rl1~bullseye1 [80.7 kB]
Get:3 https://packages.redis.io/deb bullseye/main amd64 redis all 6:7.2.3-1rl1~bullseye1 [33.6 kB]
Fetched 1532 kB in 5s (312 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package redis-tools.
(Reading database ... 36114 files and directories currently installed.)
Preparing to unpack .../redis-tools_6%3a7.2.3-1rl1~bullseye1_amd64.deb ...
Unpacking redis-tools (6:7.2.3-1rl1~bullseye1) ...
Selecting previously unselected package redis-server.
Preparing to unpack .../redis-server_6%3a7.2.3-1rl1~bullseye1_amd64.deb ...
Unpacking redis-server (6:7.2.3-1rl1~bullseye1) ...
Selecting previously unselected package redis.
Preparing to unpack .../redis_6%3a7.2.3-1rl1~bullseye1_all.deb ...
Unpacking redis (6:7.2.3-1rl1~bullseye1) ...
Setting up redis-tools (6:7.2.3-1rl1~bullseye1) ...
Setting up redis-server (6:7.2.3-1rl1~bullseye1) ...
Setting up redis (6:7.2.3-1rl1~bullseye1) ...
Processing triggers for man-db (2.9.4-2) ...
rajie@redisdeb:~$ redis-cli ping
PONG
rajie@redisdeb:~$ sudo syatemctl status redis
sudo: syatemctl: command not found
rajie@redisdeb:~$ sudo systemctl status redis
Unit redis.service could not be found.
rajie@redisdeb:~$ sudo systemctl start redis
Failed to start redis.service: Unit redis.service not found.
rajie@redisdeb:~$ redis-cli
127.0.0.1:6379> q
(error) ERR unknown command 'q', with args beginning with: 
127.0.0.1:6379> exit
rajie@redisdeb:~$ systemctl status redis
Unit redis.service could not be found.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install Redis on Linux
3 participants