linux开启域失败

linux开启域失败,第1张

linux开启域失败:Linux无法加入域的原因是域名输入方式不对,通信可能出现不正常。 解决方法:打开终端管理器,输入setup,选择运行工具、选中全部用户信息和验证、输入正确的域名即可、选中/bin/bash这个选项然后选中加入域、选择是、输入域的管理员密码,点击确定即可。

1.配置DNS

# vi /etc/resolv.conf

nameserver 192.168.2.30

nameserver 192.168.2.32

# vi /etc/host.conf

# nslookup 192.168.2.32 DNS查找

# net time SET 192.168.2.32 时间同步,客户端以服务器时间为准

2.samba

首先确保Linux系统中安装了samba包,并用下述命令来检查samba包的基础库支持,一般的RPM安装都不会有问题。

# smbd -b | grep LDAP

HAVE_LDAP_H

HAVE_LDAP

HAVE_LDAP_DOMAIN2HOSTLIST

...

# smbd -b | grep KRB

HAVE_KRB5_H

HAVE_ADDRTYPE_IN_KRB5_ADDRESS

HAVE_KRB5

...

# smbd -b | grep ADS

WITH_ADS

WITH_ADS

# smbd -b | grep WINBIND

WITH_WINBIND

WITH_WINBIND

3.krb5配置

配置编辑/etc/krb5.conf,配置完成后,执行

# kinit [email protected]

4.Samba配置

编辑配置/etc/samba/smb.conf后,重启samba服务

# service samba restart

# net ads join -U [email protected] 加入域,这时需要输入域管理员密码

5.winbind配置

编辑/etc/nsswitch.conf,更改passwd和group为(files需视你linux系统配置NIS与否,如配置NIS,则为compat)

passwd: files winbind

group: files winbind

保存后(重)启动samba服务。(重)启动winbind。

用 wbinfo -u检索用户,wbinfo -g检索用户组来测试winbind是否正常。

1.配置DNS

# vi /etc/resolv.conf

nameserver 192.168.2.30

nameserver 192.168.2.32

# vi /etc/host.conf

# nslookup 192.168.2.32 DNS查找

# net time SET 192.168.2.32 时间同步,客户端以服务器时间为准

2.samba

首先确保Linux系统中安装了samba包,并用下述命令来检查samba包的基础库支持,一般的RPM安装都不会有问题。

# smbd -b | grep LDAP

HAVE_LDAP_H

HAVE_LDAP

HAVE_LDAP_DOMAIN2HOSTLIST

...

# smbd -b | grep KRB

HAVE_KRB5_H

HAVE_ADDRTYPE_IN_KRB5_ADDRESS

HAVE_KRB5

...

# smbd -b | grep ADS

WITH_ADS

WITH_ADS

# smbd -b | grep WINBIND

WITH_WINBIND

WITH_WINBIND

3.krb5配置

配置编辑/etc/krb5.conf,配置完成后,执行

# kinit [email protected]

4.Samba配置

编辑配置/etc/samba/smb.conf后,重启samba服务

# service samba restart

# net ads join -U [email protected] 加入域,这时需要输入域管理员密码

5.winbind配置

编辑/etc/nsswitch.conf,更改passwd和group为(files需视你linux系统配置NIS与否,如配置NIS,则为compat)

passwd: files winbind

group: files winbind

保存后(重)启动samba服务。(重)启动winbind。

用 wbinfo -u检索用户,wbinfo -g检索用户组来测试winbind是否正常。

1、首先用putty远程登录服务器。

2、进入此文件夹。cd /var/www/conf/ 编辑httd.confi文件vi httpd.conf,然后按I,进入编辑模式,修改如下参数:

例如:

<VirtualHost *:80>

ServerAdmin [email protected]

DocumentRoot /www/docs/dummy-host.example.com

erverName v7o.cn   #如果要修改主域名,修改此处域名并保存即可。

ErrorLog logs/dummy-host.example.com-error_log --记录错误日志文件路径

CustomLog logs/dummy-host.example.com-access_log common--客户访问日志路径

</VirtualHost>

如果要添加一个域名,添加ServerAlias字段即可。如添加abc123.com作为网站的第二个域名:

<VirtualHost *:80>

ServerAdmin [email protected] 

DocumentRoot /www/docs/dummy-host.example.com

ServerName v7o.cn

ServerAlias v7o.cn

ErrorLog logs/dummy-host.example.com-error_log --记录错误日志文件路径

CustomLog logs/dummy-host.example.com-access_log common--客户访问日志路径

</VirtualHost>

3、重启服务

# /var/www/bin/apachectl restart

修改完毕保存配置文件,需重启apache才能生效。


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/tougao/6076143.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-13
下一篇 2023-03-13

发表评论

登录后才能评论

评论列表(0条)

保存