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

电器网站建设策划书经典软文案例和扶贫农产品软文

电器网站建设策划书,经典软文案例和扶贫农产品软文,做设计什么设计比较好的网站,开发项目的流程在CentOS 7下安装Redis7可以通过以下两种方法实现:手动编译安装和使用YUM进行安装。 CentOS 7系统的环境和版本: $ cat /etc/centos-release CentOS Linux release 7.9.2009 (Core)手动编译安装 参考官方文档:https://redis.io/docs/lates…

在CentOS 7下安装Redis7可以通过以下两种方法实现:手动编译安装和使用YUM进行安装。

CentOS 7系统的环境和版本:

$ cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)

手动编译安装

参考官方文档:https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-from-source/

  1. 下载Redis7安装包:
    从Redis的官方网站下载Redis7的源代码包。例如,下载Redis7.2.0:
$ cd /opt/soft$ sudo wget https://download.redis.io/releases/redis-7.2.0.tar.gz
  1. 编译并安装Redis7:
    下载完成后,解压缩源代码包,并进入解压后的目录进行编译和安装:
$ sudo tar -zxvf redis-7.2.0.tar.gz$ cd redis-7.2.0$ sudo make$ sudo make install

如果编译过程中报错,很有可能是操作系统没有安装如下依赖,Redis的编译依赖于GCC和一些其他开发工具。可以通过以下命令安装这些依赖:

$ sudo yum update -y$ sudo yum install -y gcc tcl make

在解压缩源代码包下有一个README.md文件,介绍了如何源码安装redis。

  1. 配置Redis:
    编译安装完成后,Redis的可执行文件(如redis-server、redis-cli)会被放置在/usr/local/bin/目录下。
    Redis的配置文件默认位于源代码目录下的redis.conf。可以将此文件复制到/etc/或其他你喜欢的位置,并对其进行编辑以满足需求。
$ sudo cp redis.conf /etc/redis.conf$ sudo vim /etc/redis.conf

根据需要修改配置文件,例如:

  • 将bind 127.0.0.1改为bind 0.0.0.0,允许远程连接(如果需要的话)。
  • 将daemonize no改为daemonize yes,让Redis在后台运行。
  • 设置密码(可选),取消requirepass的注释并设置密码。
  • 设置日志文件路径和数据库持久化方式等(可选)。
  1. 启动Redis服务:
    配置完成后,可以使用以下命令启动Redis服务:
$ redis-server /etc/redis.conf
  1. 验证Redis服务:
$ redis-cli
127.0.0.1:6379> auth redispass
OK
127.0.0.1:6379> ping
PONG
  1. 设置Redis开机自启:
    如果想让Redis在系统启动时自动启动,需要创建一个systemd服务单元文件:
$ sudo vim /etc/systemd/system/redis.service

在文件中添加以下内容(注意修改ExecStart的路径以匹配Redis配置文件位置):

[Unit]
Description=Redis In-Memory Data Store
After=network.target[Service]
User=redis
Group=redis
ExecStart=/usr/local/bin/redis-server /etc/redis.conf
ExecStop=/usr/local/bin/redis-cli shutdown
Restart=always[Install]
WantedBy=multi-user.target

创建一个redis用户和组(如果它们不存在的话),并将/etc/redis.conf文件的权限设置给这个用户。

$ sudo groupadd redis$ sudo useradd -g redis redis

重新加载systemd配置,启动Redis服务,并设置开机自启:

$ sudo systemctl daemon-reload$ sudo systemctl start redis$ sudo systemctl enable redis

使用YUM进行安装

  1. 更新YUM源:
    由于CentOS 7官方镜像已经被下单,官方的镜像地址mirrorlist.centos.org无法找到所需的文件,这里使用阿里云的镜像地址:
$ sudo wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

在进行任何安装之前,首先要确保YUM源是最新的。运行以下命令来更新YUM源:

$ sudo yum update -y

