随笔 - 90,  文章 - 0,  评论 - 3,  阅读 - 15836

1.机器初始化

#vim change_host_configuration.sh

#!/bin/bash

yum install -y epel-release wget vim ntpdate net-tools lrzsz
yum install htop -y
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
systemctl stop firewalld
systemctl disable firewalld
cat >>/root/.bashrc<<EOF
##change configuration
export HISTFILESIZE=100000
export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S " ##(history 显示时间)
export PS1='\[\e[32;1m\][\[\e[36;1m\]\u@\h \[\e[33;1m\]\w \[\e[32;1m\]\t \[\e[34;1m\]#\#\[\e[32;1m\]]\\$ \[\e[0;0m'  ###(显示主机名 目录 时间)
ulimit -c unlimited
ulimit -HSn 1024000
echo "%e.core" > /proc/sys/kernel/core_pattern
EOF

wget http://file.zhidianjh.com/change_host_configuration/change_host_configuration.sh && bash -x change_host_configuration.sh && source /root/.bashrc

curl http://file.zhidianjh.com/change_host_configuration/change_host_configuration.sh | bash -x && source /root/.bashrc

2.修改主机名

hostnamectl set-hostname hdss7-200.host.com
posted on   杨港澳  阅读(35)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 一文读懂知识蒸馏
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
历史上的今天:
2020-01-06 分布式架构

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示