百分百能用-搭建服务器简易版(linux)

服务器搭建


1. DHCP服务器

[root@server ~]# vim /etc/dhcp/dhcpd.conf 

ddns-update-style none;
#忽略客户端的 DNS更新功能
ignore client-updates;
## 预设租期
default-lease-time 259200;
## 最大租期
max-lease-time 518400;
## 动态分配的 IP
subnet 172.30.200.0 netmask 255.255.248.0 {
       range 172.30.202.140 172.30.202.149;
## DHCP客户端的默认的转发地址
    option routers 172.30.202.154;
## DHCP客户端的子网掩码
 option subnet-mask 255.255.248.0;
                     }


2. NFS服务器

创建目录 /nfstest
chmod -R 777 /nfstest
编辑/etc/exports 文件,添加
/nfstest  *(rw)
showmount -e IP

3. 代理服务器

搭建代理服务器
# yum install squid -y
# systemctl stop firewalld
# systemctl disable firewalld
# systemctl start squid
# systemctl enable squid


使用代理服务器
# vim /etc/profile
添加
export http_proxy=http://172.30.202.151:3128

# source /etc/profile
# echo $http_proxy
# curl www.baidu.con


4.

posted @ 2022-09-28 15:32  逃亡的布丁  阅读(85)  评论(2编辑  收藏  举报