centos系统新机部署

您所在的位置:网站首页 centos8开机启动脚本 centos系统新机部署

centos系统新机部署

2023-02-01 08:00| 来源: 网络整理| 查看: 265

新的系统要想能够提供测试和线上生产环境,一些标准化的流程是必须的,就像打地基盖房子一样。

配置yum源 使用epel-release yum install -y epel-release openssh-devel lrzsz vim bind-utils

执行初始环境脚本enent_.sh

#!/bin/bash read -p “请输入系统最大打开的文件数量” a read -p “请输入系统最大的进程数量” b echo “* noproc $b” >> /etc/security/limits.conf echo “* nofile a ; ; ; / e t c / s e c u r i t y / l i m i t s . c o n f s e d − i ; 1 , a; ;; /etc/security/limits.conf sed -i ;1, a">>/etc/security/limits.confsed−i"1, s/SELINUX=enforcing/SELINUX=disabled/g” /etc/selinux/config setenforce 0 cat /etc/issue | grep 6 if [ $? -eq 0 ];then chkconfig iptables off /etc/init.d/iptables stop echo “您的系统是CENTOS 6 已经关闭防火墙” else systemctl stop firewalld && systemctl disable firewalld echo “您的系统是centos 7 防火墙已经关闭” fi

在jenkins自动化部署环境中涉及到常常改变CI和UAT环境下发到不同IP的服务器上,所以需要在下发配置目录下更改项目的IP地址和port。所以有一个批量查看此目录下文件名和文件内容的脚本,方便于以后对于项目的统筹和管理,如下

[[email protected] src]# cat kk.sh #!/bin/bash if [ -f ./kk.txt ];then rm -rf ./kk.txt else touch ./kk.txt fi a=CI–* for name in $a do echo $namecat $name >> ./kk.txt done



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3