编写脚本selinux.sh,实现开启或禁用SELinux功能[root@centos7scripts]$catselinux.sh#!/bin/bash#STATE=`grep‘SELINUX\>‘/etc/selinux/config|grep-v‘^#‘|cut-d=-f2`case$1instart)["$STATE"="enforcing"]||sed-i‘/SELINUX/s@d
                            
                            
                                分类:
其他好文   时间:
2020-08-19 20:07:54   
                                阅读次数:
132
                             
                    
                        
                            
                            
                                环境:服务端:centos7客户端:centos6,centos8,Ubuntu18关闭selinux,firewalld,ntpd服务软件包:chrony.x86_64.rpm服务名:chronydcentos安装:yuminstall-ychronyUbuntu安装:aptinstall-ychrony服务端:查看安装配置文件:rpm-qlchrony[09:13:39-root@localh
                            
                            
                                分类:
其他好文   时间:
2020-08-15 23:54:04   
                                阅读次数:
91
                             
                    
                        
                            
                            
                                sed选择行号进行处理1~2,奇数行2~2,偶数行#p对第几行进行打印参数:p打印,d删除,I忽略大小写,a追加,i之前添加,c替换,!取反-n关闭自动打印ifconfig|sed-n‘2,4p‘-i修改原文-i.bak修改文件并备份eg:sed-i‘/^SELINUX=/cSELINUX=disabled‘/etc/sysconfig/selinuxsed-n‘1~2!p
                            
                            
                                分类:
其他好文   时间:
2020-08-13 12:02:45   
                                阅读次数:
87
                             
                    
                        
                            
                            
                                
                    环境:centos7,内核版本高于3.10 解释的话不多说,直接上才艺 查看当前内核版本 uname –r 更新centos yum –y update 如果安装过旧版本则卸载 yum remove docker docker-common docker-selinux docker-engine  ...
                            
                            
                                分类:
其他好文   时间:
2020-08-11 10:42:52   
                                阅读次数:
86
                             
                    
                        
                            
                            
                                
                    环境说明: |系统|IP|所需服务 |--|--|-- |CentOS7|192.168.159.144|nginx、mysql、php|(wordpress) 实验前请关闭防火墙和SELINUX,并配置好网络源 1. 安装nginx //安装依赖包 [root@longnian ~]# yum - ...
                            
                            
                                分类:
系统相关   时间:
2020-08-08 17:44:45   
                                阅读次数:
101
                             
                    
                        
                            
                            
                                    【RHEL8】—NFSserver ;【Centos7】—NFSclient !!!测试环境我们首关闭防火墙和selinux(NFSserver和NFSclient都需要) [root@localhost ~]# systemctl stop firewalld [root@localhost ~] ...
                            
                            
                                分类:
系统相关   时间:
2020-07-29 17:51:31   
                                阅读次数:
90
                             
                    
                        
                            
                            
                                1、卸载旧版本(如果安装过旧版本的话) sudo yum remove docker docker-common docker-selinux docker-engine 2、安装需要的软件包 yum install -y yum-utils device-mapper-persistent-dat ...
                            
                            
                                分类:
其他好文   时间:
2020-07-28 14:18:19   
                                阅读次数:
83
                             
                    
                        
                            
                            
                                    2.4:系统状态监测命令 1:ifconfig命令用于获取网卡配置与网络状态等信息,格式为“ifconfig [网络设备] [参数]”。 2:uname命令用于查看系统内核与系统版本等信息,格式为“uname [-a]”。 3:uptime用于查看系统的负载信息,格式为uptime。 4:free用 ...
                            
                            
                                分类:
系统相关   时间:
2020-07-26 00:46:20   
                                阅读次数:
87
                             
                    
                        
                            
                            
                                    一、虚拟机配置 1、在WMware里装上3台虚拟机,CentOS7最小化系统,配置好独立IP,截图如下: 2、修改虚拟机网卡配置,然后启动网卡,再查看ip已经固定 #vi /etc/sysconfig/network-scripts/ifcfg-ens33 BOOTPROTO=static ONBO ...
                            
                            
                                分类:
其他好文   时间:
2020-07-24 22:13:30   
                                阅读次数:
91
                             
                    
                        
                            
                            
                                配置服务通用步骤 1.关闭selinux,关闭iptables 2.安装服务相关的包 3.启动服务 4.修改配置文件,重启服务 安装程序 Centos系统安装 系统启动流程: bootloader-->kernel(initramfs)-->rootfs-->/sbin/init anaconda: ...
                            
                            
                                分类:
其他好文   时间:
2020-07-23 16:06:49   
                                阅读次数:
91