用/etc/rc.d/init.d/squid start 启动,显示如下错误信息
# ./squid start
init_cache_dir /var/spool/squid... ./squid: line 162: 2065 Aborted
$SQUID -z -F -D 2>/dev/null
Starting squid: ./squid: line 162: 2066 Aborted $SQUID $SQUID_O
PTS 2>/dev/null
[FAILED]
shell里面应该是这句话
start() {
for adir in $CACHE_SWAP; do
if [ ! -d $adir/00 ]; then
echo -n "init_cache_dir $adir... "
$SQUID -z -F -D 2>/dev/null
fi
done
echo -n $"Starting $prog: "
如果直接启动sbin下的squid,则显示如下错误信息
FATAL: Could not determine fully qualified hostname. Please set 'visible_hostna
me'
Squid Cache (Version 2.5.STABLE1): Terminated abnormally.
CPU Usage: 0.030 seconds = 0.010 user + 0.020 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 406
Aborted
记得一般情况下直接运行squid应该什么信息都没有才对
能告诉我到底是什么错误么?
找到错误原因了
修改squid.conf配置文件'visible_hostname' 配置选项,随便给他加一个值就可以了
visible_hostname=xxxx
default 是none
如果多网卡或者多IP的时候,就会报错