1.卸载nfs目录
umount /nfs
2.授权命令
chown -R guangzhou:guangzhou /xxx/
chmod -R 750 /
chmod -R 750 /xxx/apache-tomcat-9.0.63/
chmod -R 750 /xxx/apache-tomcat/
chmod -R 640 /xxx/java/config/*
chmod -R 640 /xxx/java/config8888/*
chmod -R 750 /usr/java/wkhtmltox
chmod -R 777 /xxx/apache-tomcat/node8080/logs
chmod -R 770 /home/mw
chmod -R 770 /tmp
chmod -R 777 /lib64
chmod -R 777 /usr/lib64
3.防护墙相关命令
查看防火墙配置
iptables -L -n
查看防火墙状态
service iptables stop
#修改防火墙
vim /etc/sysconfig/iptables
重启生效
service iptables restart
-A INPUT -s xx.xxx.xxx.xx/32 -p tcp -m multiport --dports 8444,9080 -j ACCEPT
4.mysql服务器登录命令
./mysql -u root -p
5.压缩命令
tar -cjf 20230602.tar.bz2
6.禁用root 登陆
修改配置文件vi /etc/ssh/sshd_config
PermitRootLogin no
重启sshd服务service sshd restart
7.截取多少行日志
tail -n 500000 opsExecutorLog.txt > output.txt
8.查看liunx服务器是几核心
cat /proc/cpuinfo | grep "processor" | wc -l
9.截取多少行日志并新建文件夹
tail -5000 nohup.out >task-api-0401.txt
10 将新增用户加入root用户组
usermod -a -G root guangzhou
11.查看端口使用的进程
lsof -i :9090