CentOS7使用httpd apache 和firewalld打开关闭防火墙与端口
Centos7 使用systemctl 工具操作命令
systemctl 是Centos7的服务管理工具中的主要工具 ,它融合之前service和chkconfig的功能于一体
一、httpd的设置
第一 、 httpd 服务的启动 停止 重启
启动 : systemctl start httpd.service
停止: systemctl stop httpd.service
重启: systemctl restart httpd.service
查看httpd 的状态
systemctl status httpd.service
第二、将httpd 服务设置开机启动
设置为开机启动 : systemctl enable httpd.service
设置开机不启动: systemctl disable httpd.service
二、防火墙设置
firewalld 打开关闭防火墙端口
1.启动: systemctl start firewalld
2.查看状态: systemctl status firewalld
3.停止: systemctl stop firewalld
4.禁用:systemctl disable firewalld
使用systemctl命令
启动一个服务: systemctl start firewalld.service
停止一个服务: systemctl stop firewalld.service
重启一个服务: systemctl restart firewalld.service
查看一个服务的状态 : systemctl status firewalld.service
在开机时启动一个服务: systemctl enable firewalld.service
在开机时禁用一个服务: systemctl disable firewalld.service
查看已经启动的服务列表法: systemctl list-unit-files|grep enabled
查看启动失败的服务: systemctl --failed
配置 firewall-cmd
查看版本:firewall-cmd --version
查看帮助: firewall-cmd --help
查看状态: firewall-cmd --state
查看所有打开的端口: firewall-cmd --zone=public --list-ports
更新防火墙规则: firewall-cmd --reload
查看区域信息: firewall-cmd --get-active-zones
查看指定接口所属区域: firewall-cmd --get-zone-of-interface=eth0
拒绝所有包:firewall-cmd --panic-on
取消拒绝状态: firewall-cmd --panic-off
查看是否拒绝: firewall-cmd --query-panic
开启一个端口
firewall-cmd --zone=public --add-port=80/tcp --permanent (--permanent 这个参数是永久生效,如果不设置这个参数,默认重启后就失效)
重新载入,使设置剩下
firewall-cmd --reload
查看
firewall-cmd --zone=public --query-port=80/tcp
删除
firewall-cmd --zone=public --remove-port=80/tcp --permanent
CentOS7使用httpd apache 和firewalld打开关闭防火墙与端口的更多相关文章
- CentOS7使用firewalld打开关闭防火墙与端口(转载)
1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disabl ...
- 关于学习CentOS7使用firewalld打开关闭防火墙和端口
1.firewalld简介 firewalld是centos7的一大特点,主要有两个优点:一是支持动态更新,不需要重启服务:二就是加入了防火墙的“zone”概念. firewalld有图形界面和工具界 ...
- CentOS7使用firewalld打开关闭防火墙与端口(转)
CentOS7使用firewalld打开关闭防火墙与端口 1.firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop ...
- CentOS7使用firewalld打开关闭防火墙与端口
1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disab ...
- CentOS7 使用firewalld打开关闭防火墙与端口
1.firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status f ...
- CentOS7 使用firewalld打开关闭防火墙以及端口
1.firewalld的基本使用 启动 systemctl start firewalld 关闭 systemctl stop firewalld 查看状态 systemctl status fire ...
- CentOS7使用firewalld打开关闭防火墙与端口[转]
转自:http://www.cnblogs.com/moxiaoan/p/5683743.html1.firewalld的基本使用启动: systemctl start firewalld查看状态: ...
- 莫小安 CentOS7使用firewalld打开关闭防火墙与端口
1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disab ...
- 转 CentOS7使用firewalld打开关闭防火墙与端口
http://blog.csdn.net/huxu981598436/article/details/54864260 开启端口命令 输入firewall-cmd --query-port=6379/ ...
随机推荐
- 20165316 实验一 Java开发环境的熟悉
实验一 Java开发环境的熟悉 基础-Java环境的构建和简单程序 实验要求 建立"自己学号exp1"的目录 在"自己学号exp1"目录下建立src,bin等目 ...
- Step7:SQL Server 多实例下的复制
一.本文所涉及的内容(Contents) 本文所涉及的内容(Contents) 背景(Contexts) 搭建步骤(Procedure) 注意事项(Attention) 二.背景(Contexts) ...
- Python学习路线人工智能线性代数知识点汇总
人工智能和数据分析相关的线性代数知识.比如什么是矢量,什么是矩阵,矩阵的加减乘除.矩阵对角化,三角化,秩,QR法,最小二法.等等 矢量: 高中数学中都学过复数,负数表达式是: a+bi 复数实际上和二 ...
- easyui dialog 表单提交,弹框初始化赋值,dialog实现
//定义弹框html<div id="delete" class="easyui-dialog" title="Delete" dat ...
- 利用cgi编程实现web版man手册
董老师前几天给我们布置了3道作业,第三道作业是cgi程序设计. 题目: web服务器cgi接口功能的实现 要求: 能调用cgi程序并得到返回结果: cgi程序能接受参数并得到返回结果: 使用两种或以上 ...
- Tree Implementation with Python
Tree Implementation with Python List of List 代码如下: def binary_tree(val): return [val, [], []] def in ...
- 11: python中的轻量级定时任务调度库:schedule
1.1 schedule 基本使用 1.schedule 介绍 1. 提到定时任务调度的时候,相信很多人会想到芹菜celery,要么就写个脚本塞到crontab中. 2. 不过,一个小的定时脚本,要用 ...
- Docker学习记录--入门了解+安装
Docker简介 Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化.容器是完全使用沙箱机制, ...
- 免费CDN公共库——网站提速 静态资源库
原文链接:https://blog.geekzhao.me/cdnjs.html 新浪SAE公共资源 推荐指数★★★ 支持https http://lib.sinaapp.com/js/jquery/ ...
- py4CV例子3Mnist识别和ANN
1.什么是mnist数据集: , , ], ,,,,,,,,]], ., ., , , ], ,,,,,,,,]], ., ., , , ])) animals_net.setTermCriteri ...