Centos 6.2 不要デーモンの停止について

このQ&Aのポイント
  • Centos 6.2のyumが自動アップデートした場合、Apacheをリスタートしなければ停止している可能性があるのか?
  • yumのデーモンを停止する方法についてご教授ください。
  • 初心者ですが、Centos 6.2で自動アップデートによりApacheが停止してしまった場合の対処方法はありますか?
回答を見る
  • ベストアンサー

Centos 6.2 不要デーモンの停止について

Apache 2.11.5 VPSの初心者です。 先日、Logwatchから送られてきたメールに以下の内容が記載されておりました。 --------------------- yum Begin ------------------------ Packages Installed: kernel-2.6.32-220.23.1.el6.x86_64 kernel-devel-2.6.32-220.23.1.el6.x86_64 Packages Updated: kernel-firmware-2.6.32-220.23.1.el6.noarch apr-1.3.9-5.el6_2.x86_64 python-libs-2.6.6-29.el6_2.2.x86_64 python-2.6.6-29.el6_2.2.x86_64 kernel-headers-2.6.32-220.23.1.el6.x86_64 expat-2.0.1-11.el6_2.x86_64 ---------------------- yum End ------------------------- 恐らくyumが自動アップデートしたものと考えられますが、自分のwebページを見てみると 真っ白になっており、見れなくなっておりました。 メモリ落ちかな?と疑ったのですが、Apacheエラーログを見てもそれらしいものがなく、Apacheをリスタートしてみると、復旧いたしました。 そこで質問ですが、yumが自動アップデートした場合、Apacheをリスタートしなければ、Apacheは停止しているものなのでしょうか?それを回避するには [root@hoge /]# chkconfig yum-updateonboot off のようにデーモンを停止した方がよろしいのでしょうか? (他のサイトを見てみると [root@hoge /]# chkconfig yum-updatesd off となっておりますが、私の環境では yum-updateonbootとなっております。) 何分知識が浅く、質問なども的を得て無い感はありますが、どうぞご教授ください。よろしくお願いいたします。

質問者が選んだベストアンサー

  • ベストアンサー
  • Wr5
  • ベストアンサー率53% (2177/4070)
回答No.3

>ご指摘通り REBOOT_RPMS="kernel kernel-smp"のコメントが外れております なので、kernelが更新されたらリブートされます。 >その方法は >1...[root@hoge /]# chkconfig yum-updateonboot on ←onにしておく >2...>/etc/sysconfig/yum-updateonboot内の REBOOT_RPMS="kernel kernel-smp" コメントを外しておく >3...ApacheがOS起動時に起動するように設定をしておく >以上3点で大丈夫でしょうか? 大丈夫なはずです。 そのままrebootコマンドなどでリブートさせてみて、apacheが起動するか確認してみた方が良いでしょう。 起動してくれなかった場合はログで確認…ということになるでしょうね。 標準パッケージ使っているならないとは思いますが…Upstartに変わったため起動シーケンスが微妙に変わっている…かもしれません。 # 標準パッケージでそこがコケるとは思えませんけどね。

bakuhatsu555
質問者

お礼

Wr5 様 丁寧なご回答ありがとうございます。 リブートし、確認いたしましたが、問題ありませんでした。 今駆け出し勉強中でして、これからもご教授よろしくお願いいたします。

その他の回答 (3)

  • YkazubonY
  • ベストアンサー率30% (26/86)
回答No.4

/etc/rc.d/rc.localにapachectlで起動するように設定するだけで良いと思います。

  • Wr5
  • ベストアンサー率53% (2177/4070)
回答No.2

>>Apache 2.11.5 >CentOS6.2の標準パッケージではない…ですね? というか、回答時点でapacheって2.4.2が最新ですな。 CentOS6.2の現状では…2.2.15でしょうか。

bakuhatsu555
質問者

補足

