解压tar.gz

解压到当前文件夹:tar -xzvf **.tar.gz

解压到指定文件夹:tar -xzvf **.tar.gz -C /develop/program_files/tomcat/ 

参考文章:https://www.cnblogs.com/wangluochong/p/7194037.html

 

查看具体端口被占用:netstat -tlnp |grep 80

 lsof -i :80

 

查看所有进程:ps -A

查看java相关的进程:ps -ef|grep java

删除进程:kill -9 14070

 

查看默认防火墙状态:firewall-cmd --state

systemctl stop firewalld.service #停止firewall

systemctl disable firewalld.service #禁止firewall开机启动

编辑防火墙配置文件:vi /etc/sysconfig/iptables

参考文章:https://www.linuxidc.com/Linux/2015-05/117473.htm

 

关闭防火墙:service iptables stop 
启动防火墙:service iptables start 
重启防火墙:service iptables restart 
查看防火墙状态:service iptables status 

安装gcc

yum install gcc

 

安装nginx

tar -zxvf 包名.tar.gz

cd 包名

make

make install