树莓派安装DNSMASQ服务
2018-02-13 16:06
141 查看
功能: DNSMASQ是一款高性能的、小型的DNS服务器软件。
* 缓存域名、IP地址,本地缓存解析的地址。
* DHCP服务
sudo apt-get update
sudo apt-get install dnsmasq
# dnsmasq.conf for raspberry pi
# /etc/dnsmasq.conf
# http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq.conf.example
# Set up your local domain here
domain=raspberry.local
resolv-file=/etc/resolv.conf
min-port=4096
server=8.8.8.8
server=8.8.4.4
# Max cache size dnsmasq can give us, and we want all of it!
cache-size=10000
# Below are settings for dhcp. Comment them out if you dont want
# dnsmasq to serve up dhcpd requests.
# dhcp-range=192.168.0.100,192.168.0.149,255.255.255.0,1440m
# dhcp-option=3,192.168.0.1
# Generated by resolvconf
nameserver 127.0.0.1
可以自己增加nameserver ip 地址。
树莓派中设置hostname为pi1。
PC机或手机中DNS中设置为:pi1.local
* 缓存域名、IP地址,本地缓存解析的地址。
* DHCP服务
1.安装
sudo apt-get update
sudo apt-get install dnsmasq
2.配置
(1) 配置/etc/dnsmasq.conf
# dnsmasq.conf for raspberry pi
# /etc/dnsmasq.conf
# http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq.conf.example
# Set up your local domain here
domain=raspberry.local
resolv-file=/etc/resolv.conf
min-port=4096
server=8.8.8.8
server=8.8.4.4
# Max cache size dnsmasq can give us, and we want all of it!
cache-size=10000
# Below are settings for dhcp. Comment them out if you dont want
# dnsmasq to serve up dhcpd requests.
# dhcp-range=192.168.0.100,192.168.0.149,255.255.255.0,1440m
# dhcp-option=3,192.168.0.1
(2) 配置 /etc/resolv.conf
# Generated by resolvconf
nameserver 127.0.0.1
可以自己增加nameserver ip 地址。
3.使用
启动:sudo service dnsmasq restart
树莓派中设置hostname为pi1。
PC机或手机中DNS中设置为:pi1.local
相关文章推荐
- 在树莓派上安装远程桌面服务
- 树莓派3 之 安装Mysql服务
- 树莓派Ubuntu Mate16.04系统安装DNSMASQ
- 树莓派安装samba服务
- CentOS dnsmasq 功能外篇——配置PXE服务并使用kickstart安装配置系统
- 树莓派SSH连接-SSH服务安装与开机自动启动
- 树莓派3 安装OSMC系统搭建媒体服务
- windows 服务的安装和卸载
- memcached服务及其相关库以及php的memcached扩展的安装总结
- 编译安装httpd2.4,配置httpd服务
- Windows 平台下安装Cygwin后,sshd服务无法启动
- PHP服务安装实战
- smb网络服务介绍及其安装配置
- 树莓派下的基本命令和安装MySQL vim等
- Dnsmasq安装与配置
- 树莓派3三款中文输入法安装图文教程
- win7下配置安装subversion服务-SVN
- 树莓派2B安装OpenCV 2.4.11
- Google、IBM和Lyft开源的微服务管理框架Istio安装文档
- Linux学习之CentOS(三十六)--FTP服务原理及vsfptd的安装、配置