0
0

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 3 years have passed since last update.

AWS CloudShell上にfdcloneをビルドしてインストールする

Last updated at Posted at 2021-01-07

AWSでも2020/12からCloudShellが利用できるようになりました。
あくまでリモートShell環境であって、標準でインストールされているツール等は少なめです。

初期状態では開発環境や居城として利用するには少し不便ですが、
ここではfdcloneをビルドしてインストールする方法を紹介します。

gccとncursesライブラリのインストール

fdcloneのビルド&実行には以下の3つの追加インストールが必要です。

  • gcc(fdcloneのビルドに必要)
  • gcc-core(fdcloneの実行に必要)
  • ncurses-devel(fdcloneの実行に必要)

初期状態ではインストールされていませんが、yum で追加インストールすることができます。

[cloudshell-user@ip-10-XX-XX-XX ~]$ sudo yum install gcc
[cloudshell-user@ip-10-XX-XX-XX ~]$ sudo yum install gcc-core
[cloudshell-user@ip-10-XX-XX-XX ~]$ sudo yum install ncurses-devel

fdcloneのソースをダウンロード

から、ソースファイル一式を入手します。wgetでダウンロードしましょう。

[cloudshell-user@ip-10-XX-XX-XX ~]$ wget https://hp.vector.co.jp/authors/VA012337/soft/fd/FD-3.01j.tar.gz

ダウンロードが終わったら、ファイルを解凍し、カレントディレクトリを移動します。

[cloudshell-user@ip-10-XX-XX-XX ~]$ tar zxvf FD-3.01j.tar.gz 
[cloudshell-user@ip-10-XX-XX-XX ~]$ cd FD-3.01j

fdcloneのビルド

fdcloneをビルドします。ビルドが終わったらfdが生成されているか確認しておきます。

[cloudshell-user@ip-10-XX-XX-XX FD-3.01j]$ sudo make
...
...
[cloudshell-user@ip-10-XX-XX-XX FD-3.01j]$ ls -al
[cloudshell-user@ip-10-XX-XX-XX FD-3.01j]$ ls -al fd

fdcloneの起動確認

ビルドに成功し、fdが生成されているようでしたら、起動できるか確認しましょう。

[cloudshell-user@ip-10-XX-XX-XX FD-3.01j]$ ./fd

fdcloneのインストール

make installします。(/usr/local/binにコピーされます。)

[cloudshell-user@ip-10-XX-XX-XX FD-3.01j]$ sudo make install

~/.fd2rcの配置

また、必要に応じて、_fdrc を ~/.fd2rc にコピーしておきます。
必要に応じてカスタマイズしておいてください。

[cloudshell-user@ip-10-XX-XX-XX FD-3.01j]$ cp -p _fdrc ~/.fd2rc
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?