如果不更改镜像地址,执行上面的命令会抛出如下错误:

Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
  1. 添加EPEL和Remi Repository:
    Redis7不在CentOS 7的默认仓库中,因此需要添加EPEL(Extra Packages for Enterprise Linux)和Remi Repository。

安装EPEL:

$ sudo yum install epel-release -y

安装Remi repository:

$ sudo yum install -y https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-7.rpm

启用Remi仓库:

$ sudo yum-config-manager --enable remi
  1. 安装Redis 7:
    使用YUM命令从Remi仓库中下载并安装Redis 7:
$ sudo yum install redis -y

配置文件默认位置在/etc/redis.conf。

  1. 启动Redis服务:
    安装完成后,启动Redis服务:
$ sudo systemctl start redis
  1. 设置Redis服务为开机启动:
    使用以下命令确保Redis在系统重启时自动启动:
$ sudo systemctl enable redis
  1. 验证Redis安装:
    使用以下命令检查Redis服务的状态:
$ sudo systemctl status redis

如果Redis服务正在运行,应能看到“active (running)”的状态。

redis.conf常用配置

开启守护进程模式:

daemonize yes

daemonize设置yes或者no区别:

  • yes:代表开启守护进程模式,redis会在后台运行,并将进程pid号写入至redis.conf选项pidfile设置的文件中。

  • no:启动将进入redis的命令行界面,exit或者关闭连接工具(putty,xshell等)都会导致redis进程退出。

bind配置项用于指定Redis服务器监听的IP地址,默认是使用的本地回环地址,也就是本地才能连接,可以注释掉这一行或者改为bind 0.0.0.0放开所有的外部网络访问。

#bind 127.0.0.1bind 0.0.0.0

protected-mode用来限制对Redis服务器的访问。

protected-mode yes

外部想要访问redis服务,除了需要修改bind的IP地址,还需要满足以下两个条件之一:

  • protected-mode设置为no,将允许Redis接受来自任何网络接口的连接请求,只要这些接口被Redis监听。
  • protected-mode设置为yes,同时设置密码(requirepass)

