栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Centos7下JDK等安装记录

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Centos7下JDK等安装记录


Nginx
第一步 - 添加Nginx存储库
要添加CentOS 7 EPEL仓库,请打开终端并使用以下命令:
sudo yum install epel-release
第二步 - 安装Nginx
现在Nginx存储库已经安装在您的服务器上,使用以下yum命令安装Nginx :
sudo yum install nginx
在对提示回答yes后,Nginx将在服务器上完成安装。
第三步 - 启动Nginx
Nginx不会自行启动。要运行Nginx,请输入:
sudo systemctl start nginx

方法一:源文件安装(推荐安装)

在CentOS和Red Hat系统中,首先添加EPEL仓库,然后更新yum源:

sudo yum install epel-release
sudo yum update
然后安装Redis数据库:

sudo yum -y install redis
安装好后启动Redis服务即可:

sudo systemctl start redis
这里同样可以使用redis-cli进入Redis命令行模式操作。

另外,为了可以使Redis能被远程连接,需要修改配置文件,路径为/etc/redis.conf

vi /etc/redis.conf
需要修改的地方:

首先,注释这一行:

#bind 127.0.0.1
另外,推荐给Redis设置密码,取消注释这一行:

#requirepass foobared

foobared即当前密码,可以自行修改为

requirepass 密码
然后重启Redis服务,使用的命令如下:

sudo systemctl restart redis

systemctl start redis.service #启动redis服务器

systemctl stop redis.service #停止redis服务器

systemctl restart redis.service #重新启动redis服务器

systemctl status redis.service #获取redis服务器的运行状态

systemctl enable redis.service #开机启动redis服务器

systemctl disable redis.service #开机禁用redis服务器

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/881730.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号