Wr5 様 ご回答ありがとうございます。 Apacheのvar 2.2.15 でした...orz >>/etc/sysconfig/yum-updateonbootの内容はどうなっていますか? ******************************************************************************* # IF any of these rpms are updated, the yum-updateonboot init script will # reboot immediately after the yum update. To keep yum-updateonboot from # rebooting the system, comment this line out. REBOOT_RPMS="kernel kernel-smp" # A list of groups that should be updated at boot. For each group mentioned # yum-updateonboot will call 'yum -y groupupdate' Since group names tend to # have spaces in them, used a semi-colon to separate the group names #GROUPLIST="My Group;MyOtherGroup;Some_Group;My Group 4" # Be quiet when updating by default # These options are passed to yum, default value is "-q" #OPTIONS="-q" ******************************************************************************* のようになっており、>>今回アップデートされたパッケージ名が書かれていたりしませんか? 上記を見る限りではパッケージ名が表示されておりません。他の場所で確認するとこがあればお教えください。 >>ちなみに、yum-updateonbootパッケージの初期状態は >>#REBOOT_RPMS="kernel kernel-smp" >>で、コメントアウトされ無効化されています。 ご指摘通り REBOOT_RPMS="kernel kernel-smp"のコメントが外れております >>で……リブートされる状態になっている時、ApacheがOS起動時に起動するようになっていない場合は当然プロセスは落ちたまま…ということになります。 これが原因だったのですね!! また、apacheの自動設定を確認したのですが、1週間ほど前に自動設定を行ったにもかかわらず、下になっておりました・・・orz [root@hoge /]# chkconfig --list httpd httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off 自動設定を改めて行いました。 [root@hoge /]# chkconfig httpd on [root@hoge /]# chkconfig --list httpd httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off そこで改めて質問があります。OS カーネル両方とも今後ともアップデートを有効にし、最新にしておきたいのですが その方法は 1...[root@hoge /]# chkconfig yum-updateonboot on ←onにしておく 2...>/etc/sysconfig/yum-updateonboot内の REBOOT_RPMS="kernel kernel-smp" コメントを外しておく 3...ApacheがOS起動時に起動するように設定をしておく 以上3点で大丈夫でしょうか? ご教授よろしくお願いいたします。

  • Wr5
  • ベストアンサー率53% (2177/4070)
回答No.1

>Apache 2.11.5 CentOS6.2の標準パッケージではない…ですね? OS起動時にApache起動するようにしてありますか? >となっておりますが、私の環境では yum-updateonbootとなっております。) /etc/sysconfig/yum-updateonbootの内容はどうなっていますか? REBOOT_RPMSに設定されているパッケージがアップデートされるとOSのリブートが実施されますが、 今回アップデートされたパッケージ名が書かれていたりしませんか? ちなみに、yum-updateonbootパッケージの初期状態は #REBOOT_RPMS="kernel kernel-smp" で、コメントアウトされ無効化されています。 VPSとのことなので、VPSサービス側の初期設定でなにか設定されているのかもしれません。 で……リブートされる状態になっている時、ApacheがOS起動時に起動するようになっていない場合は 当然プロセスは落ちたまま…ということになります。 # CentOS標準ならchkconfigで確認できるでしょうけど。

