liunx 配置文件夹.d里自定义的配置文件?

本文介绍了如何使用yum源进行软件包管理,配置Apache虚拟主机,设置NFS共享文件系统及其实现自动挂载的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、yum库安装

[root@desktop0 ~]# cat /etc/yum.repos.d/rhel_dvd.repo 

# Created by cloud-init on Thu, 10 Jul 2014 22:19:11 +0000
[rhel_dvd]
gpgcheck = 0
enabled = 1
baseurl = http://content.example.com/rhel7.0/x86_64/dvd

name = Remote classroom copy of dvd

2、apache主机配置

[root@server0 ~]# cat /etc/httpd/conf.d/vhost.conf 
<virtualhost *:80>
servername server0.example.com
documentroot /var/www/vhost/
</virtualhost>
<directory "/var/www/vhost">
require all granted
</directory>

3、导出nfs文件系统

[root@server0 ~]# cat /etc/exports.d/public.exports 
/shares/public       172.25.0.0/24(rw,sync)

4、自动挂载nfs网络文件存储

[root@desktop0 ~]# cat /etc/auto.master.d/share.autofs 
/shares     /etc/auto.shares

[root@desktop0 ~]# cat /etc/auto.shares 
*   -rw,sync      172.25.0.11:/shares/&


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值