Install Redis in Ubuntu and start it with the Init script

Source: Internet
Author: User
Install Redis in Ubuntu and use the Init script to start & amp; add and delete the ubuntu auto-Start Service 1. Download and install: cd/tmpwgethttp: // uninstall

Install Redis in Ubuntu and start it with the Init script & add and delete the ubuntu auto-Start Service

1. Download and install:
 
Cd/tmp
Wget http://redis.googlecode.com/files/redis-#.*.tar.gz
Tar-zxf redis-*. *. * .tar.gz
Cd redis -*.*.*
Make
Sudo make install
 
2. Configure the init script:
 
Wget https://github.com/ijonas/dotfiles/raw/master/etc/init.d/redis-server
Wget https://github.com/ijonas/dotfiles/raw/master/etc/redis.conf
Sudo mv redis-server/etc/init. d/redis-server
Sudo chmod + x/etc/init. d/redis-server
Sudo mv redis. conf/etc/redis. conf
 
3. initialize the user and Log Path
 
Sudo useradd redis
Sudo mkdir-p/var/lib/redis
Sudo mkdir-p/var/log/redis
Sudo chown redis. redis/var/lib/redis
Sudo chown redis. redis/var/log/redis
 
4. Start Redis:
 
Sudo/etc/init. d/redis-server start
 
Add a service # sudo update-rc.d service name defaults 99 delete a service # sudo update-rc.d service name remove temporarily restart a service #/etc/init. d/service name restart temporarily closes a service #/etc/init. d/service name stop start a service temporarily #/etc/init. d/service name start

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.