0
1

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.

困った時のコマンド集1

0
Posted at

開発で困った時にまとめていたコマンドです!

ec2-userでログイン
1cd ~
2cd .ssh/
3ssh -i ダウンロードした鍵の名前.pem ec2-user@作成したEC2インスタンスと紐付けたElastic IP

ec2-userでリポジトリ移動
cd /var/www/アプリ名

情報取得編
アップデート及び新規インストール可能な全パッケージを表示
yum list

インストールされている全パッケージを表示
yum list installed

アップデート可能なパッケージの一覧を表示
yum list updates

パッケージの検索
yum search パッケージ名(検索ワード)

パッケージ情報の表示
yum info パッケージ名

ファイルがどのパッケージに含まれているのか調べる
yum provides ファイル名

アップデート可能な全パッケージを表示
yum check-update

インストール編
パッケージを個別にインストール
yum install パッケージ名

アップデート編
指定したパッケージをアップデート。
yum update パッケージ名

システム全体のパッケージのアップデートをします。
yum update

削除編
パッケージの削除
yum remove パッケージ名

clean編
yum clean
ダウンロードしたパッケージと古いヘッダを削除する。
yum clean→clean allと同じ

古いヘッダを削除
yum clean oldheaders

ダウンロードしたパッケージを削除
yum clean packages

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?