関連するQ&A

  • CentOS初期設定chkconfig認識不可。

    いつも教えて頂きありがとうございます。 標記の件。 http://centos.server-manual.com/centos5_setup.html に沿って初期設定を行っています。 説明では下記です。 [root@centos ~]# /etc/rc.d/init.d/yum-updatesd stop [root@centos ~]# chkconfig yum-updatesd off [root@centos ~]# yum -y update [root@centos ~]# yum -y install yum-cron [root@centos ~]# /etc/rc.d/init.d/yum-cron start [root@centos ~]# chkconfig yum-cron on [root@centos ~]# chkconfig --list yum-cron ところが実行すると [root@localhost kouzou]# /etc/rc.d/init.d/yum-updatesd stop yum-updates を停止中: [ OK ] [root@localhost kouzou]# chkconfig yum-updatesd off bash: chkconfig: command not found また他の # chkconfig yum-cron on # chkconfig --list yum-cron に関してもbash: chkconfig: command not found が出ます。 これでは前に進めません。 どなたかアドバイスの程、宜しくお願い申し上げます。

  • CentOS7 # yum update.

    Downloading packages: Finishing delta rebuilds of 1 package(s) (168 k) Some delta RPMs failed to download or rebuild. Retrying.. polkit-0.112-18.el7_6.1.x86_64 FAILED http://ftp-srv2.kddilabs.jp/Linux/packages/CentOS/7.6.1810/updates/x86_64/Packages/polkit-0.112-18.el7_6.1.x86_64.rpm: [Errno 14] HTTP Error 416 - Requested Range Not Satisfiable 他のミラーを試します。 CentOS7でyum updateが出来ません。 どう対処すべきでしょうか? 御多忙中、すみません。 ご回答のほど、宜しくお願い申し上げます。

  • CentOSでcupsdの自動起動が停止できない

    CentOS 5.5 を VMゲストとして使っています. プリンタ関連は使わないのでcupsdの自動起動を停止したいのですが chkconfigにてcupsをoffにし,またcupsdサービスを停止(service cupsd stop)しても, OSを再起動するとcupsdがまた起動してしまうため,とても気持ち悪いです. どのようにしたら自動起動をとめられるか知りたいです. 足りない情報がありましたら提供させて頂きますので,何卒よろしくおねがいいたします. ■参考情報 [root@localhost] ~ $ uname -a Linux localhost.localdomain 2.6.18-194.26.1.el5.centos.plus #1 SMP Wed Nov 10 12:06:47 EST 2010 i686 i686 i386 GNU/Linux [root@localhost] ~ $ cat /etc/redhat-release CentOS release 5.5 (Final) [root@localhost] ~ $ chkconfig --list |grep cups cups 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@localhost] ~ $ ps -ef|grep cups root 2908 1 0 04:29 ? 00:00:00 cupsd root 3713 3387 0 04:39 pts/0 00:00:00 grep -E --color=auto cups [root@localhost] ~ $ netstat -anptu |grep cupsd tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2908/cupsd udp 0 0 0.0.0.0:631 0.0.0.0:* 2908/cupsd [root@localhost] ~ $ ll /etc/rc3.d/*cups* lrwxrwxrwx 1 root root 14 12月 16 04:26 /etc/rc3.d/K10cups -> ../init.d/cups* [root@localhost] ~ $ runlevel N 3 [root@localhost] ~ $ ll /proc/2908/exe lrwxrwxrwx 1 root root 0 12月 16 04:32 /proc/2908/exe -> /usr/sbin/cupsd* [root@localhost] ~ $ which cupsd /usr/sbin/cupsd [root@localhost] ~ $ cat /etc/cups/cupsd.conf |egrep -v "^$|^ *#" MaxLogSize 2000000000 LogLevel info SystemGroup sys root Listen localhost:631 Listen /var/run/cups/cups.sock Browsing On BrowseOrder allow,deny BrowseAllow @LOCAL DefaultAuthType Basic (投稿の文字数制限上,以下略)

  • centos4.3+madwifi

    centos4.3をインストールして、有線LANの 動作は、確認してから、 ATrpmsから下記rpmをダウンロードしてきて、 smartを使ってmadwifi関連rpmを インストールしようとしたら、こんなエラーが 出ました。どうしてでしょうか? OSはcentos4.3のダウンロード版でカーネルは、 御覧の様に2.6.9-34.EL です、madwifiの バージョンもあっているはずなのですが、しばらくして マッチしていないとエラーになります。CPUは pentium2ですからOKのはずですし。。。 (RHEL4.0とありますが、centosとクローンOSなので 問題ないと思っていますが^^;) 御助言頂けると助かります。 ========================== [root@ids001 ~]# ls Desktop madwifi-0.9.6.0-20.el4.at.x86_64.rpm anaconda-ks.cfg madwifi-hal-kmdl-2.6.9-34.EL-0.9.6.0-20.el4.at.i686.rpm install.log madwifi-hal-kmdl-2.6.9-34.EL-0.9.6.0-20.el4.at.x86_64.rpm install.log.syslog madwifi-kmdl-2.6.9-34.EL-0.9.6.0-20.el4.at.i686.rpm madwifi-0.9.6.0-20.el4.at.i386.rpm madwifi-kmdl-2.6.9-34.EL-0.9.6.0-20.el4.at.x86_64.rpm [root@ids001 ~]# smart install madwifi madwifi-kmdl-`uname -r` Loading cache... Updating cache... ####################### [100%] error: 'madwifi' matches no packages Saving cache... [root@ids001 ~]# uname -r 2.6.9-34.EL

  • CentOS5.5でUpdate.Upgrade.

    いつも教えてくださりありがとうございます。 標記の件。 Ubuntuだとapt-get update apt-get upgradeで できていました。 CentOS5.5でUpdateを試みました。 http://mizushima.ne.jp/Linux/yum/CentOS-update.php のURLを参照に致しました。 結果は以下の通りです。 [root@localhost kouzou]# yum -y update Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: ftp.tsukuba.wide.ad.jp * base: ftp.tsukuba.wide.ad.jp * extras: ftp.tsukuba.wide.ad.jp * updates: ftp.tsukuba.wide.ad.jp Setting up Update Process No Packages marked for Update [root@localhost kouzou]# additional pacckages that extend functionality of existing packages bash: additional: command not found [root@localhost kouzou]# rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt エラー: http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt: インポート読み込みに失敗しました(-1)。 警告: u 0xd1e5e60 ctrl 0xd1e7160 nrefs != 0 (dag.wieers.com http) 何か重要かことを知らないようです。 どなたかアドバイスを頂きたく 宜しくお願い申し上げます。

  • centOS5.3 インストール後の設定 yum

    linuxに関して完全に初心者です。ネットワークの知識なんかもほぼありません。 今、 http://centossrv.com/centos5-init.shtml このサイトを参考にして設定を進めているのですが、いきなりつまづいてしましました。 (4)rootになれるユーザを管理者のみにする までは進めたのですが、(5)以降ができません。 色々といじってしまったかもしれなくてわけがわからない状態です…。最初どんな表示がでたのかは覚えていませんが、今現在は /etc/rc.d/init.d/yum-updatesd stop を実行すると -bash: /etc/rc.d/init.d/yum-updatesd: No such file or directory(そのようなファイルはフォルダにない?) と表示されます。 yum -y remove yum-updatesd を実行すると Loaded plugins: fastestmirror Setting up Remove Process No Match hor argument: yum-updatesd No Packages marked for removal と表示されます。 yum -y install yum-fastestmirror を実行すると Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was [Error 4] IOError: <urlopen error (-3, 'temporary failure in name resolution')> Error: Cannot find a valid baseurl for repo: base と表示されます。 yum -y update を実行すると yum -y install yum-fastestmirrorの時と同じ結果が返ってきます。 yum -y install yum-cron を実行すると yum -y install yum-fastestmirrorの時と同じ結果が返ってきます。 /etc/rc.d/init.d/yum-cron start を実行すると -bash: /etc/rc,d/init.d/yum-cron: No such file or directory と表示されます。 chkconfig yum-cron on を実行すると error reading information on service yum-cron: No such file or directory と表示されます。 インストールの時点のホスト名やIPアドレスに関しては、 http://centossrv.com/centos5.shtml と同じように設定しました。 こんな序盤でつまづくなんて恥ずかしいですが、全く意味がわからず本当に困っています…。そもそもパッケージというものが何なのかすら分かっていません。 こんな状態ですが、どうか助けていただけないでしょうか?よろしくお願いします。

  • CentOS5.2へPHP5.2系がインストールできません。

    その1) あるサイトで # 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 と記入し保存しました。 最後に # yum update php or yum --enablerepo=utterramblings update php 上記を指定しましたが アップデート(インストール)できてませんでした。 その2) # cd php-5.2.x # ./configure --with-apxs2=/usr/local/apache2/bin/apxs ↑/usr/local/apache2/bin/apxsこのフォルダーないのですが 勝手に作ってよろしいの? (略) # make←このメイクもできませんでした。 ターゲットを指定してください?ターゲットってなに 何をターゲットにしたらいいの? ;;ということで(その1)(その2)のやり方でできなければどうすれば?どなたかお教えください。よろしくお願いいたします。

  • CentOSにてApacheの設定ができない

    最近、Linuxを学び始めたものです。 VMWareを使い、CentOS5.6でApacheの設定をしようとしています。 root権限にて「yum -d install httpd」のコマンド入力をしApacheを インストールしたのですが、Apacheディレクトリやhttpd.confが 見つかりませんでした。 インストールできていないのかな?と思い、再度上記コマンドを 入力したところ、下記のようなメッセージが出ました。 **************************************************** usage: yum [options] COMMAND List of Commands: check-update Check for available package updates clean Remove cached data deplist List a package's dependencies downgrade downgrade a package erase Remove a package or packages from your system groupinfo Display details about a package group groupinstall Install the packages in a group on your system grouplist List available package groups groupremove Remove the packages in a group from your system help Display a helpful usage message info Display details about a package or group of packages install Install a package or packages on your system list List a package or groups of packages localinstall Install a local RPM makecache Generate the metadata cache provides Find what package provides the given value reinstall reinstall a package repolist Display the configured software repositories resolvedep Determine which package provides the given dependency search Search package details for the given string shell Run an interactive yum shell update Update a package or packages on your system upgrade Update packages taking obsoletes into account CRITICAL:yum.cli:Command line error: option -d: invalid integer value: 'install' ************************************************************** 恐らくインストールされてるのにインストールしようとしてエラーが出たのでは と考えているのですが、その場合にどこにインストールされたかが分かりません。 ディストリビュータで配置されるディレクトリが異なると見たことがあるのですが、 CentOSの場合どこに配置されるのでしょうか? ご存知の方がいらっしゃいましたら、ご教授ください。 よろしくお願いいたします。

  • CentOS6.4にコーデックをインストールしよう

    として yum install gstreamer-plugins-bad.x86_64 を実行すると以下のエラーが発生します. # yum install gstreamer-plugins-bad.x86_64 Loaded plugins: fastestmirror, priorities, refresh-packagekit, security Loading mirror speeds from cached hostfile * base: www.ftp.ne.jp * epel: ftp.iij.ad.jp * extras: www.ftp.ne.jp * rpmforge: mirror.fairway.ne.jp * updates: www.ftp.ne.jp 93 packages excluded due to repository priority protections Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package gstreamer-plugins-bad.x86_64 0:0.10.19-3.el6.rf will be installed --> Processing Dependency: libmodplug.so.0()(64bit) for package: gstreamer-plugins-bad-0.10.19-3.el6.rf.x86_64 --> Finished Dependency Resolution Error: Package: gstreamer-plugins-bad-0.10.19-3.el6.rf.x86_64 (rpmforge) Requires: libmodplug.so.0()(64bit) Available: libmodplug-0.8.7-1.el6.rf.x86_64 (rpmforge) libmodplug.so.0()(64bit) Installed: 1:libmodplug-0.8.8.3-2.el6.x86_64 (@epel) Not found You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest # この自体に対処する方法は有るでしょうか? 有ったら教えてください. よろしくお願いします.

  • yum updeteでエラー

    久々にアップデートを行うとしたのですが yum updateを実行すると Loaded plugins: fastestmirror, priorities Loading mirror speeds from cached hostfile * rpmforge: apt.sw.be 463 packages excluded due to repository priority protections Setting up Update Process Resolving Dependencies There are unfinished transactions remaining. You mightconsider running yum-complete-transaction first to finish them. --> Running transaction check ---> Package kernel.x86_64 0:2.6.18-128.2.1.el5 set to be installed --> Processing Conflict: kernel conflicts ecryptfs-utils < 44 --> Processing Conflict: kernel conflicts ecryptfs-utils < 44 --> Finished Dependency Resolution kernel-2.6.18-128.2.1.el5.x86_64 from updates has depsolving problems --> kernel conflicts with ecryptfs-utils Error: kernel conflicts with ecryptfs-utils と途中でエラーが発生して止まってしまいます。 解決法が分かる方、アドバイスお願いいたします。 OSはCentOS5.3です。