Ubuntu 16.04.1 LTS Redis installation configuration

Source: Internet
Author: User

Compile and install:
Apt-get Update
Apt-get Install build-essential tcl
wget http://download.redis.io/redis-stable.tar.gz
Tar XF redis-stable.tar.gz
CD Redis-stable;make;make Install

Configuration file:
Cp/root/work/redis-stable/redis.conf/etc/redis
Vi/etc/redis/redis.conf
Supervised SYSTEMD
Dir/data/redis

Startup script:
Vi/etc/systemd/system/redis.service
[Unit]
Description=redis in-memory Data Store
After=network.target

[Service]
User=redis
Group=redis
Execstart=/usr/local/bin/redis-server/etc/redis/redis.conf
EXECSTOP=/USR/LOCAL/BIN/REDIS-CLI shutdown
Restart=always

[Install]
Wantedby=multi-user.target

Users and Groups:
AddUser--system--group--no-create-home Redis

Directories and Permissions:
Mkdir/data/redis
Chown Redis:redis/data/redis
chmod 770/data/redis

Start and close:
Systemctl Start Redis
Systemctl Status Redis
Systemctl Stop Redis
Systemctl Restart Redis

Test Redis:
Redis-cli
127.0.0.1:6379> Ping
PONG

After the tests have passed, set the boot up to start Redis:
Systemctl Enable Redis

Ubuntu 16.04.1 LTS Redis installation configuration

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.