脚本
#!/bin/bash
yum -y install vim net-tools iproute2 tree zip unzip wget openssl openssl-devel patch lsof
systemctl stop firewalld.service
systemctl disable firewalld.service
if [ ! `cat /etc/selinux/config |grep SELINUX=enforcing` ];then echo "selinux not enforcing";else sed -i s#SELINUX=enforcing#SELINUX=disabled# /etc/selinux/config;fi
文章目录
1、安装工具
yum -y install vim net-tools iproute2 tree zip unzip wget openssl openssl-devel patch lsof
systemctl stop firewalld.service
systemctl disable firewalld.service
if [ ! `cat /etc/selinux/config |grep SELINUX=enforcing` ];then echo "selinux not enforcing";else sed -i s#SELINUX=enforcing#SELINUX=disabled# /etc/selinux/config;fi
1、vim
Vim是一个类似于Vi的著名的功能强大、高度可定制的文本编辑器
2、net-tools iproute2
net-tools
很多系统管理员依然通过组合使用诸如ifconfig、route、arp和netstat等命令行工具(统称为net-tools)来配置网络功能,解决网络故障。net-tools起源于BSD的TCP/IP工具箱,后来成为老版本Linux内核中配置网络功能的工具。但自2001年起,Linux社区已经对其停止维护。
同时,一些Linux发行版比如Arch Linux和CentOS/RHEL 7则已经完全抛弃了net-tools,只支持iproute2。
iproute2
作为网络配置工具的一份子,iproute2的出现旨在从功能上取代net-tools。
iproute2是linux下管理控制TCP/IP网络和流量控制的新一代工具包,旨在替代老派的工具链net-tools,即大家比较熟悉的ifconfig,arp,route,netstat等命令。
3、tree
查看目录结构
4、zip unzip
解压工具
5、wget
下载文件工具
6、openssl openssl-devel patch
openssl (OpenSSL 是一个强大的安全套接字层密码库,囊括主要的密码算法、常用的密钥和证书封装管理功能及SSL协议)
7、lsof
是一个列出当前系统打开文件的工具
2、常用配置
1、修改主机名
hostnamectl set-hostname [主机名] && bash
2、关闭防火墙和selinux
systemctl stop firewalld.service
systemctl disable firewalld.service
if [ ! `cat /etc/selinux/config |grep SELINUX=enforcing` ];then echo "selinux not enforcing";else sed -i s#SELINUX=enforcing#SELINUX=disabled# /etc/selinux/config;fi