• ベストアンサー

[yum-cron start]したら、[Enabling nightly yum update]と表示されるのはウソ?

CentOS5 VPSです。 -bash-3.2# /etc/rc.d/init.d/yum-cron start Enabling nightly yum update: [ OK ] -bash-3.2# chkconfig yum-cron on -bash-3.2# としても、 -bash-3.2# crontab -l no crontab for root -bash-3.2# なのですが、 「Enabling nightly yum update:」 というのは、ウソというか、yum-cron startしても、 結局、crontab -eしないといけないのでしょうか? で、もし「yum-cron stop」 お教えいただければ幸いです。したら、またcrontab -eしないといけないのでしょうか? ためしてみれば、結果はわかるのですが、 勘違いしているかもとおもい、ねんのため質問させてください。 (nightly とまでいわれるので、どうも不思議でして) よろしくお願いいたします。

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

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

試せばわかることですが… >-bash-3.2# crontab -l >no crontab for root rootユーザ「の」crontabがないだけです。 /etc/crontabは存在していますので、そちらで「rootユーザとして」処理されています。 あとは… /etc/rc.d/init.d/yum-cronスクリプトや、一緒に導入された/etc/cron.daily/yum.cron等のスクリプトを読まれるとよいかと。

og_linux
質問者

お礼

ご回答ありがとうございます。なるほどよくわかりました。 ありがとうございました。

その他の回答 (1)

回答No.1

>ためしてみれば、結果はわかるのですが、 試してみることをお薦めします.

og_linux
質問者

お礼

すいません、ことばがヘタでした。 一応試せるものの、 そのログかなにかを勘違いしてしまうのではとおもい、念のため 質問させていただいた次第です。 ありがとうございました。

関連する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 が出ます。 これでは前に進めません。 どなたかアドバイスの程、宜しくお願い申し上げます。

  • 「yum-cron」と「手動によるパッケージインストール」が競合?

    yum-updatesdと手動によるパッケージインストールが競合すると、 インストールに失敗することがあるようですが、 yum-updatesdをオフにして、 yum-cronをオンにして・・・この際、 「yum-cron」と「手動によるパッケージインストール」が競合してまずくなることはあるのでしょうか? ーー やりたいのは、 1)yum-updatesdはとにかくおもいので却下 2)その代わりにyum-cronでupdate 3)で、さらに、欲しいパッケージがあるとき、yum -y install hoigehogeする といった感じです。 3)の前に /etc/rc.d/init.d/yum-cron stop し、 3)を行い /etc/rc.d/init.d/yum-cron start する などは、無意味でしょうか? よろしくお願いいたします。

  • CentOS5,2 / yum-cron を入れられない

    http://centossrv.com/ を参考にしつつ、 CentOS5.2を使って、yum-cron を入れようとしたのですが、以下のように入れられません、 どうすればいいのでしょうか? (別のレポジトリを追加する必要があるのでしょうか?・・・ただその方法は分かりません) なお、CentOS5.3からは、yum-cronが削除されたと、たまたま見かけたのですが、 特に問題ないのでしょうか?あるいは今後どのように対応すべきでしょうか? よろしくお願いします。 [root@centos52 var]# yum install yum-cron Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: www.ftp.ne.jp * updates: www.ftp.ne.jp * addons: www.ftp.ne.jp * extras: www.ftp.ne.jp Setting up Install Process Parsing package install arguments No package yum-cron available. Nothing to do [root@centos52 var]#

  • cronでyum -y updateしかyumログを、メールでとばしたい、、、など・

    31 1 * * * yum -y update > このyumログをメールで知りたいのでメールする 31 4 * * * updatedb ということをcronでやりたいのですが・・・ 「> このyumログをメールで知りたいのでメールする」の部分がわからない」 「どっちもroot権限が必要だけど、どうやってそのユーザとしてcronを実行させるのか??? (rootユーザとして登録するしかないでしょうか。できればadminユーザで実行させたいのですが。 ほとんどしりませんがsudoというものをつかえばいけますか?)」 「そもそもこのcronの設定は普通のやり方で問題でしょうか? よろしくお願いします。」

  • 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 と同じように設定しました。 こんな序盤でつまづくなんて恥ずかしいですが、全く意味がわからず本当に困っています…。そもそもパッケージというものが何なのかすら分かっていません。 こんな状態ですが、どうか助けていただけないでしょうか?よろしくお願いします。

  • cron設定で電源のOFFができません。

    cron設定で電源のOFFができません。 cent OS 5.5 で自宅サーバーを立上げ勉強中です。 サーバーの電源を自動で18:00にONにして翌日の7:00にOFFにしたいと思います。 いろいろなホームページを参考にさせていただき、電源のONはパソコンのBIOS設定、OFFは"cron"を使うことできることがわかりました。 電源のONはパソコンのBIOS設定でできましたが、OFFができません。 設定は以下としています。 [root@Linux ~]# vi /etc/crontab CSHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly 0 7 * * * shutdown -h now #追加 [root@Linux ~]# /etc/rc.d/init.d/crond restart [root@Linux ~]#chkconfig crond on [root@Linux ~]# chkconfig --list crond crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@Linux ~]# /etc/rc.d/init.d/crond status crond (pid xxx) を実行中... 設定時間になっても電源がOFFになりません。 [root@Linux ~]# shutdown -h now ではOFFにできます。 (cent OS 5.5 をインストールしているパソコンは 富士通 FMV DESKPOWER CE18B 2002 年製です) よろしくお願いします。

  • yumが使えなくなってしまいました。

    CentOSを使っています。 特に設定ファイルを編集した覚えはなく、 調べてはみたのですが分からなくて困っています。 できれば教えていただけないでしょうか? [root@localhost yum.repos.d]# yum install yum Setting up Install Process Setting up repositories Cannot find a valid baseurl for repo: update Error: Cannot find a valid baseurl for repo: update [root@localhost yum.repos.d]# less CentOS-Base.repo #released updates [update] name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

  • phpファイルをcronで動かすには?

    /var/www/html/test.phpというファイルを毎日午前6時に動かしたい(たたく?)のですが、cronをどのように設定したらいいのか分かりません。サーバーはcentos5でroot権限をもっています。 http://www.server-memo.net/tips/crontab.html こちらを参考にしているのですが、どこから手をつけていいのかすら分かりません。 /etc/以下には次のようなファイルやフォルダがありました。 cron.d cron.daily cron.deny cron.hourly cron.weekly crontab これをどのようにして利用したらいいのでしょうか?

  • さくらVPS cronでphp

    centos6 さくらVPS cronでphpを実行したいのですが、うまくいきません? vi /etc/crontab    ↓ 44 * * * * /var/www/html/oms-main2/end.php ちなみにend.phpは、手動では動きます。 cronlog  ↓ Apr 15 10:44:01 www32258ue CROND[6787]: (root) CMD (/var/www/html/oms-main2/cron.php) 宜しくご教授お願い致します。

  • さくらVPSでcronでphpを実行

    さくらVPSでcronでphpを実行したいのですが、うまくいきません? vi /etc/crontab    ↓ 30 * * * * root /usr/bin/php/var/www/html/oms-main2/end.php 実行できないので /etc/rc.d/init.d/crond status → crond (pid 2559) を実行中 ちなみにend.phpは、手動では動きます。 宜しくご教授お願い致します。