pepoとネットワークを語ろう

40年前からこれまでとこれからのネットワークを語る

squidを久々に起動しようとしたらerrorになる、visible_hostnameを設定やて!

2013-09-27 17:08:10 | Linux

 #kof2013 のねた作りでsquidを久々に起動しようとしたらerrorになる、visible_hostnameを設定やて!

[root@~]# /etc/init.d/squid start
Starting squid: /etc/init.d/squid: line 42: 22459 Aborted $SQUID $SQUID_OPTS >> /var/log/squid/squid.out 2>&1

[root@~]# tail /var/log/squid/squid.out
Squid Cache (Version 2.6.STABLE21): Terminated abnormally.
CPU Usage: 0.014 seconds = 0.001 user + 0.013 sys
Maximum Resident Size: 7904 KB
Page faults with physical i/o: 0
FATAL: Could not determine fully qualified hostname. Please set 'visible_hostname'

Squid Cache (Version 2.6.STABLE21): Terminated abnormally.
CPU Usage: 0.013 seconds = 0.003 user + 0.010 sys
Maximum Resident Size: 7920 KB
Page faults with physical i/o: 0

設定ファイルに追加でOK
[root@~]# vi /etc/squid/squid.conf
visible_hostname unknown
# TAG: visible_hostname
# If you want to present a special hostname in error messages, etc,
# define this. Otherwise, the return value of gethostname()
# will be used. If you have multiple caches in a cluster and
# get errors about IP-forwarding you must set them to have individual
# names with this setting.
#
#Default:
# none

[root@~]# /etc/init.d/squid start
Starting squid: . [ OK ]

[root@~]# netstat -an
Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3128 0.0.0.0:* LISTEN
pepoと