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/ ...
随机推荐
- vim 命令学习(基础篇)
[1]三种模式 vi的三种模式:命令模式.末行模式.编辑模式. 三种模式相互切换逻辑与命令图: 1.命令模式是vi的默认模式(即每打开一个文件时的初始模式). 2.命令模式切换至末行模式,末行模式切换 ...
- 设计模式之模板方法模式:实现可扩展性设计(Java示例)
概述 在实际开发中,常常会遇到一项基本功能需要支撑不同业务的情况.比如订单发货,有普通的整包发货,有分销单的发货,采购单的发货,有多商品的整包或拆包发货等.要想支持这些业务的发货,显然不能在一个通用流 ...
- python pprint
使用 pprint 模块 pprint 模块( pretty printer ) 用于打印 Python 数据结构. 当你在命令行下打印特定数据结构时你会发现它很有用(输出格式比较整齐, 便于阅读). ...
- 【转】阿里出品的ETL工具dataX初体验
原文链接:https://www.imooc.com/article/15640 来源:慕课网 我的毕设选择了大数据方向的题目.大数据的第一步就是要拿到足够的数据源.现实情况中我们需要的数据源分布在不 ...
- linux常用命令:ls命令
ls命令是linux下最常用的命令.ls命令就是list的缩写,缺省下ls用来打印出当前目录的清单,如果ls指定其他目录那么就会显示指定目录里的文件及文件夹清单. 通过ls 命令不仅可以查看linux ...
- 微信小程序制作家庭记账本之二
第二天,继续学习制作记账本,网上搜寻别人的源码进行学习,但是搜寻过程中总是能看到github这个东西,不清楚这是什么东西,明天继续努力吧.
- Linux基础命令---ifconfig
ifconfig ifconfig指令用来配置网络接口参数,同时还可以显示当前内核网络接口的工作状态.如果没有提供参数,则ifconfig将显示当前活动接口的状态.如果给定单个接口参数,则只显示给定接 ...
- calendar 模块
calendar模块,即日历模块,提供了对日期的一些操作方法,和生成日历的方法 注:星期一是默认的每周第一天,星期天是默认的最后一天.更改设置需调用calendar.setfirstweekday() ...
- onclick 常用手册
1.如何去使用onclick来跳转到我们指定的页面/跳转到指定url ☆如果只是在本页显示的话,可以直接用location, 方法如下: ①onclick="javascript:windo ...
- echart中间显示固定的字