首页 > 系统 > Ubuntu > 正文

ubuntu14.04源码安装redis-2.8.19

2024-06-28 13:22:18
字体:
来源:转载
供稿:网友
Ubuntu14.04源码安装redis-2.8.19

下载安装redis2.8.19的源码

$ wget http://download.redis.io/releases/redis-2.8.19.tar.gz$ tar xzf redis-2.8.19.tar.gz$ cd redis-2.8.19$ make && make install

使用命令src/redis-server 如果显示如下就说明初步安装成功,接下来就自定一下配置

                _._                                                             _.-``__ ''-._                                                   _.-``    `.  `_.  ''-._           Redis 2.8.19 (00000000/0) 64 bit  .-`` .-```.  ```//    _.,_ ''-._                                    (    '      ,       .-`  | `,    )     Running in stand alone mode |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379 |    `-._   `._    /     _.-'    |     PID: 15629  `-._    `-._  `-./  _.-'    _.-'                                    |`-._`-._    `-.__.-'    _.-'_.-'|                                   |    `-._`-._        _.-'_.-'    |           http://redis.io          `-._    `-._`-.__.-'_.-'    _.-'                                    |`-._`-._    `-.__.-'    _.-'_.-'|                                   |    `-._`-._        _.-'_.-'    |                                    `-._    `-._`-.__.-'_.-'    _.-'                                         `-._    `-.__.-'    _.-'                                                 `-._        _.-'                                                         `-.__.-'                                               
进入$ cd utils执行$ sudo ./install_server.sh#以下配置是个人配置,不一定要一样,个人喜欢,全用系统默认的配置也行Welcome to the redis service installerThis script will help you easily set up a running redis serverPlease select the redis port for this instance: [6379] #/redis使用的默认端口Selecting default: 6379Please select the redis config file name [/etc/redis/6379.conf] /etc/redis/redis.conf  #配置文件Please select the redis log file name [/var/log/redis_6379.log] /var/log/redis/redis.log #日志文件Please select the data directory for this instance [/var/lib/redis/6379]                     Selected default - /var/lib/redis/6379Please select the redis executable path [/usr/local/bin/redis-server] #可执行文件Selected config:Port           : 6379Config file    : /etc/redis/redis.confLog file       : /var/log/redis/redis.logData dir       : /var/lib/redis/6379Executable     : /usr/local/bin/redis-serverCli Executable : /usr/local/bin/redis-cliIs this ok? Then PRess ENTER to go on or Ctrl-C to abort.Copied /tmp/6379.conf => /etc/init.d/redis_6379Installing service...Adding system startup for /etc/init.d/redis_6379 .../etc/rc0.d/K20redis_6379 -> ../init.d/redis_6379/etc/rc1.d/K20redis_6379 -> ../init.d/redis_6379/etc/rc6.d/K20redis_6379 -> ../init.d/redis_6379/etc/rc2.d/S20redis_6379 -> ../init.d/redis_6379/etc/rc3.d/S20redis_6379 -> ../init.d/redis_6379/etc/rc4.d/S20redis_6379 -> ../init.d/redis_6379/etc/rc5.d/S20redis_6379 -> ../init.d/redis_6379Success!Starting Redis server...Installation successful!

至此,安装完后,redis就可以如同apt-get install那样方便地使用

启动$ service redis_6379 start停止$ service redis_6379 stop重启$ service redis_6379 restart与redis交互$ redis-cli


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表