Install Redis-Server on Ubuntu 16.04 LTS minimal











up vote
1
down vote

favorite












I have got a question and hope that somebody can help me. I own a vServer on a OpenVZ basis (I hate the kernel limitation) and can't install Redis.



What do I do:




  • Clean install Ubuntu 16.04. LTS minimal

  • Login as root

  • run: apt update

  • run: apt upgrade


(I don't know if this is relevant, but this appears during the process:




Installing new version of config file /etc/systemd/system.conf ...
addgroup: The group `systemd-journal' already exists as a system
group. Exiting. [/usr/lib/tmpfiles.d/var.conf:14] Duplicate line for
path "/var/log", ignoring. Failed to validate path /var/run/sshd: Too
many levels of symbolic links Failed to validate path /var/run/sudo:
Too many levels of symbolic links Failed to validate path
/var/run/sudo/ts: Too many levels of symbolic links (Reading database
... 16369 files and directories currently installed.)





  • run: apt install redis-server


Problem appears:




Setting up redis-server (2:3.0.6-1) ...



fchownat() of /run/redis failed: Invalid argument



insserv: warning: script is corrupt or invalid: /etc/init.d/../rc2.d/S15ssh_gen_host_keys



Job for redis-server.service failed because a timeout was exceeded. See "systemctl status redis-server.service" and "journalctl -xe" for details.



invoke-rc.d: initscript redis-server, action "start" failed.



...



Process: 11845 ExecStopPost=/bin/run-parts --verbose /etc/redis/redis-server.p ost-down.d (code=exited, status=0/SUCCESS)



Process: 11839 ExecStartPost=/bin/run-parts --verbose /etc/redis/redis-server. post-up.d (code=exited, status=0/SUCCESS)



Process: 11837 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exi ted, status=0/SUCCESS)



Process: 11833 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.p re-up.d (code=exited, status=0/SUCCESS)



systemd[1]: Failed to start Advanced key-value ....



systemd[1]: redis-server.service: Unit entered ....



systemd[1]: redis-server.service: Failed with r....



Hint: Some lines were ellipsized, use -l to show in full.



dpkg: error processing package redis-server (--configure):
subprocess installed post-installation script returned error exit status 1



Processing triggers for libc-bin (2.23-0ubuntu10) ...



Processing triggers for systemd (229-4ubuntu21.9) ...



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



Errors were encountered while processing:
redis-server



E: Sub-process /usr/bin/dpkg returned an error code (1)



W: Operation was interrupted before it could finish





  • run: systemctl status redis-server.service



redis-server.service - Advanced key-value store Loaded: loaded
(/lib/systemd/system/redis-server.service; enabled; vendor preset:
enabled) Active: activating (start-post) since Mon 2018-11-19
19:41:53 CET; 54s ago
Docs: http://redis.io/documentation,
man:redis-server(1) Process: 11966 ExecStopPost=/bin/run-parts --verbose
/etc/redis/redis-server.post-down.d (code=exited, status=0/SUCC

Process: 11978 ExecStartPost=/bin/run-parts --verbose
/etc/redis/redis-server.post-up.d (code=exited, status=0/SUCCE

Process: 11976 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf
(code=exited, status=0/SUCCESS) Process: 11972
ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d
(code=exited, status=0/SUCCESS CGroup:
/system.slice/redis-server.service
└─11977 /usr/bin/redis-server 127.0.0.1:6379



systemd[1]: Starting Advanced key-value store...



run-parts[11972]: run-parts: executing /etc/redis/redis-server.pre-up.d/00_example



run-parts[11978]: run-parts: executing /etc/redis/redis-server.post-up.d/00_example



systemd[1]: redis-server.service: PID file /var/run/redis/redis-server.pid not readable (




After that I can't start Redis-Server (failed because a timeout was exceeded). What can I do to fix this problem? I saw many threads about redis in this forum, but the solutions didn't help me. Sorry for my bad english. Thanks in advance.










share|improve this question







New contributor




Firehead is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Welcome! Run commands ls -lah /var/run/redis/redis-server.pid and ls -lah /var/run/redis/ then show returns for both here.
    – S_Flash
    Nov 19 at 18:56












  • ls: cannot access '/var/run/redis/redis-server.pid': No such file or directory
    – Firehead
    Nov 19 at 18:59










  • total 0 | drwxrwsr-x 2 root root 40 . | rrwxr-xr-x 13 root root 440 ..
    – Firehead
    Nov 19 at 19:01










  • try with root user run chmod -R 777 /var/run/redis/ then run redis server again.
    – S_Flash
    Nov 19 at 19:03










  • Now -rw-r--r-- 1 redis root 6 Nov 19 20:07 /var/run/redis/redis-server.pid
    – Firehead
    Nov 19 at 19:09















up vote
1
down vote

favorite












I have got a question and hope that somebody can help me. I own a vServer on a OpenVZ basis (I hate the kernel limitation) and can't install Redis.



What do I do:




  • Clean install Ubuntu 16.04. LTS minimal

  • Login as root

  • run: apt update

  • run: apt upgrade


(I don't know if this is relevant, but this appears during the process:




Installing new version of config file /etc/systemd/system.conf ...
addgroup: The group `systemd-journal' already exists as a system
group. Exiting. [/usr/lib/tmpfiles.d/var.conf:14] Duplicate line for
path "/var/log", ignoring. Failed to validate path /var/run/sshd: Too
many levels of symbolic links Failed to validate path /var/run/sudo:
Too many levels of symbolic links Failed to validate path
/var/run/sudo/ts: Too many levels of symbolic links (Reading database
... 16369 files and directories currently installed.)





  • run: apt install redis-server


Problem appears:




Setting up redis-server (2:3.0.6-1) ...



fchownat() of /run/redis failed: Invalid argument



insserv: warning: script is corrupt or invalid: /etc/init.d/../rc2.d/S15ssh_gen_host_keys



Job for redis-server.service failed because a timeout was exceeded. See "systemctl status redis-server.service" and "journalctl -xe" for details.



invoke-rc.d: initscript redis-server, action "start" failed.



...



Process: 11845 ExecStopPost=/bin/run-parts --verbose /etc/redis/redis-server.p ost-down.d (code=exited, status=0/SUCCESS)



Process: 11839 ExecStartPost=/bin/run-parts --verbose /etc/redis/redis-server. post-up.d (code=exited, status=0/SUCCESS)



Process: 11837 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exi ted, status=0/SUCCESS)



