LoginSignup
1
0

More than 5 years have passed since last update.

tldrコマンドをCentOS7にインストールする

Posted at

manpageは長いから読みたくない?そんなときはtldr-pages - Qiita

こちらはCentOSで試してみる

以下の環境で確認

$ docker run --rm -i -t docker.io/centos:7.3.1611 /bin/bash

インストール

yumでtldrをシステムにインストールしたいところだが、EPELに入っているnodejsのパッケージが古いので依存関係でエラーになる。仕方ないのでローカルに入れてシステムより新しいものに更新する。

// EPELにnpmがあるのでインストール
# yum install -y epel-release
# yum install -y npm openssl make gcc-c++
# useradd ymko
# su - ymko
// ローカルにインストールする
$ npm install tldr
// パスを通す
$ vi .bashrc
if [ -d ${HOME}/node_modules/.bin ]; then
    export PATH=${PATH}:${HOME}/node_modules/.bin
fi
$ source .bashrc

コマンド実行

$ tldr rpm

  rpm

  RPM Package Manager.

  - Show version of httpd package:
    rpm -q httpd

  - List versions of all matching packages:
    rpm -qa 'mariadb*'

  - Identify owner of a file and show version of the package:
    rpm -qf /etc/postfix/main.cf

  - List package-owned files:
    rpm -ql kernel

  - Show scriptlets from an RPM file:
    rpm -qp --scripts some.rpm

  - Show changed, missing and/or incorrectly installed files of matching packages:
    rpm -Va 'php-*'

npm のローカルモードでインストールした実行モジュールにパスを通す設定 - Qiita

1
0
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
1
0