服务器搭建简易版(linux)
## 服务器搭建
-----------------------------------------------------------
#### 1. DHCP服务器
```shell
[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 192.168.10.0 netmask 255.255.255.0 {
range 192.168.10.31 192.168.10.254;
## DHCP客户端的默认的转发地址
option routers 10.1.160.55;
## DHCP客户端的子网掩码
option subnet-mask 255.255.255.0;
}
```
-----------------------------------------------------------
#### 2. NFS服务器
```shell
# yum -y install nfs-utils rpcbind
创建目录 /nfstest
chmod -R 777 /nfstest
编辑/etc/exports 文件,添加
/nfstest *(rw)
# showmount -e IP
```
-----------------------------------------------------------
#### 3. 代理服务器
```sh
搭建代理服务器
# 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.
httpd服务
安装httpd
# yum install -y httpd
启动httpd
# systemctl start httpd
11111
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· 单线程的Redis速度为什么快?
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码