2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

nohupでyumの出力を捨てる

Posted at

どういうこと?

いや、お家マシンで環境作りなおしたりする時に開発ツール系後からいれたりする際に、
yumで一気に入れてるとその間手が止まるよね。

  • 別セッション接続するとかターミナル別に立ち上げるとかすればええやん
    • 仰るとおりです

でもまぁやってみた

その1 -/dev/null 2>&1-

# yum intall -y ruby > /dev/null 2>&1 &
# ruby -v
ruby 2.0.0p598 (2014-11-13) [x86_64-linux]
# tail /var/log/messages
May 31 22:58:50 localhost yum[2929]: Installed: ruby-libs-2.0.0.598-25.el7_1.x86_64
May 31 22:58:50 localhost yum[2929]: Installed: libyaml-0.1.4-11.el7_0.x86_64
May 31 22:58:50 localhost yum[2929]: Installed: rubygem-bigdecimal-1.2.0-25.el7_1.x86_64
May 31 22:58:50 localhost yum[2929]: Installed: rubygem-io-console-0.4.2-25.el7_1.x86_64
May 31 22:58:51 localhost yum[2929]: Installed: rubygem-json-1.7.7-25.el7_1.x86_64
May 31 22:58:51 localhost yum[2929]: Installed: rubygem-rdoc-4.0.0-25.el7_1.noarch
May 31 22:58:51 localhost yum[2929]: Installed: ruby-irb-2.0.0.598-25.el7_1.noarch
May 31 22:58:51 localhost yum[2929]: Installed: ruby-2.0.0.598-25.el7_1.x86_64
May 31 22:58:51 localhost yum[2929]: Installed: rubygems-2.0.14-25.el7_1.noarch
May 31 22:58:52 localhost yum[2929]: Installed: rubygem-psych-2.0.0-25.el7_1.x86_64
  • できたっぽい(シェルの出力は捨てたけどログは吐かれてる)

その2 -nohup yum install -y svn-

# nohup yum install -y svn &
[1] 2985
# nohup: ignoring input and appending output to ‘nohup.out’
[1]+  Done                    nohup yum install -y svn
# svn --version
svn, version 1.7.14 (r1542130)
   compiled Nov 20 2015, 19:25:09

Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people; see the NOTICE
file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
  - 
# tail /var/log/messages
May 31 23:05:34 localhost yum[2985]: Installed: apr-1.4.8-3.el7.x86_64
May 31 23:05:34 localhost yum[2985]: Installed: apr-util-1.5.2-6.el7.x86_64
May 31 23:05:34 localhost yum[2985]: Installed: pakchois-0.4-10.el7.x86_64
May 31 23:05:34 localhost yum[2985]: Installed: neon-0.30.0-3.el7.x86_64
May 31 23:05:34 localhost yum[2985]: Installed: subversion-libs-1.7.14-10.el7.x86_64
May 31 23:05:34 localhost systemd: Reloading.
May 31 23:05:34 localhost systemd: Configuration file /usr/lib/systemd/system/auditd.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.
May 31 23:05:34 localhost systemd: Configuration file /usr/lib/systemd/system/ebtables.service is marked executable. Please remove executable permission bits. Proceeding anyway.
May 31 23:05:34 localhost systemd: Configuration file /usr/lib/systemd/system/wpa_supplicant.service is marked executable. Please remove executable permission bits. Proceeding anyway.
May 31 23:05:34 localhost yum[2985]: Installed: subversion-1.7.14-10.el7.x86_64
# less nohup.out
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: centosx4.centos.org
Resolving Dependencies
There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).
The program yum-complete-transaction is found in the yum-utils package.
--> Running transaction check
---> Package subversion.x86_64 0:1.7.14-10.el7 will be installed

~~~~~ 長いので割愛 ~~~~~

Installed:
  subversion.x86_64 0:1.7.14-10.el7

Dependency Installed:
  apr.x86_64 0:1.4.8-3.el7                    apr-util.x86_64 0:1.5.2-6.el7
  neon.x86_64 0:0.30.0-3.el7                  pakchois.x86_64 0:0.4-10.el7
  subversion-libs.x86_64 0:1.7.14-10.el7

Complete!
  • これもできたっぽい(ちゃんと/var/log/messagesには記録されてるし、nohup.outにも出力されてる。)

で、何?

いやまぁちゃんとお仕事とか研究で構築するときはちゃんと出力確認しましょうね。
お家で遊ぶ時ならなんかコケてても自己責任で済ませられるけども。。。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?