Process: 11833 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.p re-up.d (code=exited, status=0/SUCCESS)



systemd[1]: Failed to start Advanced key-value ....



systemd[1]: redis-server.service: Unit entered ....



systemd[1]: redis-server.service: Failed with r....



Hint: Some lines were ellipsized, use -l to show in full.



dpkg: error processing package redis-server (--configure):
subprocess installed post-installation script returned error exit status 1



Processing triggers for libc-bin (2.23-0ubuntu10) ...



Processing triggers for systemd (229-4ubuntu21.9) ...



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



Errors were encountered while processing:
redis-server



E: Sub-process /usr/bin/dpkg returned an error code (1)



W: Operation was interrupted before it could finish





  • run: systemctl status redis-server.service



redis-server.service - Advanced key-value store Loaded: loaded
(/lib/systemd/system/redis-server.service; enabled; vendor preset:
enabled) Active: activating (start-post) since Mon 2018-11-19
19:41:53 CET; 54s ago
Docs: http://redis.io/documentation,
man:redis-server(1) Process: 11966 ExecStopPost=/bin/run-parts --verbose
/etc/redis/redis-server.post-down.d (code=exited, status=0/SUCC

Process: 11978 ExecStartPost=/bin/run-parts --verbose
/etc/redis/redis-server.post-up.d (code=exited, status=0/SUCCE

Process: 11976 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf
(code=exited, status=0/SUCCESS) Process: 11972
ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d
(code=exited, status=0/SUCCESS CGroup:
/system.slice/redis-server.service
└─11977 /usr/bin/redis-server 127.0.0.1:6379



systemd[1]: Starting Advanced key-value store...



run-parts[11972]: run-parts: executing /etc/redis/redis-server.pre-up.d/00_example



run-parts[11978]: run-parts: executing /etc/redis/redis-server.post-up.d/00_example



systemd[1]: redis-server.service: PID file /var/run/redis/redis-server.pid not readable (




After that I can't start Redis-Server (failed because a timeout was exceeded). What can I do to fix this problem? I saw many threads about redis in this forum, but the solutions didn't help me. Sorry for my bad english. Thanks in advance.










share|improve this question







New contributor




Firehead is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Welcome! Run commands ls -lah /var/run/redis/redis-server.pid and ls -lah /var/run/redis/ then show returns for both here.
    – S_Flash
    Nov 19 at 18:56












  • ls: cannot access '/var/run/redis/redis-server.pid': No such file or directory
    – Firehead
    Nov 19 at 18:59










  • total 0 | drwxrwsr-x 2 root root 40 . | rrwxr-xr-x 13 root root 440 ..
    – Firehead
    Nov 19 at 19:01










  • try with root user run chmod -R 777 /var/run/redis/ then run redis server again.
    – S_Flash
    Nov 19 at 19:03










  • Now -rw-r--r-- 1 redis root 6 Nov 19 20:07 /var/run/redis/redis-server.pid
    – Firehead
    Nov 19 at 19:09













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have got a question and hope that somebody can help me. I own a vServer on a OpenVZ basis (I hate the kernel limitation) and can't install Redis.



What do I do:




  • Clean install Ubuntu 16.04. LTS minimal

  • Login as root

  • run: apt update

  • run: apt upgrade


(I don't know if this is relevant, but this appears during the process:




Installing new version of config file /etc/systemd/system.conf ...
addgroup: The group `systemd-journal' already exists as a system
group. Exiting. [/usr/lib/tmpfiles.d/var.conf:14] Duplicate line for
path "/var/log", ignoring. Failed to validate path /var/run/sshd: Too
many levels of symbolic links Failed to validate path /var/run/sudo:
Too many levels of symbolic links Failed to validate path
/var/run/sudo/ts: Too many levels of symbolic links (Reading database
... 16369 files and directories currently installed.)





  • run: apt install redis-server


Problem appears:




Setting up redis-server (2:3.0.6-1) ...



fchownat() of /run/redis failed: Invalid argument



insserv: warning: script is corrupt or invalid: /etc/init.d/../rc2.d/S15ssh_gen_host_keys



Job for redis-server.service failed because a timeout was exceeded. See "systemctl status redis-server.service" and "journalctl -xe" for details.



invoke-rc.d: initscript redis-server, action "start" failed.



...



Process: 11845 ExecStopPost=/bin/run-parts --verbose /etc/redis/redis-server.p ost-down.d (code=exited, status=0/SUCCESS)



Process: 11839 ExecStartPost=/bin/run-parts --verbose /etc/redis/redis-server. post-up.d (code=exited, status=0/SUCCESS)



Process: 11837 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exi ted, status=0/SUCCESS)



Process: 11833 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.p re-up.d (code=exited, status=0/SUCCESS)



systemd[1]: Failed to start Advanced key-value ....



systemd[1]: redis-server.service: Unit entered ....



systemd[1]: redis-server.service: Failed with r....



Hint: Some lines were ellipsized, use -l to show in full.



dpkg: error processing package redis-server (--configure):
subprocess installed post-installation script returned error exit status 1



Processing triggers for libc-bin (2.23-0ubuntu10) ...



Processing triggers for systemd (229-4ubuntu21.9) ...



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



Errors were encountered while processing:
redis-server



E: Sub-process /usr/bin/dpkg returned an error code (1)



W: Operation was interrupted before it could finish





  • run: systemctl status redis-server.service



redis-server.service - Advanced key-value store Loaded: loaded
(/lib/systemd/system/redis-server.service; enabled; vendor preset:
enabled) Active: activating (start-post) since Mon 2018-11-19
19:41:53 CET; 54s ago
Docs: http://redis.io/documentation,
man:redis-server(1) Process: 11966 ExecStopPost=/bin/run-parts --verbose
/etc/redis/redis-server.post-down.d (code=exited, status=0/SUCC

Process: 11978 ExecStartPost=/bin/run-parts --verbose
/etc/redis/redis-server.post-up.d (code=exited, status=0/SUCCE

Process: 11976 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf
(code=exited, status=0/SUCCESS) Process: 11972
ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d
(code=exited, status=0/SUCCESS CGroup:
/system.slice/redis-server.service
└─11977 /usr/bin/redis-server 127.0.0.1:6379



systemd[1]: Starting Advanced key-value store...



run-parts[11972]: run-parts: executing /etc/redis/redis-server.pre-up.d/00_example



run-parts[11978]: run-parts: executing /etc/redis/redis-server.post-up.d/00_example



systemd[1]: redis-server.service: PID file /var/run/redis/redis-server.pid not readable (




After that I can't start Redis-Server (failed because a timeout was exceeded). What can I do to fix this problem? I saw many threads about redis in this forum, but the solutions didn't help me. Sorry for my bad english. Thanks in advance.










share|improve this question







New contributor




Firehead is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I have got a question and hope that somebody can help me. I own a vServer on a OpenVZ basis (I hate the kernel limitation) and can't install Redis.



What do I do:




  • Clean install Ubuntu 16.04. LTS minimal

  • Login as root

  • run: apt update

  • run: apt upgrade


(I don't know if this is relevant, but this appears during the process:




Installing new version of config file /etc/systemd/system.conf ...
addgroup: The group `systemd-journal' already exists as a system
group. Exiting. [/usr/lib/tmpfiles.d/var.conf:14] Duplicate line for
path "/var/log", ignoring. Failed to validate path /var/run/sshd: Too
many levels of symbolic links Failed to validate path /var/run/sudo:
Too many levels of symbolic links Failed to validate path
/var/run/sudo/ts: Too many levels of symbolic links (Reading database
... 16369 files and directories currently installed.)





  • run: apt install redis-server


Problem appears:




Setting up redis-server (2:3.0.6-1) ...



fchownat() of /run/redis failed: Invalid argument



insserv: warning: script is corrupt or invalid: /etc/init.d/../rc2.d/S15ssh_gen_host_keys



Job for redis-server.service failed because a timeout was exceeded. See "systemctl status redis-server.service" and "journalctl -xe" for details.



invoke-rc.d: initscript redis-server, action "start" failed.



...



Process: 11845 ExecStopPost=/bin/run-parts --verbose /etc/redis/redis-server.p ost-down.d (code=exited, status=0/SUCCESS)



Process: 11839 ExecStartPost=/bin/run-parts --verbose /etc/redis/redis-server. post-up.d (code=exited, status=0/SUCCESS)



Process: 11837 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exi ted, status=0/SUCCESS)



Process: 11833 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.p re-up.d (code=exited, status=0/SUCCESS)



systemd[1]: Failed to start Advanced key-value ....



systemd[1]: redis-server.service: Unit entered ....



systemd[1]: redis-server.service: Failed with r....



Hint: Some lines were ellipsized, use -l to show in full.



dpkg: error processing package redis-server (--configure):
subprocess installed post-installation script returned error exit status 1



Processing triggers for libc-bin (2.23-0ubuntu10) ...



Processing triggers for systemd (229-4ubuntu21.9) ...



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



Errors were encountered while processing:
redis-server



E: Sub-process /usr/bin/dpkg returned an error code (1)



W: Operation was interrupted before it could finish





  • run: systemctl status redis-server.service



redis-server.service - Advanced key-value store Loaded: loaded
(/lib/systemd/system/redis-server.service; enabled; vendor preset:
enabled) Active: activating (start-post) since Mon 2018-11-19
19:41:53 CET; 54s ago
Docs: http://redis.io/documentation,
man:redis-server(1) Process: 11966 ExecStopPost=/bin/run-parts --verbose
/etc/redis/redis-server.post-down.d (code=exited, status=0/SUCC

Process: 11978 ExecStartPost=/bin/run-parts --verbose
/etc/redis/redis-server.post-up.d (code=exited, status=0/SUCCE

Process: 11976 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf
(code=exited, status=0/SUCCESS) Process: 11972
ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d
(code=exited, status=0/SUCCESS CGroup:
/system.slice/redis-server.service
└─11977 /usr/bin/redis-server 127.0.0.1:6379



systemd[1]: Starting Advanced key-value store...



run-parts[11972]: run-parts: executing /etc/redis/redis-server.pre-up.d/00_example



run-parts[11978]: run-parts: executing /etc/redis/redis-server.post-up.d/00_example



systemd[1]: redis-server.service: PID file /var/run/redis/redis-server.pid not readable (




After that I can't start Redis-Server (failed because a timeout was exceeded). What can I do to fix this problem? I saw many threads about redis in this forum, but the solutions didn't help me. Sorry for my bad english. Thanks in advance.







16.04 server services openvz redis






share|improve this question







New contributor




Firehead is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Firehead is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Firehead is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 19 at 18:51









Firehead

62




62




New contributor




Firehead is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Firehead is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Firehead is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Welcome! Run commands ls -lah /var/run/redis/redis-server.pid and ls -lah /var/run/redis/ then show returns for both here.
    – S_Flash
    Nov 19 at 18:56












  • ls: cannot access '/var/run/redis/redis-server.pid': No such file or directory
    – Firehead
    Nov 19 at 18:59










  • total 0 | drwxrwsr-x 2 root root 40 . | rrwxr-xr-x 13 root root 440 ..
    – Firehead
    Nov 19 at 19:01










  • try with root user run chmod -R 777 /var/run/redis/ then run redis server again.
    – S_Flash
    Nov 19 at 19:03










  • Now -rw-r--r-- 1 redis root 6 Nov 19 20:07 /var/run/redis/redis-server.pid
    – Firehead
    Nov 19 at 19:09


















  • Welcome! Run commands ls -lah /var/run/redis/redis-server.pid and ls -lah /var/run/redis/ then show returns for both here.
    – S_Flash
    Nov 19 at 18:56












  • ls: cannot access '/var/run/redis/redis-server.pid': No such file or directory
    – Firehead
    Nov 19 at 18:59










  • total 0 | drwxrwsr-x 2 root root 40 . | rrwxr-xr-x 13 root root 440 ..
    – Firehead
    Nov 19 at 19:01










  • try with root user run chmod -R 777 /var/run/redis/ then run redis server again.
    – S_Flash
    Nov 19 at 19:03










  • Now -rw-r--r-- 1 redis root 6 Nov 19 20:07 /var/run/redis/redis-server.pid
    – Firehead
    Nov 19 at 19:09
















Welcome! Run commands ls -lah /var/run/redis/redis-server.pid and ls -lah /var/run/redis/ then show returns for both here.
– S_Flash
Nov 19 at 18:56






Welcome! Run commands ls -lah /var/run/redis/redis-server.pid and ls -lah /var/run/redis/ then show returns for both here.
– S_Flash
Nov 19 at 18:56














ls: cannot access '/var/run/redis/redis-server.pid': No such file or directory
– Firehead
Nov 19 at 18:59




ls: cannot access '/var/run/redis/redis-server.pid': No such file or directory
– Firehead
Nov 19 at 18:59












total 0 | drwxrwsr-x 2 root root 40 . | rrwxr-xr-x 13 root root 440 ..
– Firehead
Nov 19 at 19:01




total 0 | drwxrwsr-x 2 root root 40 . | rrwxr-xr-x 13 root root 440 ..
– Firehead
Nov 19 at 19:01












try with root user run chmod -R 777 /var/run/redis/ then run redis server again.
– S_Flash
Nov 19 at 19:03




try with root user run chmod -R 777 /var/run/redis/ then run redis server again.
– S_Flash
Nov 19 at 19:03












Now -rw-r--r-- 1 redis root 6 Nov 19 20:07 /var/run/redis/redis-server.pid
– Firehead
Nov 19 at 19:09




Now -rw-r--r-- 1 redis root 6 Nov 19 20:07 /var/run/redis/redis-server.pid
– Firehead
Nov 19 at 19:09










1 Answer
1






active

oldest

votes

















up vote
0
down vote













To fix your error: Install Redis as non-root user.



sudo apt-get update
sudo apt-get install build-essential tcl


Download and Extract the Source Code



cd /tmp


Now, download the latest stable version of Redis. This is always available at a stable download URL:



curl -O http://download.redis.io/redis-stable.tar.gz


Unpack the tarball by typing:



tar xzvf redis-stable.tar.gz


Move into the Redis source directory structure that was just extracted:



cd redis-stable


Build and Install Redis



Compiling dependencies:



cd deps
sudo make hiredis jemalloc linenoise lua geohash-int
cd ..


Compile the Redis binaries by typing:



make


After the binaries are compiled, run the test suite to make sure everything was built correctly. You can do this by typing:



make test


This will typically take a few minutes to run. Once it is complete, you can install the binaries onto the system by typing:



sudo make install


Begin by creating the redis user and group. This can be done in a single command by typing:



sudo adduser --system --group --no-create-home redis


Now, we can create the /var/lib/redis directory by typing:



sudo mkdir /var/lib/redis


We should give the redis user and group ownership over this directory:



sudo chown redis:redis /var/lib/redis


Adjust the permissions so that regular users cannot access this location:



sudo chmod 770 /var/lib/redis


Starting Redis



Start up the systemd service by typing:



sudo systemctl start redis


Check that the service had no errors by running:



sudo systemctl status redis


Source: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04






share|improve this answer























  • make[1]: Entering directory '/tmp/redis-stable/src' CC Makefile.dep CC adlist.o In file included from adlist.c:34:0: zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory compilation terminated. Makefile:232: recipe for target 'adlist.o' failed make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory '/tmp/redis-stable/src' Makefile:6: recipe for target 'all' failed make: *** [all] Error 2
    – Firehead
    Nov 19 at 19:27










  • try run: cd deps sudo make hiredis jemalloc linenoise lua geohash-int cd .. sudo make install separately
    – S_Flash
    Nov 19 at 19:31












  • thanks, I will try this later, server refuses connection, don't know why :D
    – Firehead
    Nov 19 at 19:35












  • that didn't work neither -- make test: [exception]: Executing test client: couldn't open socket: no buffer space available. couldn't open socket: no buffer space available...
    – Firehead
    Nov 19 at 22:14










  • try run redis-cli in command-line to check installation.. Redis socket you may setup separately (this is another question related redis setup. Example: guides.wp-bullet.com/…)
    – S_Flash
    Nov 20 at 6:31













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Firehead is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1094299%2finstall-redis-server-on-ubuntu-16-04-lts-minimal%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













To fix your error: Install Redis as non-root user.



sudo apt-get update
sudo apt-get install build-essential tcl


Download and Extract the Source Code



cd /tmp


Now, download the latest stable version of Redis. This is always available at a stable download URL:



curl -O http://download.redis.io/redis-stable.tar.gz


Unpack the tarball by typing:



tar xzvf redis-stable.tar.gz


Move into the Redis source directory structure that was just extracted:



cd redis-stable


Build and Install Redis



Compiling dependencies:



cd deps
sudo make hiredis jemalloc linenoise lua geohash-int
cd ..


Compile the Redis binaries by typing:



make


After the binaries are compiled, run the test suite to make sure everything was built correctly. You can do this by typing:



make test


This will typically take a few minutes to run. Once it is complete, you can install the binaries onto the system by typing:



sudo make install


Begin by creating the redis user and group. This can be done in a single command by typing:



sudo adduser --system --group --no-create-home redis


Now, we can create the /var/lib/redis directory by typing:



sudo mkdir /var/lib/redis


We should give the redis user and group ownership over this directory:



sudo chown redis:redis /var/lib/redis


Adjust the permissions so that regular users cannot access this location:



sudo chmod 770 /var/lib/redis


Starting Redis



Start up the systemd service by typing:



sudo systemctl start redis


Check that the service had no errors by running:



sudo systemctl status redis


Source: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04






share|improve this answer























  • make[1]: Entering directory '/tmp/redis-stable/src' CC Makefile.dep CC adlist.o In file included from adlist.c:34:0: zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory compilation terminated. Makefile:232: recipe for target 'adlist.o' failed make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory '/tmp/redis-stable/src' Makefile:6: recipe for target 'all' failed make: *** [all] Error 2
    – Firehead
    Nov 19 at 19:27










  • try run: cd deps sudo make hiredis jemalloc linenoise lua geohash-int cd .. sudo make install separately
    – S_Flash
    Nov 19 at 19:31












  • thanks, I will try this later, server refuses connection, don't know why :D
    – Firehead
    Nov 19 at 19:35












  • that didn't work neither -- make test: [exception]: Executing test client: couldn't open socket: no buffer space available. couldn't open socket: no buffer space available...
    – Firehead
    Nov 19 at 22:14










  • try run redis-cli in command-line to check installation.. Redis socket you may setup separately (this is another question related redis setup. Example: guides.wp-bullet.com/…)
    – S_Flash
    Nov 20 at 6:31

















up vote
0
down vote













To fix your error: Install Redis as non-root user.



sudo apt-get update
sudo apt-get install build-essential tcl


Download and Extract the Source Code



cd /tmp


Now, download the latest stable version of Redis. This is always available at a stable download URL:



curl -O http://download.redis.io/redis-stable.tar.gz


Unpack the tarball by typing:



tar xzvf redis-stable.tar.gz


Move into the Redis source directory structure that was just extracted:



cd redis-stable


Build and Install Redis



Compiling dependencies:



cd deps
sudo make hiredis jemalloc linenoise lua geohash-int
cd ..


Compile the Redis binaries by typing:



make


After the binaries are compiled, run the test suite to make sure everything was built correctly. You can do this by typing:



make test


This will typically take a few minutes to run. Once it is complete, you can install the binaries onto the system by typing:



sudo make install


Begin by creating the redis user and group. This can be done in a single command by typing:



sudo adduser --system --group --no-create-home redis


Now, we can create the /var/lib/redis directory by typing:



sudo mkdir /var/lib/redis


We should give the redis user and group ownership over this directory:



sudo chown redis:redis /var/lib/redis


Adjust the permissions so that regular users cannot access this location:



sudo chmod 770 /var/lib/redis


Starting Redis



Start up the systemd service by typing:



sudo systemctl start redis


Check that the service had no errors by running:



sudo systemctl status redis


Source: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04






share|improve this answer























  • make[1]: Entering directory '/tmp/redis-stable/src' CC Makefile.dep CC adlist.o In file included from adlist.c:34:0: zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory compilation terminated. Makefile:232: recipe for target 'adlist.o' failed make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory '/tmp/redis-stable/src' Makefile:6: recipe for target 'all' failed make: *** [all] Error 2
    – Firehead
    Nov 19 at 19:27










  • try run: cd deps sudo make hiredis jemalloc linenoise lua geohash-int cd .. sudo make install separately
    – S_Flash
    Nov 19 at 19:31












  • thanks, I will try this later, server refuses connection, don't know why :D
    – Firehead
    Nov 19 at 19:35












  • that didn't work neither -- make test: [exception]: Executing test client: couldn't open socket: no buffer space available. couldn't open socket: no buffer space available...
    – Firehead
    Nov 19 at 22:14










  • try run redis-cli in command-line to check installation.. Redis socket you may setup separately (this is another question related redis setup. Example: guides.wp-bullet.com/…)
    – S_Flash
    Nov 20 at 6:31















up vote
0
down vote










up vote
0
down vote









To fix your error: Install Redis as non-root user.



sudo apt-get update
sudo apt-get install build-essential tcl


Download and Extract the Source Code



cd /tmp


Now, download the latest stable version of Redis. This is always available at a stable download URL:



curl -O http://download.redis.io/redis-stable.tar.gz


Unpack the tarball by typing:



tar xzvf redis-stable.tar.gz


Move into the Redis source directory structure that was just extracted:



cd redis-stable


Build and Install Redis



Compiling dependencies:



cd deps
sudo make hiredis jemalloc linenoise lua geohash-int
cd ..


Compile the Redis binaries by typing:



make


After the binaries are compiled, run the test suite to make sure everything was built correctly. You can do this by typing:



make test


This will typically take a few minutes to run. Once it is complete, you can install the binaries onto the system by typing:



sudo make install


Begin by creating the redis user and group. This can be done in a single command by typing:



sudo adduser --system --group --no-create-home redis


Now, we can create the /var/lib/redis directory by typing:



sudo mkdir /var/lib/redis


We should give the redis user and group ownership over this directory:



sudo chown redis:redis /var/lib/redis


Adjust the permissions so that regular users cannot access this location:



sudo chmod 770 /var/lib/redis


Starting Redis



Start up the systemd service by typing:



sudo systemctl start redis


Check that the service had no errors by running:



sudo systemctl status redis


Source: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04






share|improve this answer














To fix your error: Install Redis as non-root user.



sudo apt-get update
sudo apt-get install build-essential tcl


Download and Extract the Source Code



cd /tmp


Now, download the latest stable version of Redis. This is always available at a stable download URL:



curl -O http://download.redis.io/redis-stable.tar.gz


Unpack the tarball by typing:



tar xzvf redis-stable.tar.gz


Move into the Redis source directory structure that was just extracted:



cd redis-stable


Build and Install Redis



Compiling dependencies:



cd deps
sudo make hiredis jemalloc linenoise lua geohash-int
cd ..


Compile the Redis binaries by typing:



make


After the binaries are compiled, run the test suite to make sure everything was built correctly. You can do this by typing:



make test


This will typically take a few minutes to run. Once it is complete, you can install the binaries onto the system by typing:



sudo make install


Begin by creating the redis user and group. This can be done in a single command by typing:



sudo adduser --system --group --no-create-home redis


Now, we can create the /var/lib/redis directory by typing:



sudo mkdir /var/lib/redis


We should give the redis user and group ownership over this directory:



sudo chown redis:redis /var/lib/redis


Adjust the permissions so that regular users cannot access this location:



sudo chmod 770 /var/lib/redis


Starting Redis



Start up the systemd service by typing:



sudo systemctl start redis


Check that the service had no errors by running:



sudo systemctl status redis


Source: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 19 at 19:36

























answered Nov 19 at 19:10









S_Flash

928117




928117












  • make[1]: Entering directory '/tmp/redis-stable/src' CC Makefile.dep CC adlist.o In file included from adlist.c:34:0: zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory compilation terminated. Makefile:232: recipe for target 'adlist.o' failed make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory '/tmp/redis-stable/src' Makefile:6: recipe for target 'all' failed make: *** [all] Error 2
    – Firehead
    Nov 19 at 19:27










  • try run: cd deps sudo make hiredis jemalloc linenoise lua geohash-int cd .. sudo make install separately
    – S_Flash
    Nov 19 at 19:31












  • thanks, I will try this later, server refuses connection, don't know why :D
    – Firehead
    Nov 19 at 19:35












  • that didn't work neither -- make test: [exception]: Executing test client: couldn't open socket: no buffer space available. couldn't open socket: no buffer space available...
    – Firehead
    Nov 19 at 22:14










  • try run redis-cli in command-line to check installation.. Redis socket you may setup separately (this is another question related redis setup. Example: guides.wp-bullet.com/…)
    – S_Flash
    Nov 20 at 6:31




















  • make[1]: Entering directory '/tmp/redis-stable/src' CC Makefile.dep CC adlist.o In file included from adlist.c:34:0: zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory compilation terminated. Makefile:232: recipe for target 'adlist.o' failed make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory '/tmp/redis-stable/src' Makefile:6: recipe for target 'all' failed make: *** [all] Error 2
    – Firehead
    Nov 19 at 19:27










  • try run: cd deps sudo make hiredis jemalloc linenoise lua geohash-int cd .. sudo make install separately
    – S_Flash
    Nov 19 at 19:31












  • thanks, I will try this later, server refuses connection, don't know why :D
    – Firehead
    Nov 19 at 19:35












  • that didn't work neither -- make test: [exception]: Executing test client: couldn't open socket: no buffer space available. couldn't open socket: no buffer space available...
    – Firehead
    Nov 19 at 22:14










  • try run redis-cli in command-line to check installation.. Redis socket you may setup separately (this is another question related redis setup. Example: guides.wp-bullet.com/…)
    – S_Flash
    Nov 20 at 6:31


















make[1]: Entering directory '/tmp/redis-stable/src' CC Makefile.dep CC adlist.o In file included from adlist.c:34:0: zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory compilation terminated. Makefile:232: recipe for target 'adlist.o' failed make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory '/tmp/redis-stable/src' Makefile:6: recipe for target 'all' failed make: *** [all] Error 2
– Firehead
Nov 19 at 19:27




make[1]: Entering directory '/tmp/redis-stable/src' CC Makefile.dep CC adlist.o In file included from adlist.c:34:0: zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory compilation terminated. Makefile:232: recipe for target 'adlist.o' failed make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory '/tmp/redis-stable/src' Makefile:6: recipe for target 'all' failed make: *** [all] Error 2
– Firehead
Nov 19 at 19:27












try run: cd deps sudo make hiredis jemalloc linenoise lua geohash-int cd .. sudo make install separately
– S_Flash
Nov 19 at 19:31






try run: cd deps sudo make hiredis jemalloc linenoise lua geohash-int cd .. sudo make install separately
– S_Flash
Nov 19 at 19:31














thanks, I will try this later, server refuses connection, don't know why :D
– Firehead
Nov 19 at 19:35






thanks, I will try this later, server refuses connection, don't know why :D
– Firehead
Nov 19 at 19:35














that didn't work neither -- make test: [exception]: Executing test client: couldn't open socket: no buffer space available. couldn't open socket: no buffer space available...
– Firehead
Nov 19 at 22:14




that didn't work neither -- make test: [exception]: Executing test client: couldn't open socket: no buffer space available. couldn't open socket: no buffer space available...
– Firehead
Nov 19 at 22:14












try run redis-cli in command-line to check installation.. Redis socket you may setup separately (this is another question related redis setup. Example: guides.wp-bullet.com/…)
– S_Flash
Nov 20 at 6:31






try run redis-cli in command-line to check installation.. Redis socket you may setup separately (this is another question related redis setup. Example: guides.wp-bullet.com/…)
– S_Flash
Nov 20 at 6:31












Firehead is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















Firehead is a new contributor. Be nice, and check out our Code of Conduct.













Firehead is a new contributor. Be nice, and check out our Code of Conduct.












Firehead is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1094299%2finstall-redis-server-on-ubuntu-16-04-lts-minimal%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

 ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