systemctl

CentOS7.5下Redis5.0.5安装与配置

怎甘沉沦 提交于 2019-12-06 02:28:24
https://www.cnblogs.com/cdw0724/p/10876869.html 前言 安装Redis需要知道自己需要哪个版本,有针对性的安装。 比如如果需要redis GEO这个地理集合的特性,那么redis版本就不能低于3.2版本,由于这个特性是3.2版本才有的。 另外需要注意的是,Redis约定次版本号(即第一个小数点后的数字)为偶数的版本是稳定版(如2.8版、3.0版),奇数版本是非稳定版(如2.7版、2.9版),生产环境下一般需要使用稳定版本。 安装Redis官方是这么描述的:Download, extract and compile Redis with: 即:下载,解压,并且编译。 因此文档只做实验尝鲜,故安装官方最新版本redis5.0.5 步骤: 1.下载安装包 [root@CentOS7 opt]# pwd #查看当前目录,源码包下载在此目录下 /opt [root@CentOS7 opt]# wget http://download.redis.io/releases/redis-5.0.5.tar.gz 2.解压源码包 [root@CentOS7 opt]# tar -zxvf redis-5.0.5.tar.gz #解压会生成一个redis-5.0.5的目录 3.安装GCC依赖 [root@CentOS7 opt]# yum install

DNS 域名系统与邮件服务器

左心房为你撑大大i 提交于 2019-12-06 02:23:04
目录 DNS 域名系统 定义 域名分类 解析流程 DNS分类 资源记录 格式 资源记录类型 用 bind 搭建一台 DNS 服务器 安装 bind 创建自己的 zone 文件 在主配置文件中,增加自己的zone 检测是否配置成功 测试配置的结果 防火墙放行 在 RHEL2 上配置并测试 用 unbound搭建一个缓存服务器 安装 更改配置 防火墙放行 在 RHEL3 上将DNS服务器配置成缓存服务器 邮件服务器 电子邮件架构 邮件协议 电子邮件系统 搭建邮件系统 创建空的 Postfix 服务器 配置接收端 在 RHEL1 上发送 RHEL2 查看 配置客户端下载邮件 更改 RHEL2 上的 Postfix 配置 创建一个账号 配置 POP3 服务器 在物理机上打开 Foxmail 进行配置 DNS 域名系统 定义 域名系统是域名和IP地址相互映射的一个分布式数据库,能够是用户更方便的访问互联网。不用去记住能够被机器直接读取的IP。 域名分类 域是分层管理的 # 根域: [.] # 顶级域: 按性质: [.org\.net\.com\.edu\.gov] 按国家: [.cn\.tw\.hk] # 普通域 比如: [.baidu] 解析流程 本地DNS缓存 -> 本地hosts文件 -> 指定的DNS服务器 如果指定的DNS服务器没有找到对应的域名,会返回到客户端

Nginx + Lua 搭建网站WAF防火墙

六眼飞鱼酱① 提交于 2019-12-06 02:02:54
文章汇总: https://www.cnblogs.com/dotnetcrazy/p/9160514.html 目录: 前言 1.在线安装 1.1.修改yum源地址 1.2.在线安装Nginx 1.3.端口放行 1.4.验证安装 2.知识拓展 2.1.编译参数 2.2.安装目录 2.3.默认配置 2.4.systemctl配置 3.编译安装 3.1.安装编译环境 3.2.Nginx编译安装 3.2.1.下载解压 3.2.2.配置编译参数 3.2.3.进行编译安装 3.2.4.配置systemctl 3.2.5.端口放行 3.2.6.验证 3.3.编译安装Lua模块 大体思路 3.3.1.编译安装luajit并导入环境变量 3.3.2.共享lua动态库 3.3.3.配置nginx的编译参数 3.3.4.重新编译安装nginx 3.3.5.验证Lua模块 4.Nginx+Lua搭建WAF防火墙 4.1.环境 4.2.配置 4.3.生效 4.4.简单验证 4.5.CC验证 扩展:隐藏Nginx版本信息 前言 对于项目里面只是使用代理等常用功能,在线安装即可,如需制定化模块,则推荐编译安装 PS:本文不仅仅包含Nginx相关的知识点,还包含了逆天学习方法(对待新事物的处理) 官方网站: https://nginx.org/ Github: https://github.com/nginx

CentOS7

本秂侑毒 提交于 2019-12-05 23:43:58
问题1.无法使用鼠标选中、复制 解决: (1)安装gpm:yum install gpm* (2)启动gpm服务:service gpm start (3)将gpm服务添加到后台:systemctl enable gpm.service 问题2:ping www.baidu.com报connect: network is unreachable 解决: (1)修改/etc/sysconfig/network-scripts/ifcfg-[网络设备名]文件中的ONBOOT选项为yes (2)重启服务:service network restart 知识点1:CentOS7服务使用方法 (1)服务使用方法 systemctl start [服务文件名] systemctl restart [服务文件名] systemctl stop [服务文件名] systemctl status [服务文件名] (2)开机启动 systemctl enable [服务文件名] systemctl disable [服务文件名] 知识点2:安装wget 安装wget:yum install -y wget 来源: https://www.cnblogs.com/lyrb/p/11950897.html

centos7部署rabbitmq集群

