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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 一文读懂知识蒸馏
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
2020-01-06 分布式架构