[root@DBSVR01 e]# service httpd status
httpd is stopped
[root@DBSVR01 e]# apachectl start
httpd: Could not reliably determine the server's fully qualified domain name, using 168.168.80.8 for ServerName
[root@DBSVR01 e]# vim /etc/hosts
[root@DBSVR01 e]#
[root@DBSVR01 e]# apachectl start
httpd: Could not reliably determine the server's fully qualified domain name, using 168.168.80.8 for ServerName
[root@DBSVR01 e]# vim /etc/hosts
[root@DBSVR01 e]# apachectl -k start
httpd: Could not reliably determine the server's fully qualified domain name, using 168.168.80.8 for ServerName
httpd (pid 1733) already running
[root@DBSVR01 e]# service httpd start
Starting httpd:
[root@DBSVR01 e]# service httpd status
httpd (pid 1733) is running...
[root@DBSVR01 e]#
[root@DBSVR01 e]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 168.168.80.8 for ServerName
[ OK ]
[root@DBSVR01 e]#
(httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.111 for ServerName)
是因为DNS没配置好. 如果不想配置DNS, 就在httpd.conf , 在最前加入 ServerName localhost:80 即可
[root@DBSVR01 e]# /usr/sbin/apachectl -k stop
httpd: Could not reliably determine the server's fully qualified domain name, using 168.168.80.8 for ServerName
[root@DBSVR01 e]# service httpd status
httpd dead but subsys locked
[root@DBSVR01 e]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 168.168.80.8 for ServerName
[ OK ]
[root@DBSVR01 e]# i
[root@DBSVR01 e]# /usr/sbin/apachectl help
Usage: /usr/sbin/httpd [-D name] [-d directory] [-f file]
[-C "directive"] [-c "directive"]
[-k start|restart|graceful|graceful-stop|stop]
[-v] [-V] [-h] [-l] [-L] [-t] [-S]
Options:
-D name : define a name for use in <IfDefine name> directives
-d directory : specify an alternate initial ServerRoot
-f file : specify an alternate ServerConfigFile
-C "directive" : process directive before reading config files
-c "directive" : process directive after reading config files
-e level : show startup errors of level (see LogLevel)
-E file : log startup errors to file
-v : show version number
-V : show compile settings
-h : list available command line options (this page)
-l : list compiled in modules
-L : list available configuration directives
-t -D DUMP_VHOSTS : show parsed settings (currently only vhost settings)
-S : a synonym for -t -D DUMP_VHOSTS
-t -D DUMP_MODULES : show all loaded modules
-M : a synonym for -t -D DUMP_MODULES
-t : run syntax check for config files
[root@DBSVR01 e]#