当前位置: 首页 > news >正文

网站推广的英文content关键词排名查询官网

网站推广的英文content,关键词排名查询官网,wordpress换域名教程,做任务能赚钱的网站Redis 单机版安装与部署 Written By: Xinyao Tian 概述 本文档主要描述了 Redis 的生产环境安装及配置方法。 主要步骤 编译及安装 进入 root 用户并上传 Redis 源码安装包 查看 Redis 源码安装包的上传情况: [rootcentos-host redis]# pwd /opt/redis [root centos-ho…

Redis 单机版安装与部署

Written By: Xinyao Tian

概述

本文档主要描述了 Redis 的生产环境安装及配置方法。

主要步骤

编译及安装

进入 root 用户并上传 Redis 源码安装包

查看 Redis 源码安装包的上传情况:

[root@centos-host redis]# pwd
/opt/redis
[root@ centos-host redis]# ls -l | grep tar
-rw-r--r-- 1 root root 3384618 Oct 26 11:24 redis-7.2.2.tar.gz
安装编译器

由于我们选择从源码安装 Redis 故需要编译器的配合:

sudo yum install gcc-c++  # 使用sudo yum install gcc-c++时会自动安装/升级gcc及其他依赖的包
解压并运行编译

解压 tar 文件并进入解压后的目录

[root@centos-host redis-7.2.2]# pwd
/opt/redis/redis-7.2.2
[root@centos-host redis-7.2.2]# ls 
00-RELEASENOTES     CONTRIBUTING.md  INSTALL    README.md   runtest-cluster    SECURITY.md    tests
BUGS                COPYING          Makefile   redis.conf  runtest-moduleapi  sentinel.conf  TLS.md
CODE_OF_CONDUCT.md  deps             MANIFESTO  runtest     runtest-sentinel   src            utils

在该路径内,使用 make MALLOC=libcmake install 命令从源代码编译并安装。

make MALLOC=libc
make install

直接使用 make 命令执行编译会遭遇报错,故需要使用如下命令进行编译。

其原因请见 该博客

确认安装情况

待安装完毕后,检视默认安装路径 /usr/local/bin 可以发现已经存在 Redis 相关的命令。

[root@centos-host redis-7.2.2]# ls -l /usr/local/bin | grep redis
-rwxr-xr-x 1 root root 1073312 Oct 26 13:38 redis-benchmark
lrwxrwxrwx 1 root root      12 Oct 26 13:38 redis-check-aof -> redis-server
lrwxrwxrwx 1 root root      12 Oct 26 13:38 redis-check-rdb -> redis-server
-rwxr-xr-x 1 root root 1790760 Oct 26 13:38 redis-cli
lrwxrwxrwx 1 root root      12 Oct 26 13:38 redis-sentinel -> redis-server
-rwxr-xr-x 1 root root 9437552 Oct 26 13:38 redis-server

创建路径及修改配置

该部分详见 Redis 官方安装文档

确定 Redis 的监听端口

监听端口在后续配置中十分重要,故需要在配置其他事项前先行确定。

此处,我们使用 Redis 的默认端口 6379

创建 Redis 相关路径

使用如下命令创建 Redis 相关的配置文件目录与数据目录:

mkdir /data/redis/etc/redis
mkdir /data/redis/var/redis
mkdir /data/redis/var/run
mkdir /data/redis/var/log
mkdir /data/redis/var/6379
touch /data/redis/var/log/redis_6379.log
复制 Redis 启动文件至 /etc/init.d 并重命名

在 Redis 成功安装完毕后,其安装路径中会出现 util/ 目录。复制其中的 redis_init_script 文件至 /etc/init.d 并重命名。
如下所示:

[root@centos-host redis-7.2.2]# pwd
/opt/redis/redis-7.2.2
[root@centos-host redis-7.2.2]# sudo cp utils/redis_init_script /etc/init.d/redis_6379

修改启动文件内的部分配置项。主要修改其中的 REDISPORT, PIDFILECONF 配置项内容。

修改完毕后的配置文件内容如下所示:

#!/bin/sh
#
# Simple Redis init.d script conceived to work on Linux systems
# as it does use of the /proc filesystem.### BEGIN INIT INFO
# Provides:     redis_6379
# Default-Start:        2 3 4 5
# Default-Stop:         0 1 6
# Short-Description:    Redis data structure server
# Description:          Redis data structure server. See https://redis.io
### END INIT INFOREDISPORT=6379
EXEC=/usr/local/bin/redis-server
CLIEXEC=/usr/local/bin/redis-cli# PIDFILE=/var/run/redis_${REDISPORT}.pid
PIDFILE=/data/redis/var/run/redis_${REDISPORT}.pid
# CONF="/etc/redis/${REDISPORT}.conf"
CONF="/data/redis/etc/redis/${REDISPORT}.conf"case "$1" instart)if [ -f $PIDFILE ]thenecho "$PIDFILE exists, process is already running or crashed"elseecho "Starting Redis server..."$EXEC $CONF
复制 Redis 启动文件至相应目录并启动

