E

/etc下各配置文件用途-慢更

椰子ya 网络安全Linux 2020-08-31

/etc是用来存放系统主bai要的配置文件,例如人员du的账号密码文件、各种服务的起zhi始文件等。一般来dao说,这个目录下的各文件属性是可以让一般用户用户查阅的,但是只有root有权利修改。

早期UNIX中,贝尔实验室的解释是:etcetra directory 。 etc. 就是Et cetra。表示其他、等等什么的,英语里能常常看都这个缩写的。是用来放其他不能归类到其他目录中的内容。

后来FHS规定用来放配置文件,就解释为:"Editable Text Configuration" 或者 "Extended Tool Chest"。


DNS

vim /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.10.1
nameserver 192.168.1.1

Yum

vim /etc/yum.conf
[main]
cachedir=/usr/local/yum/$basearch/$releasever   //修改下载的rpm保留在到/usr/local/yum/
keepcache                                       //数值等于1  可以使rpm文件保存下来   不建议保存
gpgcheck=1 
installonly_limit=3
clean_requirements_on_remove=True
best=True


vim /etc/yum.repos.d/CentOS-Base.repo
Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[BaseOS]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[base] 代表容器的名字,里面名称随意起,不可相同。
name  说明容器的意义
mirrorlist 容器可以使用的镜像站点
baseurl 容器的实际网址,
enable=1 启动容器,关闭为0
gpgcheck=1 指定是否需要查询rpm文件内的数字签名
gogkeu   数字签名的公钥文件所在

ssh配置文件

/etc/ssh/ssh_config

squid配置文件

/etc/squid/squid.conf

详解

PREV
tcpdump 文字接口数据包捕获
NEXT
实验:不一样的telnet,nc