Home > Tags > CentOS
CentOS
[courier-authlib]vpopmailをSMTP-AUTH対応させる為のcourier-authlibを置いておく[vpopmail]
CentOSで自宅サーバー構築のバーチャルドメイン設定(Postfix&Dovecot+qmail&vpopmail)で、
2)SMTP-AUTHのvpopmail対応という箇所がありますが、
そこで使用しているcourier-authlibの配布元からダウンロードできるバージョンでは「vchkpw認証」が出来ません。
ということで、「vchkpw認証」できる古いバージョンのファイルを置いておきます。
http://ore.saizensen.net/wp-content/uploads/2009/11/courier-authlib-0.60.2.tar.bz2
古いバージョンのを使う以外にどうしたらいいんでしょうか・・・vchkpw認証をやめて他の方法にしますかねぇ。
- Comments: 0
- Trackbacks: 0
[CentOS]Unisonをインストールして同期バックアップする。[Unison]
土曜日に1TBのHDを買って来たのでCentOSサーバー(ore.saizensen.net)へ追加するとです。
今、付いてる古いHDをバックアップ専用として同期バックアップを行うとです。
- Yumでunisonをインストール。
# yum -y install unison
- 同期設定をつくる。
# vi /root/unison.sh
#!/bin/bash LANG=C unison /backup /storage_1/backup -batch -owner -group -force /backup -fastcheck false unison /storage_2/develop /storage_1/develop -batch -owner -group -force /storage_2/develop -fastcheck false
こんな感じ。
一番上の例だと、/storage_2/develop を /storage_1/develop へ同期します。
また同期先(この例だと/storage_1/develop)のdevelopディレクトリは先に作成しておきます。
※以下オプション詳細↓
-batch:バッチ処理します。何も聞かれずに最後まで終了します。
-owner:オーナー情報も同期します。
-group:グループ情報も同期します。
-force xxx:指定したディレクトリを基準にして同期します。ミラーリングのような動作です。
-fastcheck {true,false,defalut}:trueの場合、ファイルの日付で比較します。unixの場合のデフォルトの動作です。心配ならばfalseでチェックしましょう。# chmod 700 /root/unison.sh
- cronへ登録。
#crontab -e
00 05 * * * /root/unison.sh
おわり。
そういや、iphone3GS買いました。発売日の次の日に。
macbookのUSキーボードモデルは買ってもらいました。月曜、うちの社長に。
なにしよーかなーなにしよーかなー
- Comments: 0
- Trackbacks: 0
[CentOS]PostfixでSubmissionポート(587番)を使う。[Postfix]
先日のエントリー[CentOS]いつの間にかCentOS4.7サーバーからGmailへメール送信出来なくなってた。[Postfix]で、
OP25B対策にIPマスカレード対応ルーターで、ルーター外側のポート587を、ルーター内側のポート25に対応させるってっ書いて、一部のサーバーのルーターに設定したのですが全くポートが開かず・・・って感じでハマッってしまった。
そのルーターがNetGenesis SuperOPT100Eなのですが、よく商品詳細ページを見ていると「静的IPマスカレード対応」って書いてある・・・・・ポート変換出来んのかい!!
ということで、587番→25番へポート変換はやめて、587番→587番とそのままでPostfix側でSubmissionポート(587番)を対応させることにします。
- # vi /etc/postfix/master.cf
以下の行のコメントアウトを外して有効にする。submission inet n - n - - smtpd
- /etc/services に以下の行があるか確認。
submission 587/tcp msa # mail message submission submission 587/udp msa # mail message submission
- ルーターのIPマスカレード設定(ポート変換)でTCP587→TCP587を開ける。
- iptablesのTCP587ポートも開ける。
iptables -A INPUT -p tcp --dport 587 -j ACCEPT
これで、PostfixがSubmissionポート(587番)で待ち受け開始します。
- Comments: 0
- Trackbacks: 1
[CentOS]CentOS5の「PHP、MySQL、PostgreSQL」のバージョンをYumでアップデートする。
なんかサーバーを弄ってたら、PHPとかMySQLとかPostgresのバージョンを無性に上げたくなってきたからバージョンアップした。全部、自前でbuildなんてやってられんので全てYumで管理します。
CentOSのリポジトリのPHPなんて5.1.6とかPostgresが8.1とか・・・ねぇ?って感じだったのでつい・・・
ということでインストールメモ開始。このブログ、インストールメモ専門になってきたな・・・
- まず標準のCentOSのリポジトリからPHP、MySQL、PostgreSQLを除外する.。
# vi /etc/yum.repos.d/CentOS-Base.repo [base] ## [base]の項目に↓を追加 exclude=postgresql* php* mysql* [updates] ## [updates]の項目にも↓を追加 exclude=postgresql* php* mysql*
- PHPとMySQLをアップデートする用にまずリポジトリ追加。
# rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka # vi /etc/yum.repos.d/utterramblings.repo ## ←のファイル作って以下の内容で保存。 [utterramblings] name=Jason's Utter Ramblings Repo baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/ enabled=1 gpgcheck=1 gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
- PostgreSQLをアップデートする用にやっぱりまずはリポジトリ追加。
# wget http://yum.pgsqlrpms.org/reporpms/8.3/pgdg-centos-8.3-5.noarch.rpm # rpm -ivh pgdg-centos-8.3-5.noarch.rpm
- PHPとMySQLとPostgreSQLをアップデート。
# yum update
- ※ x86_64な環境の人で、既にMySQLをインストールしている人は一度削除してからインストールしなおしてください。(mysql、mysql-devel、mysql-server)
# yum -y remove mysql mysql-devel mysql-server # yum -y install mysql mysql-devel mysql-server
- ※ 既にPostgreSQLをインストール済の人で「古いバージョンの〜〜〜アップグレードする必要があります。」と言われた場合
- dataを削除、またはリネーム
# mv /var/lib/pgsql/data /var/lib/pgsql/data.old
- DB初期化
# /etc/init.d/postgresql initdb
- PostgreSQL再起動
# /etc/init.d/postgresql restart
- dataを削除、またはリネーム
- ※ x86_64な環境の人で、既にMySQLをインストールしている人は一度削除してからインストールしなおしてください。(mysql、mysql-devel、mysql-server)
- リポジトリ追加したらyumでXcacheとかPostGISがインストールできるようになってたからインストールした。
# yum -y install php-xcache postgis
各設定は以下を参考に。Ubuntu用に書いたけどほとんどいっしょなので。
- [Ubuntu]Ubuntu8.10へApache、PHP、MySQL、PostgreSQLをインストールする。[LAMP]
- [PHP]CentOSへXCacheをインストールしたメモ。[XCache]
xcache.ini : /etc/php.d/xcache.ini - [Ubuntu]Ubuntu8.10でPostGISを使えるようにする。[PostGIS]
lwpostgis.sql : /usr/share/pgsql/contrib/lwpostgis.sql
spatial_ref_sys.sql : /usr/share/pgsql/contrib/spatial_ref_sys.sql
php.ini : /etc/php.ini
my.cnf : /etc/my.cnf
postgresql.conf : /var/lib/pgsql/data/postgresql.conf
pg_hba.conf : /var/lib/pgsql/data/pg_hba.conf
- Comments: 0
- Trackbacks: 0
[CentOS]いつの間にかCentOS4.7サーバーからGmailへメール送信出来なくなってた。[Postfix]
昨日、社内に置いているCentOS4.7サーバーから自分のGmailへメール送信してみたら、Undelivered Mail Returned to Senderってメーラーデーモンさんがリターンメール返してきた。↓中身。
<bubbkis @ gmail.com>: host gmail-smtp-in.l.google.com[209.85.143.114] said:
550-5.7.1 [**.**.**.**] The IP you're using to send mail is not
authorized 550-5.7.1 to send email directly to our servers. Please use the
SMTP 550-5.7.1 relay at your service provider instead. Learn more at
550 5.7.1 http://mail.google.com/support/bin/answer.py?answer=10336
i6si3435826tid.5 (in reply to end of DATA command)
英語よくわからんけど、「メール送るときはプロバイダーのSMTP使って送ってこい、カス。」と言っとるわけですね。
はい、分かりましたということで今回は、
PostfixのRelayhost設定にプロバイダーのSMTPを指定して、メール送信は全部プロバイダーのSMTP経由で送信するというメモです。(当方のプロバイダーはアサヒネットなので、アサヒネットじゃない人は適当に変えて下さい。)
ついでに社外からこのSMTPサーバーを使うときにOP25Bに引っかかる人がいるのでOP25B対策もしました。(IPマスカレード対応ルーターで、ルーター外側のポート587を、ルーター内側のポート25に対応させただけですけど。)
- # vi/etc/postfix/main.cf
## relayhostへプロバイダーのSMTPサーバーを指定。 relayhost = [op25b.asahi-net.or.jp] ## SMTP Submission port Setting ## ファイルの最後に追加 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/authinfo smtp_sasl_security_options = noanonymous smtp_sasl_mechanism_filter = cram-md5,digest-md5,plain,login
smtp_sasl_mechanism_filter = へ設定する値の調べ方は、
# telnet プロバイダのSMTPサーバー名 25 または 587 Trying 202.224.39.196... Connected to mail.asahi-net.or.jp (202.224.39.196). Escape character is '^]'. 220 mail.asahi-net.or.jp ESMTP Postfix ehlo localhost ## ←タイプする。 250-mail.asahi-net.or.jp 250-PIPELINING 250-SIZE 250-ETRN 250-AUTH PLAIN LOGIN DIGEST-MD5 CRAM-MD5 250-AUTH=PLAIN LOGIN DIGEST-MD5 CRAM-MD5 ## ←これをsmtp_sasl_mechanism_filterへ設定する。 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN quit ## ←タイプする。 221 2.0.0 Bye Connection closed by foreign host.
- # vi /etc/postfix/master.cf
## 以下の3行のコメントアウトを外す。 submission inet n - n - - smtpd -o smtpd_etrn_restrictions=reject -o smtpd_client_restrictions=permit_sasl_authenticated,reject - プロバイダーのSMTPサーバーへの認証情報を設定する。(ユーザー名、パスワードはプロバイダー契約時に設定したもの。)
# echo [SMTPサーバー名]:587 ユーザー名:パスワード > /etc/postfix/authinfo # postmap /etc/postfix/authinfo
どこかのサイトで
# chmod 640 /etc/postfix/authinfo
ってroot以外参照できないようにパーミッション変更してたのを真似たら、一切ログイン出来なくなってしまってハマった。
- # /etc/rc.d/init.d/postfix reload でPostfix設定反映
以上で、メール送信はプロバイダーのSMTPサーバー経由になりました。
- Comments: 0
- Trackbacks: 1
[PHP]CentOSへXCacheをインストールしたメモ。[XCache]
またインストールメモ。今後、サーバーを作る時用の自分用メモばっか書いてますな、最近。
ということで、CentOS5.2へXCacheをインストールしました。
- phpizeの為に、php-deveをインストール。
# yum -y install php-devel
- Xcacheの取得 && インストール。
# cd /usr/local/src # wget http://xcache.lighttpd.net/pub/Releases/1.2.2/xcache-1.2.2.tar.gz # tar zxvf xcache-1.2.2.tar.gz # cd xcache-1.2.2 # phpize # ./configure --enable-xcache --enable-xcache-coverager # make # make test # make install
インストール後、表示されるパスをメモしておく。↓みたいな。
Installing shared extensions: /usr/lib64/php/modules/
- XCacheのWebインタフェースを公開ディレクトリへコピー。
# cp -R admin /var/www/html/ # cp -R coverager /var/www/html/ # mv /var/www/html/admin /var/www/html/xcache
- XCacheの設定。
# mkdir /tmp/pcov # chown apache.apache /tmp/pcov ##←Apache実行ユーザーへ # cat xcache.ini >> /etc/php.ini # cat /proc/cpuinfo | grep -c processor ##←表示された数値をメモ。 # echo "< ?php echo md5('pass'); ?>" | php ##←表示された文字列をメモ。 # vi /etc/php.ini以下、/etc/php.ini のXCache設定内容。
- zend_extension = インストール後表示されたパスを指定。
- xcache.count = # cat /proc/cpuinfo | grep -c processor で表示された数値。
- xcache.admin.user = “hoge” # 適当なユーザーを指定。
- xcache.admin.pass = # echo “< ?php echo md5('pass'); ?>” | php で表示された文字列。
[xcache-common] ;; install as zend extension (recommended), normally "$extension_dir/xcache.so" ;zend_extension = /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so zend_extension = /usr/lib64/php/modules/xcache.so ; zend_extension_ts = /usr/local/lib/php/extensions/non-debug-zts-xxx/xcache.so ;; For windows users, replace xcache.so with php_xcache.dll ;zend_extension_ts = c:/php/extensions/php_xcache.dll ;; or install as extension, make sure your extension_dir setting is correct ; extension = xcache.so ;; or win32: ; extension = php_xcache.dll [xcache.admin] xcache.admin.enable_auth = On xcache.admin.user = "hoge" ; xcache.admin.pass = md5($your_password) xcache.admin.pass = "******************************" [xcache] ; ini only settings, all the values here is default unless explained ; select low level shm/allocator scheme implemenation xcache.shm_scheme = "mmap" ; to disable: xcache.size=0 ; to enable : xcache.size=64M etc (any size > 0) and your system mmap allows xcache.size = 64M ; set to cpu count (cat /proc/cpuinfo |grep -c processor) xcache.count = 1 ; just a hash hints, you can always store count(items) > slots xcache.slots = 8K ; ttl of the cache item, 0=forever xcache.ttl = 0 ; interval of gc scanning expired items, 0=no scan, other values is in seconds xcache.gc_interval = 0 ; same as aboves but for variable cache xcache.var_size = 8M xcache.var_count = 1 xcache.var_slots = 8K ; default ttl xcache.var_ttl = 600 xcache.var_maxttl = 3600 xcache.var_gc_interval = 300 xcache.test = Off ; N/A for /dev/zero xcache.readonly_protection = Off ; for *nix, xcache.mmap_path is a file path, not directory. ; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection ; 2 group of php won't share the same /tmp/xcache ; for win32, xcache.mmap_path=anonymous map name, not file path xcache.mmap_path = "/tmp/xcache" ; leave it blank(disabled) or "/tmp/phpcore/" ; make sure it's writable by php (without checking open_basedir) xcache.coredump_directory = "" ; per request settings xcache.cacher = On xcache.stat = On xcache.optimizer = Off [xcache.coverager] ; per request settings ; enable coverage data collecting for xcache.coveragedump_directory and xcache_coverager_start/stop/get/clean() functions (will hurt executing performance) xcache.coverager = On ; ini only settings ; make sure it's readable (care open_basedir) by coverage viewer script ; requires xcache.coverager=On xcache.coveragedump_directory = "/tmp/pcov"
- Apacheを再起動。
# /etc/rc.d/init.d/httpd restart
- /var/www/html/coveragerディレクトリへ.htaccessを設置。↓内容。
AuthUserFile /etc/httpd/conf/.htpasswd AuthGroupFile /dev/null AuthName "XCache Coverage Viewer" AuthType Basic #require valid-user require user hoge
以上。
- Comments: 0
- Trackbacks: 0
[CentOS]Apacheアクセスログ解析にVisitorsをインストールしたメモ。[Apache]
このore.saizensen.netでも使ってきてたApacheアクセスログ解析ソフト「Visitors」を別のサーバーにもインストールしたので、ここにメモ書き程度に残しておきます。
グラフ化しても、たいして見ないのでgraphvizはインストールしません、私は。
- 日本語対応の為に、nkfをインストール。
# yum -y install nkf
- Visitorsの取得 && インストール。
# cd /usr/local/src # wget http://www.hping.org/visitors/visitors-0.7.tar.gz # tar zxvf visitors-0.7.tar.gz # cd visitors_0.7 # make # cp visitors /usr/bin/ # cd
- アクセスログ解析結果出力ティレクトリ作成。
# mkdir /var/www/html/log # chown hoge.hoge /var/www/html/log
- アクセスログ解析スクリプト作成。
# vi accesslog.sh #!/bin/bash # ユーザーネームを記載 username=hoge # アクセス解析用ディレクトリを記載 addlog=/var/www/html/log/ # このスクリプトのログファイル名を記載 logfile=/var/log/logsearch.log function logsearch { date '+%Y/%m/%d(%a) %T' for a in `find /var/log/httpd/* -mtime -2` do log=`basename $a` visitors -A -m 30000 $a -o html > $addlog$log nkf -w -m0 $addlog$log > $addlog$log.html rm -f $addlog$log done } logsearch >> $logfile 2>&1 echo "" >> $logfile; echo "" >> $logfile; chown -R $username:$username $addlog - 作成したaccesslog.shを実行 && cronへ。
# chmod +x accesslog.sh # ./accesslog.sh # mv accesslog.sh /etc/cron.daily/
- アクセスログ公開ティレクトリへ.htaccess設置。↓中身。
Options Indexes Includes ExecCGI FollowSymLinks MultiViews AuthUserFile /etc/httpd/conf/.htpasswd AuthGroupFile /dev/null AuthName "Apache Logs" AuthType Basic require user hoge
終了です。hogeって書いてる所は適当に直してね。
- Comments: 0
- Trackbacks: 0
[CentOS]CentOS5.2サーバーにTorrentflux-b4rtをインストールした。[BitTorrent]
家のCentOS5.2サーバーにTorrentflux-b4rtをインストールして、サーバー上にBitTorrentWEBクライアントを設置しました。
動作環境は、
- A Unix like OS (Win32 not supported) – current tested OSs include:
- Linux: Debian, Ubuntu, Gentoo, RedHat, Fedora, NSLU2, ClarkConnect – amongst others!
- BSD: FreeBSD, OpenBSD, NetBSD
- Apple: Mac OS X
- A Web Server – any Unix like webserver that supports PHP should work. Current supported/tested:
- An SQL-Database – current supported db types are:
- PHP 4.3.x or higher.
- Python 2.2 or higher.
- Perl 5.6 or higher (for the optional fluxd daemon).
と、なっとります。
その時のインストールメモ。
- CentOSサーバー上にApache(or Lighttpd)、MySQL(or SQLite or PostgreSQL)、PHPなLAMP環境を整えておきます。今回は既にLAMP環境は構築済ですので省略。PythonもPerlもyumでインストール済。
-
- Torrentflux-b4rtを取って来る。
- 展開。
- webrootディレクトリへ移動。
- 所有者変更。Apacheユーザーへ
- ダウンロードディレクトリ作成し、Apacheユーザーが書き込めるようにPermission変更。今回はSambaの共有ディレクトリ内へ作りました。
[root@centos ~]# cd /usr/local/src [root@centos ~]# wget http://download.berlios.de/tf-b4rt/torrentflux-b4rt_1.0-beta2.tar.bz2 [root@centos ~]# tar xjvf torrentflux-b4rt_1.0-beta2.tar.bz2 [root@centos ~]# mv torrentflux-b4rt_1.0-beta2 /var/www/html/torrrentflux [root@centos ~]# chown -R apache.apache /var/www/html/torrentflux [root@centos ~]# mkdir /storage_1/downloads [root@centos ~]# chown -R nobody.nobody /storage_1/downloads [root@centos ~]# chmod -R 777 /storage_1/downloads [root@centos ~]# cd
- ブラウザでsetup.phpへアクセスして指示通りにTorrentfluxのインストール。
この時、私の場合だとcksfv、vlc、uudeviewが無いと表示されていたのでyumでインストール。
あと、本体のBitTorrentクライアントをインストール。デフォルトのBitTornadoと無いよと表示されていたTransmission。
TransmissionはTorrentflux-b4rtのアーカイブ内にTransmission-1.06のパッチファイルが収録されているので、それを使用してインストール。[root@centos ~]# yum --enablerepo=rpmforge install cksfv [root@centos ~]# yum --enablerepo=rpmforge install vlc [root@centos ~]# yum --enablerepo=rpmforge install uudeview [root@centos ~]# cd /usr/local/src [root@centos ~]# wget http://download.m0k.org/transmission/files/transmission-1.06.tar.bz2 [root@centos ~]# tar jxvf transmission-1.06.tar.bz2 [root@centos ~]# cd transmission-1.06 [root@centos ~]# tar jxvf /var/www/html/torrentflux/clients/transmission/Transmission-1.06_tfCLI-svn3356.tar.bz2 [root@centos ~]# cp -R /var/www/html/torrentflux/clients/transmission/Transmission-1.06_tfCLI-svn3356/cli ./ [root@centos ~]# ./configure [root@centos ~]# make [root@centos ~]# make install [root@centos ~]# cd /usr/local/src [root@centos ~]# wget http://download2.bittornado.com/download/BitTornado-0.3.18.tar.gz [root@centos ~]# tar zxvf BitTornado-0.3.18.tar.gz [root@centos ~]# cd BitTornado-CVS [root@centos ~]# python setup.py install [root@centos ~]# cd
- iptablesのTCP49160:49300ポートを開ける。
- torrentfluxディレクトリに.htaccessを設置してアクセス制限を掛ける。
以上です。これでいつでもブラウザ上からtorrentを使ってダウンロード出来るようになりました。
- Comments: 0
- Trackbacks: 1
[CentOS]CentOSへ3ware 9650SE-2LPを差してRAID環境作りましたよ。[RAID]
タイトル通り、CentOS5.2-64bit版へ3ware 9650SE-2LPを差してRAID環境作りました。その時のメモ。
まず用意したのが3ware 9650SE-2LPというRAIDカード。
お金無いから、RAID0かRAID1のみ可能な2portカードです。とりあえずRAID1のミラーリングが目的だからこれでいいんです。
で、以下作業。
- まず3wareから最新のドライバーを取ってくる。CentOS5だからRedHatEL5用のを。
- 取ってきたファイルを展開する。中にdriverとinstalldiskの2種、x86用とx86_64用のアーキテクチャ別にアーカイブされているので、今回はCentOSの64bitを新規インストールするのでinstalldisk-x86_64を選んでさらに展開する。展開された中身を全部フロッピーへ突っ込む。
- RAIDカードをサーバーへ取り付けSATAのHD2台へケーブル接続。この時、別に取り付けてたHDを床に落としてしまいIOエラーでご臨終してしまいました・・・
- サーバー本体の電源投入し、3wareのBIOS画面になったらAlt-3キーで設定画面へ。マニュアル通り設定すれば簡単なので詳細はめんどいので除きます。マニュアル無くても設定できるくらいです。とまぁRAIDユニットの作成を完了させます。
- CentOSのインストールディスクとさっき作ったRAIDカードのおドライバーフロッピーを入れ、インストール開始画面になったら
linux dd
で起動する。すると、「何かハードウェアのドライバーディスク持ってるか?」と聞いてくるので「YES」を選んでドライバーをロードする。この時、正常にロードすると
Loading 3w-9xxx driver
と表示される。ここでどっぷりとハマってしまいましたんですけどね。最初、CentOS5.0のインストールディスクを使っていたら、Loading 3w-9xxx driverと全く表示されませんでした。表示されないけどロードしてそうな雰囲気だったので、そのまま作業進めてHD選択画面まで進むとHDが無いみたいなループを約1日続けてました。試しにCentOS5.2のインストールティスクを落とし直して、同作業をするとあっさり終わりましたよと・・・
- あとは、普通にOSのインストールをして完了です。
インストール完了後、試しにHD1台抜いて電源投入してOS起動させたり、別のHDを取り付けてRAIDユニットの再構築してみたりと弄くってました。現在、全く問題無く動いてます。
- Comments: 0
- Trackbacks: 0
[CentOS4.7]CentOS4.7でKernel panicが起こる件。[Bug]
社内サーバーにCentOS4.7(kernel-2.6.9-78.0.1)を置いているのですが、頻繁にKernel panicを起こすようになりました。
・/var/log/messages 抜粋
Oct 14 10:03:45 centos iptables: succeeded Oct 14 10:03:45 centos iptables: succeeded Oct 14 10:03:45 centos kernel: Unable to handle kernel paging request at virtual address e09a8168 Oct 14 10:03:45 centos kernel: printing eip: Oct 14 10:03:45 centos kernel: c02d4877 Oct 14 10:03:45 centos kernel: *pde = 014ee067 Oct 14 10:03:45 centos kernel: Oops: 0000 [#1] Oct 14 10:03:45 centos kernel: Modules linked in: loop vga16fb vgastate md5 ipv6 parport_pc lp parport autofs4 tun sunrpc ip_conntrack cpufreq_powersave button battery ac uhci_hcd ehci_hcd i3000_edac edac_mc tg3 dm_snapshot dm_zero dm_mirror ext3 jbd dm_mod ata_piix libata sd_mod scsi_mod Oct 14 10:03:45 centos kernel: CPU: 0 Oct 14 10:03:45 centos kernel: EIP: 0060:[] Not tainted VLI Oct 14 10:03:45 centos kernel: EFLAGS: 00010212 (2.6.9-78.0.1.EL) Oct 14 10:03:45 centos kernel: EIP is at nf_unregister_sockopt+0x47/0x81 Oct 14 10:03:45 centos kernel: eax: 00000002 ebx: c03a2020 ecx: de650e80 edx: e09a8160 Oct 14 10:03:45 centos kernel: esi: e0af9380 edi: 00000000 ebp: c8f58000 esp: c8f58f5c Oct 14 10:03:45 centos kernel: ds: 007b es: 007b ss: 0068 Oct 14 10:03:45 centos kernel: Process modprobe (pid: 20703, threadinfo=c8f58000 task=d3d78bd0) Oct 14 10:03:45 centos kernel: Stack: 00000000 c037d800 e0af0732 e0af9880 c014030d 00000000 635f7069 746e6e6f Oct 14 10:03:46 centos kernel: 6b636172 00000000 d3ec7b80 b7f85000 b7f86000 c01602d6 d3ec7b80 d406b954 Oct 14 10:03:46 centos kernel: c016067b d406baf8 d3ec7b80 d3ec7bb0 00000000 c8f58000 089d4820 00000000 Oct 14 10:03:46 centos kernel: Call Trace: Oct 14 10:03:46 centos kernel: [ ] init_or_cleanup+0x1e6/0x1ea [ip_conntrack] Oct 14 10:03:46 centos kernel: [ ] sys_delete_module+0x139/0x180 Oct 14 10:03:46 centos kernel: [ ] unmap_vma_list+0xe/0x17 Oct 14 10:03:46 centos kernel: [ ] do_munmap+0x1a7/0x1b1 Oct 14 10:03:46 centos kernel: [ ] syscall_call+0x7/0xb Oct 14 10:03:46 centos kernel: Code: 17 05 00 89 d9 ff 0d 20 20 3a c0 0f 88 40 0d 00 00 8b 0d 48 20 3a c0 8b 01 0f 18 00 90 81 f9 48 20 3a c0 74 2f 8b 51 08 8b 46 08 <39> 42 08 8b 11 75 1e 8b 41 04 89 42 04 89 10 89 c8 c7 01 00 01 Oct 14 10:03:46 centos kernel: <0>Fatal exception: panic in 5 seconds
取り敢えず、Google先生に聞いてみたらすぐ見つかりました。
- Bug 456664 – Kernel panic when unloading ip conntrack modules
- 0003131: kernel-2.6.9-78.0.1 panics when unloading iptables (via service iptables stop or shutdown)
どうやら、kernel-2.6.9-78.0.1 でiptablesをstopやrestartさせるとKernel panicを起こすバグのようです。
kernel-2.6.9-78.13.ELではバグも治っているようなので、
http://people.redhat.com/vgoyal/rhel4/RPMS.kernel/
からkernel-2.6.9-78.13.EL.i686.rpm
を取ってきて手動で入れました。
[root@centos ~]# cd /usr/local/src [root@centos ~]# wget http://people.redhat.com/vgoyal/rhel4/RPMS.kernel/kernel-2.6.9-78.13.EL.i686.rpm [root@centos ~]# rpm -ivh kernel-2.6.9-78.13.EL.i686.rpm
で再起動して終了。
もしくは、手動でkernelを入れたくないyumで全て管理したい人は、yumに最新のkernelが来るまで一つ古いkernelを使うというのもアリかと。以下、手順↓
[root@centos ~]# vi /boot/grub/grub.conf default=0 ↓ default=1 ← 2.6.9-67(私の環境では一つ古いkernelは2.6.9-67でした。)
で再起動して完了。
- Comments: 0
- Trackbacks: 0
Home > Tags > CentOS
- Search
- Feeds
- Meta