關於centos 7.4中iptabels防火牆filter表的配置總結
在生產環境中,除硬體裝置防火牆的策略配置之外,因為涉及一些許可權控制並不那麼嚴謹的軟體使用,需要單獨對該類應用伺服器做單獨防火牆設定。
iptables是Linux上常用的防火牆過濾包管理工具,它是Linux核心中netfilter實現包過濾的一部分。
1、netfilter/iptables的四表五鏈
iptables 實際上就是一種包過濾型防火牆。就是通過書寫一些接受哪些包,拒絕哪些包的規則,實現資料包的過濾。這些規則儲存在專用的資訊包過濾表中,而這些表整合在 Linux 核心中。在資訊包過濾表中,規則被分組放在我們所謂的鏈(chain)中。
1.1 四表
1.2 五鏈
詳細對應關係如下:
2、filter表
資料包過濾中,最常見的就是filter表的使用,也是iptables的預設規則表。由於iptables利用的資料包過濾的機制,通過分析資料包的報頭資料,與定義的規則來進行比對,決定該資料包是進入允許(ACCEPT)主機還是丟棄(DROP)。 也就是說,根據資料包的分析資料”對比”預先定義的規則內容,若資料包資料與規則內容相同則進行動作,否則就繼續下一條規則的比對。重點在比對與分析順序。
2.1 filter表規則
2.1 filter表示例結構
[[email protected] ~]# cat /etc/sysconfig/iptables
# sample configuration for iptables service
# you can edit this manually or use system-config-firewall
# please do not ask us to add additional ports/services to this default configuration
## 宣告表為filter
*filter
## 預設策略Policy
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
## 自定義chain
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
3、iptables命令
3.1 iptables命令規則
## 簡單檢視命令引數
[[email protected] ~]# iptables -h
iptables v1.4.21
Usage: iptables -[ACD] chain rule-specification [options]
iptables -I chain [rulenum] rule-specification [options]
iptables -R chain rulenum rule-specification [options]
iptables -D chain rulenum [options]
iptables -[LS] [chain [rulenum]] [options]
iptables -[FZ] [chain] [options]
iptables -[NX] chain
iptables -E old-chain-name new-chain-name
iptables -P chain target [options]
iptables -h (print this help information)
Commands:
Either long or short options are allowed.
--append -A chain Append to chain
--check -C chain Check for the existence of a rule
--delete -D chain Delete matching rule from chain
--delete -D chain rulenum
Delete rule rulenum (1 = first) from chain
--insert -I chain [rulenum]
Insert in chain as rulenum (default 1=first)
--replace -R chain rulenum
Replace rule rulenum (1 = first) in chain
--list -L [chain [rulenum]]
List the rules in a chain or all chains
--list-rules -S [chain [rulenum]]
Print the rules in a chain or all chains
--flush -F [chain] Delete all rules in chain or all chains
--zero -Z [chain [rulenum]]
Zero counters in chain or all chains
--new -N chain Create a new user-defined chain
--delete-chain
-X [chain] Delete a user-defined chain
--policy -P chain target
Change policy on chain to target
--rename-chain
-E old-chain new-chain
Change chain name, (moving any references)
Options:
--ipv4 -4 Nothing (line is ignored by ip6tables-restore)
--ipv6 -6 Error (line is ignored by iptables-restore)
[!] --protocol -p proto protocol: by number or name, eg. `tcp'
[!] --source -s address[/mask][...]
source specification
[!] --destination -d address[/mask][...]
destination specification
[!] --in-interface -i input name[+]
network interface name ([+] for wildcard)
--jump -j target
target for rule (may load target extension)
--goto -g chain
jump to chain with no return
--match -m match
extended match (may load extension)
--numeric -n numeric output of addresses and ports
[!] --out-interface -o output name[+]
network interface name ([+] for wildcard)
--table -t table table to manipulate (default: `filter')
--verbose -v verbose mode
--wait -w [seconds] maximum wait to acquire xtables lock before give up
--wait-interval -W [usecs] wait time to try to acquire xtables lock
default is 1 second
--line-numbers print line numbers when listing
--exact -x expand numbers (display exact values)
[!] --fragment -f match second or further fragments only
--modprobe=<command> try to insert modules using this command
--set-counters PKTS BYTES set the counter during insert/append
[!] --version -V print package version.
3.2 iptables 匹配條件
iptables定義規則的格式:
iptables [-AI 鏈名] [-io 網路介面 ] [ -p 協議 ] [ -m 擴充套件 擴充套件引數 ] [ -s 來源IP/網路 ] [ -d 目標IP/網路 ] -j [ACCEPT | DROP|REJECT|LOG]
1. [ -m state --state options ]
iptables有四種狀態:NEW,ESTABLISHED,RELATED,INVALID。
NEW狀態:主機連線目標主機,在目標主機上看到的第一個想要連線的包
ESTABLISHED狀態:主機已與目標主機進行通訊,判斷標準只要目標主機迴應了第一個包,就進入該狀態。
RELATED狀態:主機已與目標主機進行通訊,目標主機發起新的連結方式,例如ftp
INVALID狀態:無效的封包,例如資料破損的封包狀態
例:
2. [ -m multiport --dport/sport ]
##多埠匹配
例:iptables -A INPUT -p tcp -m multiport --dport 25,80,110,443 -j ACCEPT
3. [ -m iprange --src-range ]
##IP範圍匹配
例:iptables -A FORWARD -p tcp -m iprange --src-range 192.168.1.122-192.168.1.128 -j ACCEPT
3.3 iptables常用命令示例
1、命令 -A, --append
範例:iptables -A INPUT -p tcp --dport 22 -j ACCEPT
說明 :新增規則到INPUT規則鏈中,規則時接到所有目的埠為22的資料包的流入連線,該規則將會成為規則鏈中的最後一條規則。
2、命令 -D, --delete
範例:iptables -D INPUT -p tcp --dport 80 -j ACCEPT
或: iptables -D INPUT 1
說明: 從INPUT規則鏈中刪除上面建立的規則,可輸入完整規則,或直接指定規則編號加以刪除。
3、命令 -R, --replace
範例: iptables -R INPUT 1 -s 192.168.0.1 -j DROP
說明 取代現行第一條規則,規則被取代後並不會改變順序。
4、命令 -I, --insert
範例:iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
說明: 在第一條規則前插入一條規則,原本該位置上的規則將會往後移動一個順位。
5、命令 -L, --list
範例: iptables -L INPUT
說明:列出INPUT規則鏈中的所有規則。
6、命令 -F, --flush
範例: iptables -F INPUT
說明: 刪除INPUT規則鏈中的所有規則。
7、命令 -Z, --zeroLINUX教程 centos教程
範例:iptables -Z INPUT
說明 將INPUT鏈中的資料包計數器歸零。它是計算同一資料包出現次數,過濾阻斷式攻擊不可少的工具。-Z:將所有的chain的計數與流量統計都歸零
8、命令 -N, --new-chain
範例: iptables -N denied
說明: 定義新的規則鏈。
9、命令 -X, --delete-chain
範例: iptables -X denied
說明: 刪除某個自定義的規則鏈,如果後面沒有引數,則預設清除所有自定義chain。-X:清楚所有使用者"自定義"的chain或者tables
10、命令 -P, --policy
範例 :iptables -P INPUT DROP
說明 :定義預設的過濾策略。 資料包沒有找到符合的策略,則根據此預設方式處理。
11、命令 -E, --rename-chain
範例: iptables -E denied disallowed
說明: 修改某自訂規則鏈的名稱。
4、iptables建立
4.1 建立前的準備
- 原有規則檢視
[[email protected] ~]# iptables -vnL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
5384 7621K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT 3478 packets, 264K bytes)
pkts bytes target prot opt in out source destination
- 服務狀態檢視
[[email protected] ~]# systemctl status iptables
● iptables.service - IPv4 firewall with iptables
Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled)
Active: active (exited) since Fri 2018-07-13 23:20:13 EDT; 30min ago
Process: 12699 ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=0/SUCCESS)
Main PID: 12699 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/iptables.service
Jul 13 23:20:13 localhost.localdomain systemd[1]: Starting IPv4 firewall with iptables...
Jul 13 23:20:13 localhost.localdomain iptables.init[12699]: iptables: Applying firewall rules: [ OK ]
Jul 13 23:20:13 localhost.localdomain systemd[1]: Started IPv4 firewall with iptables.
- 清空原有規則
## 清除防火牆的所有規則:
[root@localhost ~]# iptables -F //清除所有的已定製的規則
[root@localhost ~]# iptables -X //清除所有使用者"自定義"的chain或者tables
[root@localhost ~]# iptables -Z //將所有的chain的計數與流量統計都歸零
## 儲存,儲存前,務必確認防火牆預設INPUT策略Policy為ACCEPT,否則遠端SSH必定斷開
[root@localhost ~]# iptables-save
# Generated by iptables-save v1.4.21 on Sat Jul 14 00:37:51 2018
*filter
:INPUT ACCEPT [1434:117566]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1226:277818]
COMMIT
# Completed on Sat Jul 14 00:37:51 2018
## 規則已無
[root@localhost ~]# iptables -vnL
Chain INPUT (policy ACCEPT 14 packets, 924 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 8 packets, 880 bytes)
pkts bytes target prot opt in out source destination
4.2 規則設定
因為iptables執行完全依賴於順序,根據filter表的結構,需設定預設規則Policy,當資料包不在我們設定的規則之內時,則該資料包的通過與否,是以Policy的設定為準。在安全性比較高的主機中,Filter內的INPUT鏈定義的比較嚴格,INPUT的Policy定義為DROP。
iptables定義規則:
格式:iptables [-t table] -P [INPUT,OUTPUT,FORWARD] [ACCEPT,DROP ]
-p : 定義策略(Policy)。注意:P為大寫
ACCEPT :資料包可接受
DROP :資料包丟棄,client不知道為何被丟棄
- 首先保證sshd通訊正常
## 這裡我們要設定預設規則全部為DROP的情況,為保證SSH正常,首先寫入SSH訪問策略
[root@localhost ~]# iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
[root@localhost ~]# iptables -A OUTPUT -p tcp -m tcp --sport 22 -j ACCEPT
[root@localhost ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
[root@localhost ~]# iptables -vnL
Chain INPUT (policy ACCEPT 1 packets, 76 bytes)
pkts bytes target prot opt in out source destination
98 6500 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 1 packets, 76 bytes)
pkts bytes target prot opt in out source destination
52 4808 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:22
- 設定預設策略Policy
[root@localhost ~]# iptables -P INPUT DROP
[root@localhost ~]# iptables -P FORWARD DROP
[root@localhost ~]# iptables -P OUTPUT DROP
[root@localhost ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
[root@localhost ~]# iptables -vnL
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
179 11837 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
102 10216 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:22
- 保證本機迴環正常
[[email protected] ~]# iptables -A INPUT -i lo -j ACCEPT
[[email protected] ~]# iptables -A OUTPUT -o lo -j ACCEPT
[[email protected] ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
[[email protected] ~]# iptables -vnL --line-number
Chain INPUT (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 800 52707 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
2 0 0 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
Chain OUTPUT (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 458 47772 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:22
2 0 0 ACCEPT all -- * lo 0.0.0.0/0 0.0.0.0/0
- 已有連線及相關連線保持正常
[[email protected] ~]# iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
[[email protected] ~]# iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
[[email protected] ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
[[email protected] ~]# iptables -vnL --line-number
Chain INPUT (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 978 64524 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
2 4 237 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
3 0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
Chain FORWARD (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
Chain OUTPUT (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 567 58885 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:22
2 5 268 ACCEPT all -- * lo 0.0.0.0/0 0.0.0.0/0
3 0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
- 不禁ping
[[email protected] ~]# iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
[[email protected] ~]# iptables -A OUTPUT -p icmp --icmp-type echo-reply -j ACCEPT
[[email protected] ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
[[email protected] ~]# iptables -vnL --line-number
Chain INPUT (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 1204 79461 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
2 4 237 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
3 0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
4 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8
Chain FORWARD (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
Chain OUTPUT (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 700 73273 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:22
2 5 268 ACCEPT all -- * lo 0.0.0.0/0 0.0.0.0/0
3 0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
4 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 0
- 允許ping
[[email protected] ~]# iptables -A INPUT -p icmp --icmp-type echo-reply -j ACCEPT
[[email protected] ~]# iptables -A OUTPUT -p icmp --icmp-type echo-request -j ACCEPT
[[email protected] ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
[[email protected] ~]# iptables -vnL --line-number
Chain INPUT (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 598 39376 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
2 0 0 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
3 2 120 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
4 1 60 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8
5 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 0
Chain FORWARD (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
Chain OUTPUT (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 351 47660 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:22
2 0 0 ACCEPT all -- * lo 0.0.0.0/0 0.0.0.0/0
3 3 180 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
4 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 0
5 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8
- 允許域名解析
[[email protected] ~]# iptables -A INPUT -p udp --sport 53 -j ACCEPT
[[email protected] ~]# iptables -A OUTPUT -p udp --dport 53 -j ACCEPT
[[email protected] ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
[[email protected] ~]# iptables -vnL --line-number
Chain INPUT (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 1199 80605 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
2 10 900 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
3 16 1446 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
4 1 60 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8
5 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 0
6 0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp spt:53
Chain FORWARD (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
Chain OUTPUT (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 741 109K ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp spt:22
2 10 900 ACCEPT all -- * lo 0.0.0.0/0 0.0.0.0/0
3 9 684 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
4 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 0
5 9 756 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8
6 4 264 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:53
相關推薦
關於centos 7.4中iptabels防火牆filter表的配置總結
在生產環境中,除硬體裝置防火牆的策略配置之外,因為涉及一些許可權控制並不那麼嚴謹的軟體使用,需要單獨對該類應用伺服器做單獨防火牆設定。 iptables是Linux上常用的防火牆過濾包管理工具,它是Linux核心中netfilter實現包過濾的一部分。
Centos 7.4 中http-2.4 的基本實現和 https 的實現
http-2.4 https 1.建立httpd服務,要求: 1) 提供兩個基於名稱的虛擬主機www1, www2;要求每個虛擬主機都有單獨的錯誤日誌和訪問日誌; 2) 通過www1的/server-status提供狀態信
centos 7.4 sendmail 發送郵件正確配置
gpo nor -a 開啟 服務 自己 body onf pos yum -y install mailx yum -y install sendmail vi /etc/mail.rc 在最後添加 set [email protected]
CentOS 7.4 ifconfig, ip/ss, nmcli, nmtui, 配置文件 修改ip信息用法
lease 其中 信息 tin 服務器 option ipv4 PC dentry CentOS 7.4 ifconfig, ip/ss, nmcli, nmtui, 配置文件 修改ip信息用法 CentOS 7.4 中, 網卡命名方式發生改變, 可預測功能命名: 網卡簡要
CentOS 7系統中JDK的安裝與配置
作業系統版本:CentOS Linux release 7.2.1511 (Core) JDK版本:jdk-8u111-nb-8_2-linux-x64.sh 安裝方式:Shell指令碼安裝 下載地址
Centos 7.4 工作中的Python開發環境的搭建及維護
工作實戰Python運用中,時刻會有很多環境及庫的依賴,下面介紹下自己的親身體驗。 Linux:Centos 7.4版本 Python: 2.7 Python 開發環境:PyCharm Python依賴庫:pytz、 tzlocal、 requests、 pycryp
在CentOS 6.4中編譯安裝GCC 4.8.1 + GDB 7.6.1
在CentOS 6.4中編譯安裝GCC 4.8.1 + GDB 7.6.1 一、編譯安裝gcc 4.8.1 1. 安裝gcc和g++ 新安裝的CentOS缺少編譯環境,必須先安裝舊版本的gcc, 然後再進行自舉編譯 yum -y install gcc yum -y i
CentOS-7.0.中安裝與配置Tomcat-7的方法
代碼 accept iptables jdk1.7 ews 啟動 state cat 解決方案 轉自:http://www.linuxidc.com/Linux/2015-08/122241.htm 安裝說明 安裝環境:CentOS-7.0.1406安裝方式:源碼安裝
CentOS 7 部署中文字體環境
linux 加載中文字體環境1. 安裝環境包:# yum -y install fontconfig這時在/usr/shared目錄就可以看到fonts和fontconfig目錄# ll /usr/share/font*/usr/share/fontconfig:/usr/share/fonts:2.
CentOS 7 Minimal中啟用網絡
blog minimal nim 終端 mini sta 使用 重啟 centos 1、首先使用root登錄服務器, 輸入:nmcli 我們發現網卡是處於禁用狀態。 2、打開網絡管理器界面, 再終端輸入:nmtui 會進入 打開界面如上,使用tab鍵進行選擇,使用e
CentOS 7.4 shell 不顯示當前用戶和路徑的問題
export art 文件 自己 刪除 nbsp file centos .net 步驟如下: vim ~/.bash_profile (不用管.bash_profile這個文件有幾個,自己新建一個也是可以的) 在最後加上 export PS1=‘[\u@\h \
CentOS-7.4(1708)release notes發行註記
cfb i386 發現 osi 性能 我們 plugins 管理員 lan Red Hat Enterprise Linux 當前的最新版本是 7.3。 Red Hat Enterprise Linux 7 當前僅支持 64 位CPU:64-bit AMD、64-bit
VMware Workstation 下安裝CentOS 7.4 以及tools
自啟 images 但是 centos one 空間 啟動 保持 ide 軟件環境: 宿主機系統:windows 10 企業版 1703 VMware Workstation 版本:14 PRO 客戶機系統版本:CentOS 7.4 已管理員權限打開VMware Work
CentOS 7.4 yum方式安裝LAMP環境,並部署WordPress,使用XCache優化性能
yum lamp wordpress centos7 一、安裝LAMP環境:# yum -y install httpd mariadb-server php-mysql php程序包版本:httpd:2.4.6mariadb-server:5.5.56php-mysql(PHP連接MySQL
Centos 7.4 安裝ipython和mysql-python遇到的問題
centos 7.4 安裝ipythonpip安裝ipython報錯記錄#pip install ipython==5.5.0Collecting ipython==5.5.0 Downloading http://mirrors.aliyun.com/pypi/packages/08/2c/628550
安裝centos 7.4
tft time script img 安裝 init 內存 網關 感覺 常見問題你會感覺 tftp timeout: 防火墻 time out script: 網關沒有指定,在dhcpd.conf中 不能下載:vmlinuz和initrd程序和
Centos 7.4 部署配置Software Raid
welcom white centos 系統 app ssi work num -o list 本章Blog相關知識點:Raid是英文Redundant Array of Independent Disks 的縮寫,翻譯成中文意思是“獨立磁盤冗余陣列”,有時也簡稱磁盤陣列(
Centos 7.4 服務器配置LVM(邏輯卷管理)
rec lvremove acc done linu fff sequence ado centos 本章Blog相關知識點:LVM是 Logical Volume Manager(邏輯卷管理)的簡寫,它是Linux環境下對磁盤分區進行管理的一種機制,LVM是建立在硬盤和
CentOS-7.4 二進制安裝mariadb10.2數據庫
重新 sql soc 包名 chown mage 分享圖片 測試數據 mem 在官方網站下在二進制安裝包 http://mariadb.org #"包名:帶有linux字樣的就是編譯完安裝包" mariadb-10.2.12-linux-x86_64.tar.gz 確認系統
Linux精華篇—CentOS 7.4下源碼編譯構建LAMP架構
CentOS7.4源碼編譯構建LAMPCentOS 7.4搭建LAMPLAMP:Linux、Apache、mysql、php 目錄:第一部分 準備工作第二部分 安裝Apache服務第三部分 安裝MySQL服務第四部分 搭建PHP運行環境第五部分 LAMP架構應用 第一部分 準備工作一:服務器:Li