在yum启动nginx服务的时候出现:
[root@web02 ~]# /etc/init.d/nginx
Usage: /etc/init.d/nginx {start|stop|reload|configtest|status|force-reload|upgrade|restart|reopen_logs}
[root@web02 ~]# /etc/init.d/nginx start
Starting nginx: nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
[FAILED]

解决办法:
1、修改配置文件前先备份:
[root@web01 tools]# cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.bak
2、修改配置文件:
[root@web01 tools]# vim /etc/nginx/conf.d/default.conf

listen 80 default_server;
listen [::]:80 default_server;
改为:
listen 80;
#listen [::]:80 default_server;