时间相关

定时更新

crontab -e

service crond restart

30 1 * * * ntpdate cn.pool.ntp.org ;hwclock --systohc

同步服务器时间: ntpdate time.nist.gov

实时查看文件:tail -f info_log-2019-04-20.log |grep '标识'

查看进程:netstat -tunlp

开放端口

firewall-cmd --zone=public --add-port=5672/tcp --permanent   # 开放5672端口

firewall-cmd --zone=public --remove-port=5672/tcp --permanent  #关闭5672端口

配置立即生效:firewall-cmd --reload  

开启防火墙:service firewalld start

安装firewalld :yum install firewalld firewall-config

查看指定进程信息:top -p ${pid}

文件赋权限:chmod 777 Main.sh

查看正在使用文件的进程:fuser filename

杀掉正在使用文件的进程:fuser -k filename

给用户赋文件权限:chown -R liuhai:liuhai /opt

下载远程服务器上的文件:scp -P 50 root@45.120.184.120:/root/jdk-8u251-linux-x64.rpm /root/


iptables:https://www.cnblogs.com/shikyoh/p/10684040.html

挂载:https://www.cnblogs.com/liujie-php/p/10291011.html

firewall https://www.cnblogs.com/caidingyu/p/11008160.html

慢日志查询:https://blog.csdn.net/shan165310175/article/details/86480687

CPU占用过高: https://blog.csdn.net/lovequanquqn/article/details/104562895


查看自启动服务: systemctl list-unit-files --type service |grep enabled

开机启动:systemctl enable service_name

开机关闭:systemctl disable service_name


文章版权声明:本文发表于2022-12-14 14:07:53,除非注明,否则均为 MB博客原创文章,转载或复制请以超链接形式并注明出处。

发表评论

登录后更精彩
评论列表 3 条评论 706 人围观)
网友昵称:7586
7586 V 尊贵会员 3楼
2023-03-26 09:31:21 来自: 亚太地区
11111111111
网友昵称:7586
7586 V 尊贵会员 2楼
2023-03-26 09:31:12 来自: 亚太地区
1111
网友昵称:csq520520
csq520520 V 尊贵会员 1楼
2023-03-05 01:02:59 来自: 浙江省杭州市
好实用的呢