-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3149b2
commit dfd8936
Showing
28 changed files
with
988 additions
and
91 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### 查看系统UUID | ||
|
||
```shell | ||
$ cat /sys/class/dmi/id/product_uuid | ||
ff594d56-e05f-a672-39de-806201d083e4 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
### 防火墙开放端口 | ||
|
||
- `el6` | ||
|
||
```shell | ||
#开放端口(7777) | ||
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 7777 -j ACCEPT | ||
#保存 | ||
/etc/rc.d/init.d/iptables save | ||
#重载 | ||
service iptables restart | ||
``` | ||
|
||
- `el7` | ||
|
||
```shell | ||
firewall-cmd --zone=public --add-port=7777/tcp --permanent | ||
#重新载入 | ||
firewall-cmd --reload | ||
``` | ||
|
||
### 删除所有规则 | ||
|
||
```shell | ||
iptables -Z | ||
iptables -t nat -F | ||
iptables -t nat -X | ||
iptables -t nat -P PREROUTING ACCEPT | ||
iptables -t nat -P POSTROUTING ACCEPT | ||
iptables -t nat -P OUTPUT ACCEPT | ||
iptables -t mangle -F | ||
iptables -t mangle -X | ||
iptables -t mangle -P PREROUTING ACCEPT | ||
iptables -t mangle -P INPUT ACCEPT | ||
iptables -t mangle -P FORWARD ACCEPT | ||
iptables -t mangle -P OUTPUT ACCEPT | ||
iptables -t mangle -P POSTROUTING ACCEPT | ||
iptables -F | ||
iptables -X | ||
iptables -P FORWARD ACCEPT | ||
iptables -P INPUT ACCEPT | ||
iptables -P OUTPUT ACCEPT | ||
iptables -t raw -F | ||
iptables -t raw -X | ||
iptables -t raw -P PREROUTING ACCEPT | ||
iptables -t raw -P OUTPUT ACCEPT | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
```shell | ||
ps aux | awk '/yum/{system("kill-9"$2)}' | ||
#清除rpm库文件 | ||
rm -f /var/lib/rpm/__db* | ||
#重新构建 | ||
rpm --rebuilddb | ||
#清除yum缓存 | ||
yum clean all && rm -rf /var/cache/yum | ||
#重新缓存 | ||
yum makecache | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,10 @@ $ hwclock -r | |
|
||
```shell | ||
$ hwclock --systohc | ||
``` | ||
|
||
手动同步 | ||
|
||
```shell | ||
timedatectl set-ntp true | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,5 +84,4 @@ df -h | |
``` | ||
|
||
![](images/extended_disk.jpg) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## 设置主机名 | ||
|
||
```shell | ||
esxcfg-advcfg -s 新的主机名称 /Misc/hostname | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,10 @@ EOF | |
启动 | ||
```shell | ||
$ systemctl enable chronyd --now | ||
``` | ||
|
||
手动同步 | ||
|
||
```shell | ||
timedatectl set-ntp true | ||
``` |
Oops, something went wrong.