linux-tutorial/codes/linux/ops/sys/README.md
2019-02-22 18:57:46 +08:00

2.5 KiB
Raw Blame History

脚本使用说明

建议按照顺序执行本文脚本。

替换 yum repo 源

由于 CentOS 默认 yum 源,访问速度很慢,所以推荐使用国内镜像。

使用方法:执行以下任意命令即可执行脚本。

curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/sys/yum/change-yum-repo.sh | bash
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/sys/yum/change-yum-repo.sh | bash

安装基本的命令工具(可选)

工具清单(可以根据需要,在 install-cmd-tool.sh 中把不需要的工具注掉):

# 核心工具df、du、chkconfig
# 网络工具ifconfig、netstat、route
# IP工具ip、ss、ping、tracepath、traceroute
# DNS工具dig、host、nslookup、whois
# 端口工具lsof、nc、telnet
# 下载工具curl、wget
# 防火墙工具iptables
# 编辑工具emacs、vim
# 流量工具iftop、nethogs
# 抓包工具tcpdump
# 压缩工具unzip、zip
# 版本控制工具git

使用方法:执行以下任意命令即可执行脚本。

curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/sys/install-cmd-tool.sh | bash
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/sys/install-cmd-tool.sh | bash

关闭防火墙

使用方法:执行以下任意命令即可执行脚本。

curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/sys/stop-firewall.sh | bash
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/sys/stop-firewall.sh | bash

设置 DNS

使用方法:执行以下任意命令即可执行脚本。

curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/sys/set-dns.sh | bash
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/sys/set-dns.sh | bash

设置 ntp

使用方法:执行以下任意命令即可执行脚本。

curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/sys/set-ntp.sh | bash
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/sys/set-ntp.sh | bash