2021年12月1号 linux系统优化

27 篇文章 0 订阅

linux系统优化

1.确认软件安装
重新再yum安装一遍
利用rpm命令
rpm -qa -q表示查询 -a表示所有
rpm -ql -l表示列表显示
which ssh 查看文件信息
2.查看防火墙服务状态
systemctl status firewalld
临时关闭防火墙服务
systemctl stop firewalld
永久关闭防火墙服务
systemctl disable firewalld
查看服务状态信息
systemctl is-active firewalld — 检查服务是否正常运行
systemctl is-enabled firewalld — 检查确认服务是否开机运行
3.系统的selinux服务程序
getenforce — selinux服务是否关闭
setenforce
Enforcing 1 — 临时开启selinux
Permissive 0 — 临时关闭selinux
setenforce 0 — 临时关闭selinux服务
永久关闭:
enforcing - SELinux security policy is enforced.
selinux服务正常开启
permissive - SELinux prints warnings instead of enforcing.
selinux服务临时关闭
disabled - No SELinux policy is loaded.
selinux服务彻底关闭
vi /etc/selinux/config
SELINUX=disabled
selinux配置文件生效,重启系统
4.字符编码优化
centos7
查看默认编码信息
echo $LANG
en_US.UTF-8
临时修改:
echo $LANG
en_US.UTF-8
LANG=XXX
永久修改:
tail -5 /etc/profile
export LANG=‘en_US.UTF-8’
其他方法
cat /etc/locale.conf
LANG=“zh_CN.UTF-8”
终极方法
localectl set-locale LANG=zh_CN.GBK

5. 使xshell软件远程连接速度加快
vi /etc/ssh/sshd_config
79 GSSAPIAuthentication no
115 UseDNS no
修改hosts文件
[root@oldboyedu ~]# vi /etc/hosts
10.0.0.1 wine123
重启ssh远程服务
systemctl restart sshd

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值