大数据-大数据服务器环境运维常用命令-Centos7(持续更新完善)

大数据-大数据服务器环境运维常用命令-Centos7(持续更新完善),第1张

大数据-大数据服务器环境运维常用命令-Centos7(持续更新完善) 查看服务器公网ip
curl cip.cc
禁用用透明大页面压缩
sudo echo never > /sys/kernel/mm/transparent_hugepage/defrag
sudo echo never > /sys/kernel/mm/transparent_hugepage/enabled

sudo echo never > /sys/kernel/mm/transparent_hugepage/enabled
sudo echo never > /sys/kernel/mm/transparent_hugepage/defrag
查看CPU信息(型号)
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
查看物理CPU个数
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
查看每个物理CPU中core的个数(即核数)
cat /proc/cpuinfo| grep "cpu cores"| uniq
查看逻辑CPU的个数
cat /proc/cpuinfo| grep "processor"| wc -l
查看所有3306端口使用情况
netstat -an | grep 3306

6.2 关闭防火墙和清空规则
    systemctl status firewalld
    systemctl stop firewalld
    systemctl disable firewalld
    iptables -F
重启网卡命令
 systemctl restart network
6.3 selinux关闭
vi /etc/selinux/config 

 This file controls the state of SELinux on the system.
 SELINUX= can take one of these three values:
     enforcing - SELinux security policy is enforced.
     permissive - SELinux prints warnings instead of enforcing.
    disabled - No SELinux policy is loaded.
SELINUX=disabled
 SELINUXTYPE= can take one of three two values:
     targeted - Targeted processes are protected,
     minimum - Modification of targeted policy. only selected processes are protected. 
     mls - Multi Level Security protection.
SELINUXTYPE=targeted

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5679306.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存