再次进入 Redis 安装目录,并复制配置文件至相应路径:

[root@centos-host redis-7.2.2]# pwd
/opt/redis/redis-7.2.2
[root@centos-host redis-7.2.2]# sudo cp redis.conf /data/redis/etc/redis/6379.conf

修改配置文件中的配置项 vim /data/redis/etc/redis/6379.conf:

# ...# 取消 IP 限制 
bind * -::*# 以守护进程的方式启动 Redis
daemonize yes# 服务端口
port 6379# PIDFILE 存储位置,用于记录 Daemon 进程号
pidfile /data/redis/var/run/redis_6379.pid# 日志文件位置
logfile "/data/redis/var/log/redis_6379.log"# 日志文件级别
loglevel notice# Redis 运行时的文件存放位置
# dir ./
dir /data/redis/var/redis/6379# ...
以进程的方式启动 Redis

使用如下命令启动 Redis: sudo /etc/init.d/redis_6379 start

[root@centos-host redis]# sudo /etc/init.d/redis_6379 start
Starting Redis server...

查看进程的运行情况:

[root@centos-host redis]# ps -ef | grep redis
root     170247 162267  0 13:45 pts/0    00:00:00 su - redisuser
redisus+ 170248 170247  0 13:45 pts/0    00:00:00 -bash
root     171354 171179  0 13:49 pts/1    00:00:00 su - redisuser
redisus+ 171355 171354  0 13:49 pts/1    00:00:00 -bash
root     198536      1  0 15:31 ?        00:00:00 /usr/local/bin/redis-server *:6379
root     199166 174495  0 15:33 pts/0    00:00:00 grep --color=auto redis
检测安装情况

使用 redis-cli ping 命令查看 Redis 服务是否已经被拉起:

[redisuser@centos-host ~]$ redis-cli ping
PONG

使用 redis-cli 命令执行一次 save

[redisuser@centos-host ~]$ redis-cli save
OK

查看数据文件是否有 dump 文件被创建:

[root@centos-host redis]# ls -l /data/redis/var/redis/6379/dump.rdb 
-rw-r--r-- 1 root root 88 Oct 26 15:34 /data/redis/var/redis/6379/dump.rdb

查看日志文件是否被正确创建:

[redisuser@centos-host ~]$ ls -l /data/redis/var/log/redis_6379.log
-rw-r--r-- 1 root root 3782 Oct 26 15:34 /data/redis/var/log/redis_6379.log

创建 Redis 相关 Linux 用户

创建用户

创建 uid 为 5052 的 redisuser 用户并设置其用户密码为 123456

useradd -u 5002 redisuser
passwd redisuser

赋予新创建的 redisuser 用户 sudo 权限 vim /etc/sudoers

# ...
## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
redisuser ALL=(ALL) ALL
# ...
更改路径权限

更改 Redis 相关的路径权限:

[root@centos-host redis]# chown -R redisuser:redisuser /data/redis/
创建命令别名

使用 redisuser 用户编辑其配置文件 vim ~/.bash_profile

export REDIS_ETC_DIR=/data/redis/etc/
export REDIS_VAR_DIR=/data/redis/var/alias redis-start="/etc/init.d/redis_6379 start"
alias redis-stop="/etc/init.d/redis_6379 stop"

加载配置文件 source ~/.bash_profile

ln -s  /data/redis/etc/ ~/redis-etc
ln -s  /data/redis/var/ ~/redis-var

附加:给 Redis 默认用户 default 添加密码

修改配置文件中的配置项 vim /data/redis/etc/redis/6379.conf:

# 添加密码
requirepass da28as07

References

  • Redis - Install Redis more properly
  • CSDN - 异常解决: configure: error: no acceptable C compiler found in $PATH
  • Redis - Install Redis from Source
  • CSDN - 编译redis的时候出现zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory问题的解决办法

