[轉載]Redis後台啟動

來源:互聯網
上載者:User

標籤:http   io   ar   os   sp   for   strong   on   div   

FROM: http://www.art-coder.com/2011/12/01/how-to-run-redis-server-as-daemon/

How to run Redis server as daemon

So I think, that those who will read this article probably know, what is Redis. For those who don‘t I can say shortly, that this is a software, that is used for storing some maped data ( key => value ) for faster usage. This software could help developers to make their applications by storing some primitive data like for example translations on multi-language webpage or other similar information. In this article I will shortly explain how to make your Redis server run as daemon, since making startup file for this in unix is not an option.

First obviously you need to get it and unpack. It is all explained on official Redis webpage, but for those who want to stay in one place I will explain it here.

Sort of installation

Download, extract and compile Redis with:
$ wget http://redis.googlecode.com/files/redis-2.4.4.tar.gz
$ tar xzf redis-2.4.4.tar.gz
$ cd redis-2.4.4
$ make

So now when everything is ready for starting server comes the part with creating a daemon from this.
Make sure you are in redis directory and do the following:
vim redis.conf

And after that just change ‘no‘ to ‘yes‘ in line with daemonize option
# By default Redis does not run as a daemon. Use ‘yes‘ if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize yes

After you saved file with this change just start server:
$ src/redis-server

This is it. Now you can look it up by typing ps aux and you will see it as a deamon process there.

[轉載]Redis後台啟動

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.