启动squid服务失败!

[root@squid_A ~]# service squid restart
停止 squid:                                               [失败]
init_cache_dir /var/spool/squid... /etc/init.d/squid: line 62:  3017 已放弃               $SQUID -z -F -D >>
/var/log/squid/squid.out 2>&1
启动 squid:/etc/init.d/squid: line 42:  3137 已放弃               $SQUID $SQUID_OPTS >>
/var/log/squid/squid.out 2>&1
                                                           [失败]
[root@squid_A ~]#
[root@squid_A ~]# squid -z  #初始化缓存
FATAL: Could not determine fully qualified hostname.  Please set 'visible_hostname'
Squid Cache (Version 2.6.STABLE21): Terminated abnormally.
CPU Usage: 0.003 seconds = 0.000 user + 0.003 sys
Maximum Resident Size: 7552 KB
Page faults with physical i/o: 0
已放弃
[root@squid_A ~]#



解决办法:在hosts文件增加记录


#vim /etc/hosts
192.168.10.20 squid_A.tarena.com  squid_A
[root@squid_A ~]# squid -z                        
2014/03/12 14:06:39| Creating Swap Directories
[root@squid_A ~]#
[root@squid_A ~]# service squid restart
停止 squid:                                               [失败]
启动 squid:.                                              [确定]
[root@squid_A ~]#



ok!重启成功