![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
文章平均质量分 75
樊佳洺
这个作者很懒,什么都没留下…
展开
-
haproxy搭建web群集
安装依赖程序[root@centos ]# tar zxvf /mnt/haproxy-1.4.24.tar.gz -C /usr/src/[root@centos ]# cd /usr/src/haproxy-1.4.24/[root@centos haproxy-1.4.24]# make TARGET=linux26[root@centos haproxy-1.4.24]# make install创建配置文件目录[root@centos haproxy-1.4.24]# mkdir /原创 2021-05-25 16:41:46 · 94 阅读 · 0 评论 -
2021-05-11
一,限制使用su命令1.修改配置认证文件/etc/pam.d/su, 启用 pam——wheel.so认证模块[root@centos ~]# head -3 /etc/pam.d/su#%PAM-1.0auth sufficient pam_rootok.so2.将admin用户加入到wheel组[root@centos ~]# useradd radmin[root@centos ~]# gpasswd -a radmin wheel正在将用户“radmin”加入到“wheel”组中原创 2021-05-11 11:11:35 · 569 阅读 · 0 评论 -
shell脚本一
第六章1、编写脚本编写脚本[root@centos ~]# vim first.sh2、脚本文件添加执行权限[root@centos~]# chmod +x first.sh[root@centos ~]# ./first.sh[root@centos ~]# source first.shroot@centos ~]# sh first.sh1.重定向输出不直接输出屏幕显示[root@centos ~]# uname -p > kernel.txt[root@centos原创 2021-04-24 11:52:22 · 120 阅读 · 0 评论 -
第七章
第七章1、使用test进行条件测试root@centos ~]# test -d/media[root@centos ~]# echo $?2、使用括号进行条件测试[root@centos ~]# [ -d /media/ ][root@centos ~]# echo $?[root@centos ~]# [ -d /media/cdrom/Server ][root@centos ~]# echo $?...原创 2021-04-24 11:52:07 · 64 阅读 · 0 评论 -
第八章
第八章1、for根据姓名列表批量添加用户[root@centos01 ~]#vim /root/ users.txtchenyedengchaozhangie2、编写脚本添加账户[root@centos ~]# vim uaddfor.sh#!/bin/bashULIST=$(cat /root/users.txt)for UNAME in $ULLISTdouseradd $UNAME...原创 2021-04-24 11:51:35 · 89 阅读 · 0 评论