永发信息网

Linux 服务的搭建 。。

答案:4  悬赏:80  手机版
解决时间 2021-05-17 19:43
  • 提问者网友:疯孩纸
  • 2021-05-17 14:04
朋友 我怎么感觉 Linux DNS 服务 搭建 那么复杂 。。 能不能加个QQ 指导下 。 我知道你Linux 很精通 。 我看过你的资料了。
最佳答案
  • 五星知识达人网友:笑迎怀羞
  • 2021-05-17 15:11

我直接写QQ不行啊!


他老是审核不通过啊!


DNS的搭建其实就是要改好些文件!


要装caching-nameserver bind-* bind-chroot


主配置文件/etc/named.conf


区域文件:/var/named/chroot/var/named

全部回答
  • 1楼网友:笑迎怀羞
  • 2021-05-17 16:21

1、相关的文件 samba-common samba服务器的主文件 samba 服务器端的软件 samba-client 客户端的软件 redhat-config-samba 图形界面的配置文件 samba-swat web配置工具 2、步骤 1)安装SAMBA服务器 (1)检测是否安装samba #rpm -qa | grep samba (2)安装:将第一张光盘放入光驱 #mount /mnt/cdrom #cd /mnt/cdrom/RedHat/RPMS #ls samba*.* #rpm -ivh samba-common-2.2.7a-7.9.0.i386.rpm #rpm -ivh samba-2.2.7a-7.9.0.i386.rpm #rpm -ivh samba-client-2.2.7a-7.9.0.i386.rpm #cd / #umount /mnt/cdrom #eject 2)设置samba的密码文件 (1)成批用户密码文件的生成 #cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd (2)删除一些无用的shell帐户 #vi /etc/samba/smbpasswd 从1到9。 (3)设置目录和文件的权限 #chown root.root /etc/samba/smbpasswd #chmod 500 /etc/samba #chmod 600 /etc/samba/smbpasswd #ll -d /etc/samba (4)单个用户设置samba密码 #useradd wujianan #passwd wujianan #smbpasswd -a wujianan 3)启动samba服务器 #service smb start #pstree | grep mbd #smbclient -L localhost或者IP地址 4)配置samba的共享 #vi /etc/samba/smb.conf [global] workgroup = workgroup server string = samba server ;hosts allow = 192.168.1. 192.168.2. 127. printcap = /etc/printcap load prints = yes printing = cups ;guest account = pcguest log file = /var/log/samba/%m.log max log size = 0 安全选项 security = user(share) encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd ;interfaces = 192.168.12.2/24 192.168.13.2/24 dns proxy = no 设置每个用户主目录共享 [homes] comment = Home Directries browseable = no 不允许浏览共享文件夹 writeable = yes 允许写入 valid users = %s create mode = 0664 directry mode = 0775 [printers] comment = All prints path = /var/spool/samba browseable = no printable = yes [doc] comment = doc path = /home/doc browseable = no writeable = no或 read only = yes guest ok = yes 示例: 要求:创建一个共享目录,所有用户都可访问,权限为只读。 #vi /etc/samba/smb.conf workgroup = workgroup server string = samba server netbios name = RH9 dos charset = cp936 unix charset = cp936 secrity = share [read] comment = read path = /home/read public = yes guest ok = yes read only = yes 保存退出 #mkdir /home/read #service iptables stop #service smb start #testparm \\ip地址 创建一个可写的目录,允许所有用户可写入。 [write] comment = write path = /home/write public = yes guest ok = yes writeable = yes 保存退出 #mkdir /home/write #chmod 777 /home/write #service iptables stop #service smb restart 为指定的用户和组访问samba服务器 #useradd mehost #passwd wujianan #smbpasswd -a wujianan #mkdir /var/samba/wujianan #chown stu1.stu1 /var/samba/wujianan #vi /etc/samba/smb.conf security = user [wujianan] comment = wujianan path = /var/samba/wujianan valid users = wujianan public = yes writeable = yes 保存退出 #service smb restart 最简单的电影服务器的配置 #vi /etc/samba/smb.conf workgroup = workgroup server string = movies server guest account = nobody security = share client code page = cp936 wins support = yes [movies] comment = movies browseable = yes writeable = no path = /movies guest ok = yes read only = yes 保存退出 #mkdir /movies #useradd admin -d movies #passwd admin #vi /etc/passwd admin:x:0:500::/movies:/bin/bash 保存退出 #ntsysv 选择smb和vsftp项 #service smb start #service vsftpd start #service iptables stop

参考资料: http://www.ylmf.net/?u=1700000

  • 2楼网友:行路难
  • 2021-05-17 16:03

给你一份我做的简单 buind DNS服务器。

named.conf 配置内容如下

-------------------------------------------------------------------------------------------------------------

// $FreeBSD: src/etc/namedb/named.conf,v 1.26.4.1 2008/01/13 20:48:23 dougb Exp $ // // Refer to the named.conf(5) and named(8) man pages, and the documentation // in /usr/share/doc/bind9 for more details. // // If you are going to set up an authoritative server, make sure you // understand the hairy details of how DNS works. Even with // simple mistakes, you can break connectivity for affected parties, // or cause huge amounts of useless Internet traffic. options { // Relative to the chroot directory, if any directory "/etc/namedb"; pid-file "/var/run/named/pid"; dump-file "/var/dump/named_dump.db"; statistics-file "/var/stats/named.stats"; forwarders { 202.96.134.133; 202.96.128.68; }; }; zone "cvsup.com.cn" { type master; file "/etc/named/etc/cvsup.com.cn"; }; zone "0.168.192.in-addr.arpa"{ type master; file "/etc/named/etc/192.168.0.arpa"; };

----------------------------------------------------------------

/etc/namedb/etc/192.168.0.arpa 配置内容如下 IP地址为本机的内网实际IP地址自己修改

-----------------------------------------------------------------

wordgao@www(/etc/namedb/etc)cat 192.168.0.arpa 我服务器的配置地址

$TTL 3600 @ IN SOA dns.cvsup.com.cn. root.dns.cvsup.com.cn. ( 2009100601 ; Serial 3600 ; Refresh 900 ; Retry 3600000 ; Expire 3600 ) ; Minimum IN NS dns.cvsup.com.cn. 227 IN PTR dns.cvsup.com.cn.

-----------------------------------------------------------------------------------------

/etc/namedb/etc

wordgao@www(/etc/namedb/etc)cat cvsup.com.cn

----------------------------------------------------------------------------------

$TTL 3600

@ IN SOA dns.cvsup.com.cn. root.cvsup.com.cn. ( 2009100601 ; Serial 360 ; Refresh 900 ; Retry 36000 ; Expire 3600 ) ; Minimum @ IN NS dns.cvsup.com.cn. cvsup.com.cn. IN A 192.168.0.227 www IN A 58.61.29.221 vod IN A 192.168.0.253
  • 3楼网友:归鹤鸣
  • 2021-05-17 15:49
我来也,我空间的文档够你学的了,基本的全了。
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