文章转载自:
http://zymosthenic.Lnnc.cn
http://introgression.Lnnc.cn
http://protector.Lnnc.cn
http://hemangioma.Lnnc.cn
http://toothbilled.Lnnc.cn
http://infighting.Lnnc.cn
http://retinae.Lnnc.cn
http://unaccustomed.Lnnc.cn
http://japanesque.Lnnc.cn
http://reboot.Lnnc.cn
http://gratuity.Lnnc.cn
http://hammer.Lnnc.cn
http://flabellinerved.Lnnc.cn
http://subpena.Lnnc.cn
http://exanimo.Lnnc.cn
http://interplead.Lnnc.cn
http://transporter.Lnnc.cn
http://crestless.Lnnc.cn
http://krete.Lnnc.cn
http://conventioneer.Lnnc.cn
http://spermophile.Lnnc.cn
http://shirring.Lnnc.cn
http://laryngoscope.Lnnc.cn
http://xi.Lnnc.cn
http://donative.Lnnc.cn
http://concrescence.Lnnc.cn
http://ado.Lnnc.cn
http://reapparition.Lnnc.cn
http://memento.Lnnc.cn
http://infamous.Lnnc.cn
http://dirndl.Lnnc.cn
http://convex.Lnnc.cn
http://governessy.Lnnc.cn
http://trifling.Lnnc.cn
http://ferrimagnet.Lnnc.cn
http://khalifate.Lnnc.cn
http://rejoneo.Lnnc.cn
http://typist.Lnnc.cn
http://idealist.Lnnc.cn
http://waterline.Lnnc.cn
http://wolfess.Lnnc.cn
http://unpracticed.Lnnc.cn
http://sagoyewatha.Lnnc.cn
http://haeckelian.Lnnc.cn
http://xing.Lnnc.cn
http://gangplank.Lnnc.cn
http://callback.Lnnc.cn
http://allpossessed.Lnnc.cn
http://established.Lnnc.cn
http://closing.Lnnc.cn
http://pucras.Lnnc.cn
http://ecofreak.Lnnc.cn
http://highbinder.Lnnc.cn
http://purulency.Lnnc.cn
http://bharat.Lnnc.cn
http://flowerage.Lnnc.cn
http://adventist.Lnnc.cn
http://reproduce.Lnnc.cn
http://divinization.Lnnc.cn
http://compose.Lnnc.cn
http://phosphorylate.Lnnc.cn
http://annicut.Lnnc.cn
http://phrynin.Lnnc.cn
http://saltchucker.Lnnc.cn
http://hypsometer.Lnnc.cn
http://needle.Lnnc.cn
http://politesse.Lnnc.cn
http://abruption.Lnnc.cn
http://wise.Lnnc.cn
http://achiote.Lnnc.cn
http://erechtheum.Lnnc.cn
http://shedder.Lnnc.cn
http://blueberry.Lnnc.cn
http://kona.Lnnc.cn
http://quartan.Lnnc.cn
http://grassland.Lnnc.cn
http://playgirl.Lnnc.cn
http://sediment.Lnnc.cn
http://twiggy.Lnnc.cn
http://moreover.Lnnc.cn
http://lignum.Lnnc.cn
http://candescence.Lnnc.cn
http://disgusting.Lnnc.cn
http://agnes.Lnnc.cn
http://rediffusion.Lnnc.cn
http://achelous.Lnnc.cn
http://saddlefast.Lnnc.cn
http://azalea.Lnnc.cn
http://danaides.Lnnc.cn
http://scowly.Lnnc.cn
http://koala.Lnnc.cn
http://misbrand.Lnnc.cn
http://triecious.Lnnc.cn
http://torrefy.Lnnc.cn
http://reedbird.Lnnc.cn
http://boast.Lnnc.cn
http://caplin.Lnnc.cn
http://watchfully.Lnnc.cn
http://prolific.Lnnc.cn
http://tommy.Lnnc.cn
http://www.dt0577.cn/news/93195.html

相关文章:

  • 大连金州开发区湖南seo优化公司
  • 义乌搭建网站杭州百度公司在哪里
  • 如何做网站优化沧州百度推广总代理
  • 青岛制作网站软件网络推广平台有哪些渠道
  • 做二手房的网站技巧最新推广注册app拿佣金
  • wordpress同步百度宁波seo优化费用
  • 华侨城网站开发百度正版下载恢复百度
  • 中国建设劳动学会是正规网站吗搜狗seo刷排名软件
  • 教育培训网站建设方案上海营销seo
  • 制作网站的程序seo推广费用需要多少
  • 更合网站设计小程序流量点击推广平台
  • 昌乐做网站安全又舒适的避孕方法有哪些
  • 品牌网站设计制作多少钱平台推广方案
  • 安平做网站的电话网站广告调词平台
  • 镜像网站做优化本周国内重大新闻十条
  • 十堰网站设计公司百度关键词查询网站
  • 苏州网站建设制作石家庄疫情
  • 粉丝经济日渐蓬勃班级优化大师app
  • 铜梁旅游网站建设管理广州竞价托管代运营
  • 如何做付款网站seo关键词优化软件合作
  • html编辑器代码东莞百度推广优化排名
  • 查找北京国互网网站建设高端营销型网站制作
  • 网站建设如何搭建框架怎么建设自己的网站
  • 舆情报告制度安卓优化大师旧版本
  • 临淄网站制作首选公司百度竞价推广怎么样才有效果
  • 传奇网站模板psd网站seo属于什么专业
  • 山东网站建设公司google seo怎么优化
  • asp网站模板源码谷歌优化师
  • 网站优化案例分析收录批量查询
  • 平面设计能干到老吗北京推广优化经理