botang 发表于 2019-12-16 21:00:44

课程第1次

# date +%s
1576415246
# bc
bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
scale=5
5/3
1.66666
# service dhcpd status
dhcpd (pid2447) is running...
# service xinetd status
xinetd (pid2418) is running...
# service named status
rndc: neither /etc/rndc.conf nor /etc/rndc.key was found
named (pid1750) is running...
# service nfs status
rpc.svcgssd is stopped
rpc.mountd (pid 2134) is running...
nfsd (pid 2131 2130 2129 2128 2127 2126 2125 2124) is running...
rpc.rquotad (pid 2118) is running...
# service rpcbind status
rpcbind (pid1773) is running...
# service httpd status
httpd (pid2550) is running...
# service vsftpd status
vsftpd (pid 2437) is running...# service dhcpd restart
Shutting down dhcpd:
Starting dhcpd:
# tail -f /var/log/messages
Dec 15 21:48:42 instructor dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Dec 15 21:48:42 instructor dhcpd: WARNING: Host declarations are global.They are not limited to the scope you declared them in.
Dec 15 21:48:42 instructor dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Dec 15 21:48:42 instructor dhcpd: Wrote 0 class decls to leases file.
Dec 15 21:48:42 instructor dhcpd: Wrote 0 deleted host decls to leases file.
Dec 15 21:48:42 instructor dhcpd: Wrote 0 new dynamic host decls to leases file.
Dec 15 21:48:42 instructor dhcpd: Wrote 13 leases to leases file.
Dec 15 21:48:42 instructor dhcpd: Listening on LPF/br0/00:0c:29:e6:58:98/192.168.0.0/24
Dec 15 21:48:42 instructor dhcpd: Sending on   LPF/br0/00:0c:29:e6:58:98/192.168.0.0/24
Dec 15 21:48:42 instructor dhcpd: Sending on   Socket/fallback/fallback-net
^[[B^C
# tail -n 30 -f /var/log/messages/var/lib/tftpboot/pxelinux.cfg
# /var/www/html
# ls
course   kick         lab            multiks.phprhce       vremote.cfgworkstation.cfg
coursesksupload.htmlleaser         printers   rhsurvey   vremote.php
ipa      ksupload.php   metadestroy.cfgpub          small.cfgvserver.php
# vim workstation.cfg






Rassss 发表于 2019-12-16 22:05:11

先来占个楼:D

wertopq13 发表于 2019-12-16 23:14:38

怎么感觉好像少了点代码

蘑菇 发表于 2019-12-16 23:36:28

1111111111

765686189 发表于 2019-12-17 01:48:10

请问一下,halt,init,shutdown哪种关机办法比较好,instructor采用shutdown now后,提示telling init to go to single user mode,百度之后用halt -p解决,但是为什么呢

Rassss 发表于 2019-12-17 14:28:00

      host server3 {
                hardware ethernet 00:50:56:29:3B:84;
                fixed-address 192.168.0.103;
      }
      host desktop3 {
                hardware ethernet 00:50:56:21:26:C2;
                fixed-address 192.168.0.3;
      }


#       The following lines are examples of kickstart
#       directives.
      filename "/kickstart/workstation.cfg";
# service dhcpd restart
Shutting down dhcpd:                                       
Starting dhcpd:                                          
# tail -f /var/log/messages
Dec 17 03:34:04 instructor dhcpd:
Dec 17 03:34:04 instructor dhcpd: This version of ISC DHCP is based on the release available
Dec 17 03:34:04 instructor dhcpd: on ftp.isc.org.Features have been added and other changes
Dec 17 03:34:04 instructor dhcpd: have been made to the base software release in order to make
Dec 17 03:34:04 instructor dhcpd: it work better with this distribution.
Dec 17 03:34:04 instructor dhcpd:
Dec 17 03:34:04 instructor dhcpd: Please report for this software via the Red Hat Bugzilla site:
Dec 17 03:34:04 instructor dhcpd:   http://bugzilla.redhat.com
Dec 17 03:34:04 instructor dhcpd:
Dec 17 03:34:04 instructor dhcpd: exiting.

修改完之后重启报错了   看不懂出错在哪里了,麻烦老师指导下

botang 发表于 2019-12-17 15:25:13

765686189 发表于 2019-12-17 01:48
请问一下,halt,init,shutdown哪种关机办法比较好,instructor采用shutdown now后,提示telling init to...

poweroff这个命令最好,只要ATX的电源,相当于halt +按电源键。

botang 发表于 2019-12-17 15:29:46

Rassss 发表于 2019-12-17 14:28
host server3 {
                hardware ethernet 00:50:56:29:3B:84;
                fixed- ...

tail -n 40/var/log/message多显示几行,可能会告诉你重复写了host 项,检查一下dhcpd-vserver.conf里有没有重复项。修改之前,最好保存原配置文件。再有最后一种可能,如果是在win上修改再上传到Linux上,上传之前请用ultraedit之类的工具,把文件转成UNIX格式。

Rassss 发表于 2019-12-17 16:43:39

botang 发表于 2019-12-17 15:29
tail -n 40/var/log/message多显示几行,可能会告诉你重复写了host 项,检查一下dhcpd-vserver.conf里 ...

最后发现多写了2个括号   {}多了2个这个    删掉之后可以了

Rassss 发表于 2019-12-17 22:51:44

# tail -n 40 -f /var/log/messages
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/A/IN': 192.203.230.10#53
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/AAAA/IN': 192.203.230.10#53
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/A/IN': 192.112.36.4#53
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/AAAA/IN': 192.36.148.17#53
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/A/IN': 128.63.2.53#53
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/AAAA/IN': 192.33.4.12#53
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/A/IN': 192.58.128.30#53
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/AAAA/IN': 2001:dc3::35#53
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/A/IN': 2001:dc3::35#53
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/AAAA/IN': 2001:503:ba3e::2:30#53
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/A/IN': 2001:500:2f::f#53
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/AAAA/IN': 192.58.128.30#53
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/A/IN': 198.41.0.4#53
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/AAAA/IN': 2001:500:1::803f:235#53
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/A/IN': 2001:7fd::1#53
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/AAAA/IN': 2001:7fd::1#53
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/A/IN': 2001:500:1::803f:235#53
Dec 18 02:36:55 instructor named: error (network unreachable) resolving '3.rhel.pool.ntp.org/AAAA/IN': 192.5.5.241#53
Dec 18 02:41:11 instructor dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
Dec 18 02:41:11 instructor dhcpd: Copyright 2004-2010 Internet Systems Consortium.
Dec 18 02:41:11 instructor dhcpd: All rights reserved.

唐老师这个是什么错误
页: [1] 2
查看完整版本: 课程第1次