http://centossrv.com/ を参考に自分が使いやすそうなCentOSベースのサーバを作ってみる.
$ tar -xvzf 3DM2_CLI-Linux-x86-9.5.1.1.tgz $ su # chmod u+x setupLinux_x86.bin # ./setupLinux_x86.bin -console
$ sudo /usr/sbin/smartctl -a /dev/twe0 -d 3ware,4 > smart04 $ sudo /usr/sbin/smartctl -a /dev/twe0 -d 3ware,N > file
sudo /etc/rc.d/init.d/tdm2 restart
yum remove clamav-db clamav clamd
wget http://packages.sw.be/clamav/clamav-db-0.94.2-1.el5.rf.i386.rpm wget http://packages.sw.be/clamav/clamav-0.94.2-1.el5.rf.i386.rpm wget http://packages.sw.be/clamav/clamd-0.94.2-1.el5.rf.i386.rpm rpm -ivH clamav-db-0.94.2-1.el5.rf.i386.rpm rpm -ivH clamav-0.94.2-1.el5.rf.i386.rpm rpm -ivH clamd-0.94.2-1.el5.rf.i386.rpm
[2009/01/18 08:37:43, 0] libsmb/nmblib.c:send_udp(793) Packet send failed to ***.***.**.255(137) ERRNO=Operation not permitted [2009/01/18 08:37:43, 0] nmbd/nmbd_packets.c:send_netbios_packet(163) send_netbios_packet: send_packet() to IP ***.***.**.255 port 137 failed [2009/01/18 08:37:43, 0] nmbd/nmbd_namequery.c:query_name(245) query_name: Failed to send packet trying to query name DOMAIN_NAME<1d>
security = user
security = server password server = サーバ名
[2009/01/24 11:26:08, 0] nmbd/nmbd_packets.c:send_netbios_packet(163) send_netbios_packet: send_packet() to IP ***.***.**.255 port 137 failed [2009/01/24 11:26:08, 0] nmbd/nmbd_nameregister.c:register_name(512) register_name: Failed to send packet trying to register name DOMAIN_NAME<1e>
interfaces = eth0 lo
/etc/cron.daily/yum.cron: Error: Cannot retrieve repository metadata (repomd.xml) for repository: base-source. Please verify its path and try again
/etc/cron.daily/yum.cron: Traceback (most recent call last): File "/usr/bin/yum", line 29, in ? yummain.user_main(sys.argv[1:], exit_code=True) File "/usr/share/yum-cli/yummain.py", line 229, in user_main errcode = main(args) File "/usr/share/yum-cli/yummain.py", line 104, in main result, resultmsgs = base.doCommands() File "/usr/share/yum-cli/cli.py", line 343, in doCommands return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds) File "/usr/share/yum-cli/yumcommands.py", line 645, in doCommand return base.doShell() File "/usr/share/yum-cli/cli.py", line 284, in doShell yumshell.script() File "/usr/share/yum-cli/shell.py", line 78, in script self.onecmd(line) File "/usr/lib/python*.*/cmd.py", line 218, in onecmd return self.default(line) File "/usr/share/yum-cli/shell.py", line 101, in default self.base.doCommands() File "/usr/share/yum-cli/cli.py", line 339, in doCommands self._getTs(needTsRemove) File "/usr/lib/python*.*/site-packages/yum/depsolve.py", line 101, in _getTs self._getTsInfo(remove_only) File "/usr/lib/python*.*/site-packages/yum/depsolve.py", line 112, in _getTsInfo pkgSack = self.pkgSack File "/usr/lib/python*.*/site-packages/yum/__init__.py", line 591, in <lambda> pkgSack = property(fget=lambda self: self._getSacks(), File "/usr/lib/python*.*/site-packages/yum/__init__.py", line 446, in _getSacks self.plugins.run('exclude') File "/usr/lib/python*.*/site-packages/yum/plugins.py", line 176, in run func(conduitcls(self, self.base, conf, **kwargs)) File "/usr/lib/yum-plugins/versionlock.py", line 52, in exclude_hook (n,a,e,v,r) = pkg._pkgtup() File "/usr/lib/python*.*/site-packages/yum/sqlitesack.py", line 149, in __getattr__ raise KeyError, str(e) KeyError: 'no such column: _pkgtup'
$ rpm -e --allmatches yum --test ←試しにyumをrpmで削除してみる ↓依存性の問題を言われたので、全部削除してみた $ rpm -e --allmatches --test yum yum-cron yum-fastestmirror yum-downloadonly yum-priorities yum-versionlock yum-utils $ wget ****.rpm ←削除するrpmパッケージたちをあらかじめダウンロード(このとき、念のため5.2からダウンロードした。元の木阿弥?) ↓-testを外して削除 # rpm -e --allmatches yum yum-cron yum-fastestmirror yum-downloadonly yum-priorities yum-versionlock yum-utils # rpm --rebuilddb ←何となくデータベースを再構築 ↓ダウンロードしておいたrpmパッケージをすべてrpmにインストール! # rpm -i yum-cron-***.rpm yum-downloadonly-***.rpm yum-fastestmirror-***.rpm yum-priorities-***.rpm yum-utils-***.rpm yum-versionlock-***.rpm # /etc/rc.d/init.d/yum-cron start # chkconfig yum-cron on $ chkconfig --list yum-cron
sudo yum update
# vi /etc/sysconfig/named +OPTIONS="-4"
--------------------- Named Begin ------------------------ **Unmatched Entries** client ***.***.***.*** view hogehoge: update '***.***.***.***.in-addr.arpa/IN' denied: 24 Time(s) client ***.***.***.*** view hogehoge: update '***.***.***.ac.jp/IN' denied: 75 Time(s) connection refused resolving '****.****.com/A/IN': ***.***.***.***#53: 1 Time(s) connection refused resolving '****.****.com/A/IN': ***.***.***.***#53: 1 Time(s) ---------------------- Named End -------------------------
#geshi(perl,number,start=157){{
# } elsif ( ($Host, $Zone) = ( $ThisLine =~ /client ([^\#]+)#[^\:]+: zone transfer '(.+)' denied/ ) ) {
#geshi(perl,number,start=188){{
# } elsif ( ($Zone,$Message) = ( $ThisLine =~ /client [^:]+: [^:]+: updating zone '([^']+)': (.*)$/ ) ) {
#geshi(perl,number,start=199){{
# } elsif ( ($Rhost, $Ldom) = ($ThisLine =~ /client ([\d\.]+)#\d+: update '(.*)' denied/)) {
#geshi(perl,number,start=118){{
# ($ThisLine =~ /Connection refused/) or
cd /tmp/ wget http://www.mikecappella.com/logwatch/release/postfix-logwatch-1.37.08.tgz tar zxvf postfix-logwatch-1.37.08.tgz cd postfix-logwatch-1.37.08 sudo make install-standalone // install とか makeとかあったんだけれど,とりあえずinstall-standaloneを実行
cd /usr/share/logwatch/default.conf/services/ mv postfix.conf postfix.conf.20090309 cd /usr/share/logwatch/scripts/services/ sudo mv postfix postfix.20090309
cd /usr/local/etc/ sudo mv postfix-logwatch.conf /usr/share/logwatch/default.conf/services/postfix.conf sudo chown root:root /usr/share/logwatch/default.conf/services/postfix.conf sudo chmod 644 /usr/share/logwatch/default.conf/services/postfix.conf cd /usr/local/bin/ sudo mv postfix-logwatch /usr/share/logwatch/scripts/services/postfix sudo chown root:root /usr/share/logwatch/scripts/services/postfix sudo chmod 755 /usr/share/logwatch/scripts/services/postfix
wget http://www.mikecappella.com/logwatch/release/amavis-logwatch-1.49.09.tgz tar zxvf amavis-logwatch-1.49.09.tgz cd amavis-logwatch-1.49.09 make install-standalone
cd /usr/share/logwatch/default.conf/services/ sudo mv amavis.conf amavis.conf.20090309 cd /usr/share/logwatch/scripts/services mv amavis amavis.20090309
cd /usr/local/etc/ sudo mv amavis-logwatch.conf /usr/share/logwatch/default.conf/services/amavis.conf sudo chown root:root /usr/share/logwatch/default.conf/services/amavis.conf sudo chmod 644 /usr/share/logwatch/default.conf/services/amavis.conf cd /usr/local/bin/ sudo mv amavis-logwatch /usr/share/logwatch/scripts/services/amavis sudo chown root:root /usr/share/logwatch/scripts/services/amavis sudo chmod 755 /usr/share/logwatch/scripts/services/amavis
--------------------- Amavisd-new Begin ------------------------ "-T" is on the #! line, it must also be used on the command line at /usr/share/logwatch/scripts/services/amavis line 1. ---------------------- Amavisd-new End -------------------------
#! /bin/perl -T
#geshi(perl,number,start=66){{
($ThisLine =~ /smbd\/server.c:open_sockets_smbd\(\d+\) Reloading services after SIGHUP/) or ($ThisLine =~ /lib\/util_sock.c:get_peer_addr\(\d+\) getpeername failed. Error was Transport endpoint is not connected/) or
($ThisLine =~ /add_domain_logon_names/) or ($ThisLine =~ /become_domain_master/) or}}
#geshi(perl,number,start=131){{
} elsif ( ( $ThisLine =~ /lib\/util_sock.c:read_data\(436\)/ ) ) { # This is due to a nasty bug in samba which causes it to drop connections :-( $SocketReadError++;
} elsif (}}
#geshi(perl,number,start=136){{
} elsif ( ( $ThisLine =~ /lib\/util_sock.c:write_socket\(\d+\) write_socket: Error writing \d bytes to socket/ ) or ( $ThisLine =~ /lib\/util_sock.c:write_socket_data\(\d+\) write_socket_data: write failure./ ) or
( $ThisLine =~ /lib\/util_sock.c:send_smb\(\d+\) Error writing \d bytes to client. / ) ) {}}
#geshi(perl,number,start=72){{ LocalSocket /tmp/clamd.socket }}
#geshi(perl,number,start=72){{ LocalSocket /var/run/clamav/clamd.sock }}
# /etc/rc.d/init.d/clamd restart
# chown named /var/some/directory/