2021年12月1号 linux系统优化

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

  1. 使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

上一篇:2021年12月22号 linux系统zabbix监控服务端安装使用全版(保真版)(是个人就会装版)(小白入坑版)


下一篇:java的String转换list