当前位置:网站首页>Linux下安装Redis,并配置环境
Linux下安装Redis,并配置环境
2022-07-01 18:46:00 【小山学Java】
网上的方法多种多样,我也是看了好多种方式,最终还是决定自己写一个安装流程,方便以后忘记了查看使用。
安装Redis
【1】http://download.redis.io/releases/redis-5.0.3.tar.gz`
【2】yum install wget
【3】创建一个文件夹 mkdir soft
【4】 wget http://download.redis.io/releases/redis-5.0.3.tar.gz
【5】解压 tar xf redis-5.0.3.tar.gz
【6】yum install gcc
make distclean # 清除一些,残余信息
【7】make
【8】make install PREFIX=/opt/wukong/redis5
【9】vi /etc/profile 配置环境变量
export REDIS_HOME=/opt/wukong/redis5
export PATH=$PATH:$REDIS_HOME/bin
【10】执行刚才修改的初始化文档
source /etc/profile
echo $PATH
【11】重点 一定要读
[[email protected] utils]# ./install_server.sh
#来到了redis 服务实例
Welcome to the redis service installer
This script will help you easily set up a running redis server
# 选择一个redis端口号在这个实例
Please select the redis port for this instance: [6379] #6380 自定义端口号
# 选择默认端口号为 6379
Selecting default: 6379
# redis配置的名字为6479.conf 意味着可以创建多个不同名的redis 实例
Please select the redis config file name [/etc/redis/6379.conf]
# redis实例默认的存放位置
Selected default - /etc/redis/6379.conf
# 默认redis日志名字
Please select the redis log file name [/var/log/redis_6379.log] Selected default - /var/log/redis_6379.log
# 缓存的持久化磁盘位置
Please select the data directory for this instance [/var/lib/redis/6379]
Selected default - /var/lib/redis/6379
Please select the redis executable path [/opt/wukong/redis5/bin/redis-server]
# 配置信息
Selected config:
Port : 6379
Config file : /etc/redis/6379.conf
Log file : /var/log/redis_6379.log
Data dir : /var/lib/redis/6379
Executable : /opt/wukong/redis5/bin/redis-server
Cli Executable : /opt/wukong/redis5/bin/redis-cli
Is this ok? Then press ENTER to go on or Ctrl-C to abort.
# 开机自启动设置,复制到 /etc/init.d/redis_6379
Copied /tmp/6379.conf => /etc/init.d/redis_6379
Installing service...
Successfully added to chkconfig!
Successfully added to runlevels 345!
# 启动redis服务
Starting Redis server...
Installation successful!
=================================
[[email protected] utils]# cd /etc/init.d/
[[email protected] init.d]# ls
functions netconsole network README redis_6379 # redis_6379执行 redis_6379的脚本文件
【12】ps -fe | gref redis
查看redis进程## 安装Redis
边栏推荐
- 利用win7漏洞进行系统登录密码破解
- 解决VSCode下载慢或下载失败的问题
- Axure does not display catalogs
- 为什么一定要从DevOps走向BizDevOps?
- Oracle物理体系结构
- Dom4j parsing XML, XPath retrieving XML
- Ubuntu14 install MySQL and configure root account local and remote access
- Les canaux de culture intensive s'efforcent de développer Fu Xin et Wei Shi jiajie pour organiser une conférence de formation sur les nouveaux produits
- 正则表达式=Regex=regular expression
- Test self-study people must see: how to find test items in software testing?
猜你喜欢
Parallelism, concurrency and life cycle of threads
SIP protocol of gb28181
为什么一定要从DevOps走向BizDevOps?
Summary of SQL query de duplication statistics methods
解决VSCode下载慢或下载失败的问题
Why has instagram changed from a content sharing platform to a marketing tool? How do independent sellers use this tool?
测试自学人必看:软件测试如何找测试项目?
Uni app product classification
Shell advanced
GC垃圾回收
随机推荐
Summary of SQL query de duplication statistics methods
Ffmpeg audio related commands
Oracle物理体系结构
DTD modeling
Basic use of MySQL
商业智能BI开发和报表开发有什么本质区别?
IPv4 address, subnet mask, gateway
ES6中的代理proxy
研究了11种实时聊天软件,我发现都具备这些功能…
Bao, what if the O & M 100+ server is a headache? Use Xingyun housekeeper!
MySQL signale une erreur can 't create table' demo01. TB Étudiant '(errno: 150)
Thesis reading [distinctive late semantic graph for video capturing]
brpc理解
GC垃圾回收
Basic knowledge of audio coding and decoding
简版拼多多商品数据
安装sharp报错
【sql优化】with as 和 临时表的区别
Opencv video quality diagnosis - VIDEO occlusion diagnosis
事务隔离级别 gap锁 死锁