大兔子大兔子 提交于 2019-12-05 19:51:25
#centos7部署rabbitmq集群 [root@linux-node1 yum.repos.d]# yum install rabbitmq-server -y [root@linux-node1 yum.repos.d]# systemctl enable rabbitmq-server.service Created symlink from /etc/systemd/system/multi-user.target.wants/rabbitmq-server.service to /usr/lib/systemd/system/rabbitmq-server.service. [root@linux-node1 yum.repos.d]# systemctl start rabbitmq-server.service [root@linux-node1 yum.repos.d]# rabbitmqctl add_user admin admin Creating user "admin" ... [root@linux-node1 yum.repos.d]# rabbitmqctl set_permissions admin ".*" ".*" ".*" Setting permissions for user "admin" in vhost "/" ...

centos7.2 yum安装zabbix

若如初见. 提交于 2019-12-05 19:42:34
安装要求 :https://www.zabbix.com/documentation/3.4/zh/manual/installation/requirements 官网文档 :https://www.zabbix.com/documentation/3.4/zh/manual/installation 添加Zabbix存储库 [root@localhost ~]#rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.noarch.rpm 启用yum仓库 [root@localhost ~]#yum-config-manager --enable rhel-7-server-optional-rpms 使用Mysql数据库安装Zabbix server、WEB前端的示例 [root@localhost ~]#yum -y install zabbix-server-mysql zabbix-web-mysql 安装zabbix server端,agent客户端 [root@localhost ~]#yum -y install zabbix-server zabbix-agent 安装mysql(mariadb) [root@localhost ~]#yum -y

使用systemctl管理服务

杀马特。学长 韩版系。学妹 提交于 2019-12-05 19:32:33
系统服务,开机不需要登录就能运行的程序(相当于开机自启) /usr/lib/systemd/system 用户服务,需要登录后才能运行的程序 /usr/lib/systemd/user 目录下又存在两种类型的文件: *.service 服务unit文件 *.target 开机级别unit 配置文件详解 以下为 Nginx 启动脚本 [Unit] Description=nginx - high performance web server Documentation=http://nginx.org/en/docs/ After=network.target remote-fs.target nss-lookup.target [Service] Type=forking User=nginx Group=nginx ExecStartPre=/usr/local/nginx/sbin/nginx -t ExecStart=/usr/local/nginx/sbin/nginx ExecReload=/usr/local/nginx/sbin/nginx -s reload ExecStop=/usr/local/nginx/sbin/nginx -s stop [Install] WantedBy=multi-user.target [Unit] Documentation

离线安装zabbix文档

心不动则不痛 提交于 2019-12-05 19:11:51
为了离线安装需要离线安装包,可以通过这个方式获取。 用yum安装软件默认不保存软件包,要保存需修改配置文件 # vi /etc/yum.conf 将keepcache的值改为1 安装版本:release 4.2,前提能上网 1、Install Zabbix repository。安装源码库配置部署包。这个部署包包含了yum配置文件。 # rpm -Uvh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-2.el7.noarch.rpm # yum clean all 2、 Install Zabbix server, frontend, agent。安装Zabbix server,前端 和 zabbix-agent # yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent 3、安装数据库 mariadb-server # yum install -y mariadb-server 4、启动数据库,添加到开机启动 # systemctl start mariadb.service # systemctl enable mariadb.service 5、初始化数据库 # mysql_secure_installation

搭建单区域DNS服务器

蓝咒 提交于 2019-12-05 19:10:07
搭建单区域 DNS服务器 案例 1 :搭建单区域 DNS 服务器 案例 2 :特殊 DNS 解析 案例 3 :配置 DNS 子域授权 案例 4 :搭建并测试缓存 DNS 1 案例 1 :搭建单区域 DNS 服务器 1.1 问题 本例要求要求为 DNS 区域 tedu.cn 搭建一台 DNS 服务器,以便用户能通过域名的方式访问网站。测试阶段主要提供以下正向记录: svr7.tedu.cn--->192.168.4.7 pc207.tedu.cn--->192.168.4.207 www.tedu.cn--->192.168.4.100 配置完成后在客户机上验证查询结果。 1.2 方案 快速构建 DNS 服务器的基本过程: 安装 bind 、 bind-chroot 包 建立主配置文件 /etc/named.conf 建立地址库文件 /var/named/.... 启动 named 服务 配置及使用 DNS 客户端的基本过程: 修改配置文件 /etc/resolv.conf ,添加 nameserver=DNS 服务器地址 使用 host 命令查询,提供目标域名作为参数 1.3 步骤 实现此案例需要按照如下步骤进行。 步骤一:配置 DNS 服务器 svr7 1 )安装 bind 、 bind-chroot 包 [root@svr7~]#yum -y install bind bind

使用systemctl工具

我与影子孤独终老i 提交于 2019-12-05 17:23:52
使用 systemctl工具 8.1 问题 本例要求掌握 systemctl 控制工具的基本操作,完成下列任务: 重启 httpd 、 crond 、 bluetooth 服务,查看状态 禁止 bluetooth 服务开机自启,并停用此服务 设置默认级别为 multi-user.target 并确认 8.2 方案 systemd 是一个更高效的系统 & 服务管理器,其相关特性如下: 开机服务并行启动,各系统服务间的精确依赖 配置目录: /etc/systemd/system/ 服务目录: /lib/systemd/system/ systemctl 是 systemd 的管理工具,将相关资源组织为 unit 配置单元进行管理。 不同的 unit 决定了一组相关的启动任务, service 和 target 是最常用的配置单元: service :后台独立服务 target :一套配置单元的组合,类似于传统“运行级别” 8.3 步骤 实现此案例需要按照如下步骤进行。 步骤一:重启 httpd 、 crond 、 bluetooth 服务,查看状态 1 )重启系统服务 httpd 、 crond 、 bluetooth [root@svr7~]#systemctl restart httpd crond bluetooth 2 )查看上述服务的状态 [root@svr7~]