内容简介:1. 环境CentOS 7.5 ,本人选择最完整版安装(workstation选项)2. 关闭FireWall和SELinux
1. 环境
CentOS 7.5 ,本人选择最完整版安装(workstation选项)
2. 关闭FireWall和SELinux
2.1 FireWall
使用systemctl status firewalld查看防火墙的状态,如下(默认开启)
[linuxidc@localhost ~]$ systemctl status firewalld
// 防火墙状态
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active ( running ) since 二 2018-11-13 14:40:53 CST; 11min ago
Docs: man:firewalld(1)
Main PID: 821 (firewalld)
Tasks: 2
CGroup: /system.slice/firewalld.service
└─821 /usr/bin/Python -Es /usr/sbin/firewalld --nofork --nopid
11月 13 14:40:51 localhost.localdomain systemd[1]: Starting firewalld - dyna...
11月 13 14:40:53 localhost.localdomain systemd[1]: Started firewalld - dynam...
Hint: Some lines were ellipsized, use -l to show in full.
如果你需要使用FireWall服务(正式环境下),则需要修改它的配置,因为在默认情况下,它会拦截大多数服务请求。具体可以参考配置firewalld服务的基本操作和设置。
如果由于某些原因(比如本文只是需要 Linux 服务器来搭建某些服务,不想控制防火墙只开放某些端口)等而不需要FireWall服务,则可以像下面那样停止并禁用它。
// 关闭服务
[linuxidc@localhost ~]$ systemctl stop firewalld
// 关闭开机自动开启FireWall服务
[linuxidc@localhost ~]$ systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.Fedoraproject.FirewallD1.service.
2.2 关闭SELinux
可以用getenforce 查看SELinux的状态,如下(默认开启)
[linuxidc@localhost ~]$ getenforce
//开启状态
Enforcing
同上,如果你想使用SELinux也可以。但是本人不想那么麻烦,所以把SELinux也关闭了。
[linuxidc@localhost ~]$ sudo nano /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
// 这里改变为disabled
SELINUX= disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
// 重启使配置生效
[linuxidc@localhost ~]# reboot
3. 一点错误
使用root权限用户操作
Linux公社的RSS地址 : https://www.linuxidc.com/rssFeed.aspx
本文永久更新链接地址: https://www.linuxidc.com/Linux/2018-11/155311.htm
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
猜你喜欢:- Android获取软键盘的高度、键盘的打开与关闭、监听键盘处于打开还是关闭状态
- 关于python关闭
- Swift关闭UITextView键盘
- Android 书本打开和关闭动画
- CentOS 7 关闭透明大页
- Oracle数据库启动和关闭
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
C程序设计语言
(美)Brian W. Kernighan、(美)Dennis M. Ritchie / 徐宝文、李志译、尤晋元审校 / 机械工业出版社 / 2004-1 / 30.00元
在计算机发展的历史上,没有哪一种程序设计语言像C语言这样应用广泛。本书原著即为C语言的设计者之一Dennis M.Ritchie和著名计算机科学家Brian W.Kernighan合著的一本介绍C语言的权威经典著作。我们现在见到的大量论述C语言程序设计的教材和专著均以此书为蓝本。原著第1版中介绍的C语言成为后来广泛使用的C语言版本——标准C的基础。人们熟知的“hello,World"程序就是由本书......一起来看看 《C程序设计语言》 这本书的介绍吧!
JS 压缩/解压工具
在线压缩/解压 JS 代码
HSV CMYK 转换工具
HSV CMYK互换工具