标签:火墙 webapps firewall ane centos only lib java ssh
#添加-允许8084端口号出入 [root@VM_0_4_centos sbin]# firewall-cmd --add-port=8084/tcp --permanent success #重新加载防火墙规则 [root@VM_0_4_centos sbin]# firewall-cmd --reload success #查看防火墙规则 [root@VM_0_4_centos sbin]# firewall-cmd --list-all public target: default icmp-block-inversion: no interfaces: sources: services: ssh dhcpv6-client ports: 8081/tcp 8080/tcp 8088/tcp 8089/tcp 8082/tcp 8083/tcp 8084/tcp protocols: masquerade: no forward-ports: source-ports: icmp-blocks: rich rules:
#关闭防火墙 [root@VM_0_4_centos sbin]# systemctl stop firewalld #打开防火墙 [root@VM_0_4_centos sbin]# systemctl start firewalld #查看防火墙状态 [root@VM_0_4_centos sbin]# systemctl status firewalld ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: active (running) since Fri 2020-01-31 11:18:25 CST; 3s ago Docs: man:firewalld(1) Main PID: 25686 (firewalld) Tasks: 2 Memory: 28.0M CGroup: /system.slice/firewalld.service └─25686 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
#netstat -tunlp查看有哪些端口号被占用 [root@AY120808035024e539829 webapps]# netstat -tunlp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 27893/mysqld tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 2770/redis-server 1 ………………
[root@AY120808035024e539829 ~]# cd /opt/java/tomcat/webapps/ [root@AY120808035024e539829 webapps]# pwd /opt/java/tomcat/webapps
##将/opt/java/tomcat/webapps/lop_project文件夹下的全部文件,复制到/opt/java/tomcat/webapps/lop_project_house目录下 [root@AY120808035024e539829 webapps]# cp -r lop_project/. lop_project_house/
标签:火墙 webapps firewall ane centos only lib java ssh
原文地址:https://www.cnblogs.com/wobuchifanqie/p/12244856.html