CentOS相关
CentOS8重启网络nmcli c reload 不立即生效 nmcli c up ens33立即生效
Redis相关:
端口 6379
redis启动 cd /usr/local/bin ./redis-server /etc/redis.conf
连接redis ./redis-cli -h 192.168.120.110 -p 6379 -a redis
Keepalived相关:
systemctl start keepalived 启动keepalived
Nginx相关:
systemctl enable nginx.service设置nginx开机自启动
systemctl disable nginx.service 停止nginx开机自启动
./nginx -s reload重新加载配置
内核升级:
yum -y update
rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
yum install https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm
yum install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm
yum –disablerepo=”*” –enablerepo=”elrepo-kernel” list available
yum –enablerepo=elrepo-kernel install kernel-ml
然后重启会自动使用最新安装的内核
升级内核后,需在进BIOS 找到secure boot 选择disable 就是把安全模式启动禁用掉,否则将无法使用elrepo的内核
安装图形界面
yum groupinstall “Server with GUI” -y
卸载图形界面
yum groupremove “Server with GUI” -y
systemctl get-default
命令行模式:multi-user.target
图形界面模式:graphical.target
设置为图形界面模式
systemctl set-default graphical.target
设置为命令行模式
systemctl set-default multi-user.target
如果在图形界面下,按:Ctrl+Alt+F2,可以进入命令行模式;
如果在命令行模式,按Ctrl+Alt+F1,可以进入图形界面;