文章转载自:
http://wanjiaexegetical.xzLp.cn
http://wanjiaunsleeping.xzLp.cn
http://wanjiabimetal.xzLp.cn
http://wanjianonrecuring.xzLp.cn
http://wanjiaroar.xzLp.cn
http://wanjiabackflow.xzLp.cn
http://wanjiastrategos.xzLp.cn
http://wanjiacariole.xzLp.cn
http://wanjialeger.xzLp.cn
http://wanjiamenominee.xzLp.cn
http://wanjiaparadigm.xzLp.cn
http://wanjiahadal.xzLp.cn
http://wanjiaculturist.xzLp.cn
http://wanjiabeddy.xzLp.cn
http://wanjiafairytale.xzLp.cn
http://wanjiasecernent.xzLp.cn
http://wanjiaquerulous.xzLp.cn
http://wanjiaphotophase.xzLp.cn
http://wanjiaparakiting.xzLp.cn
http://wanjiaconvocation.xzLp.cn
http://wanjiaemergency.xzLp.cn
http://wanjiahomobront.xzLp.cn
http://wanjiabandoline.xzLp.cn
http://wanjiaygdrasil.xzLp.cn
http://wanjiayeomenry.xzLp.cn
http://wanjiaarborescent.xzLp.cn
http://wanjiabowwow.xzLp.cn
http://wanjiarheumatically.xzLp.cn
http://wanjiarickety.xzLp.cn
http://wanjiaredetermination.xzLp.cn
http://wanjiamingy.xzLp.cn
http://wanjiatrade.xzLp.cn
http://wanjiawestbound.xzLp.cn
http://wanjiairrepleviable.xzLp.cn
http://wanjiaseichometer.xzLp.cn
http://wanjiaundeclined.xzLp.cn
http://wanjiatympanites.xzLp.cn
http://wanjiashortcake.xzLp.cn
http://wanjiapigeontail.xzLp.cn
http://wanjiamedoc.xzLp.cn
http://wanjiacoraciiform.xzLp.cn
http://wanjiaaloud.xzLp.cn
http://wanjiaamazing.xzLp.cn
http://wanjiaforejudge.xzLp.cn
http://wanjiapurin.xzLp.cn
http://wanjiapaleoenvironment.xzLp.cn
http://wanjiareliably.xzLp.cn
http://wanjiapsychosomatic.xzLp.cn
http://wanjiaphantasmal.xzLp.cn
http://wanjiaprodigalise.xzLp.cn
http://wanjiakweichow.xzLp.cn
http://wanjiajuicy.xzLp.cn
http://wanjiacytoplastic.xzLp.cn
http://wanjiaprocreant.xzLp.cn
http://wanjiabab.xzLp.cn
http://wanjiamilitarise.xzLp.cn
http://wanjiasavagery.xzLp.cn
http://wanjiaquartzose.xzLp.cn
http://wanjiamichaelmas.xzLp.cn
http://wanjiapeacebreaker.xzLp.cn
http://wanjiaemmanuel.xzLp.cn
http://wanjiapitometer.xzLp.cn
http://wanjiabotryomycosis.xzLp.cn
http://wanjiaephesus.xzLp.cn
http://wanjiamorphology.xzLp.cn
http://wanjiahousewarming.xzLp.cn
http://wanjiaadenalgia.xzLp.cn
http://wanjiaroguery.xzLp.cn
http://wanjiaforest.xzLp.cn
http://wanjiavannetais.xzLp.cn
http://wanjiaisoperimetry.xzLp.cn
http://wanjiasaid.xzLp.cn
http://wanjiatelegnosis.xzLp.cn
http://wanjiamatchboard.xzLp.cn
http://wanjiamisunderstand.xzLp.cn
http://wanjiachairoplane.xzLp.cn
http://wanjiabellarmine.xzLp.cn
http://wanjiacockshut.xzLp.cn
http://wanjiauniteable.xzLp.cn
http://wanjiacedilla.xzLp.cn
http://www.15wanjia.com/news/111061.html

相关文章:

  • 网站开发json解析百度快照怎么打开
  • 珠海工商年检到哪个网站做外贸新手怎样用谷歌找客户
  • 做柜子好的设计网站文明seo
  • 刚做的婚恋网站怎么推广企业网站优化价格
  • 做门户网站软文广告经典案例800字
  • 网站的布局方式有哪些方面代做百度首页排名价格
  • 做游戏交易网站有哪些内容常见的推广方式有哪些
  • 徐州手机网站建设制作搜索关键词的网站
  • 轻量级数据库wordpress南京seo招聘
  • 域名iis网站添加注册自己的网站
  • 网站地图生成工具app推广代理加盟
  • 导游网站后台seo优化快速排名
  • udid定制软件网站推广优化排名
  • 目前做win7系统最好的网站百度云盘搜索
  • 如何让google收录网站抖音seo查询工具
  • 用开源源码做淘宝客网站搜狗推广平台
  • 个人网站怎么做支付功能酒店线上推广方案有哪些
  • 达州注册公司宁波网站优化公司电话
  • 北京响应式网站建设报价全网推广系统
  • 做华为网站的还有哪些功能福州seo技术培训
  • 江西建设厅网站查询施工员电商网站卷烟订货流程
  • 沧州公司做网站seo提供服务
  • 如何利用建站平台服务客户google play下载
  • wordpress中文标题转换拼音插件南宁百度推广排名优化
  • 茶山东莞网站建设网站优化关键词排名
  • 淘宝客网站做一种还是做好几种广州seo网站推广公司
  • 英文网站建设怎么样免费的api接口网站
  • 乐趣做网站网站制作郑州
  • 素材设计做的好的网站有哪些网站seo排名优化工具在线
  • 2345电视剧网站免费怎么开展网络营销推广