https://www.2daygeek.com/exa-a-modern-replacement-for-ls-command-linux/
Exa – A modern and colorful replacement for list(ls) command written in Rust
ls(list) is one of the very basic & essential Linux command for administrator that can be used in most of the actions (in other hands, Linux administrator can’t live without ls command). …
www.2daygeek.com
Rust로 쓰여진 ls 명령어의 대체, 새롭고 색상이 다채로운 exa 설치하기 (CentOS 7에서 성공)
1. 먼저 사전 필요한 프로그램 환경 설치
# curl https://sh.rustup.rs -sSf |sh
# source $HOME/.cargo/env
2. 필요 패키지 설치
# yum install libgit2 cmake git http-parser
3. exa 소스코드 다운로드 및 빌드
# git clone https://github.com/ogham/exa.git && cd exa
# make install
-----------------------------------------------------------------------------------------
실제 진행상황
[root@server ~] # curl https://sh.rustup.rs -sSf |sh
info: downloading installer
Welcome to Rust!
This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.
It will add the cargo , rustc , rustup and other commands to
Cargo's bin directory, located at:
/root/.cargo/bin
This can be modified with the CARGO_HOME environment variable.
Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:
/root/.rustup
This can be modified with the RUSTUP_HOME environment variable.
This path will then be added to your PATH environment variable by
modifying the profile files located at:
/root/.profile
/root/.bash_profile
You can uninstall at any time with rustup self uninstall and
these changes will be reverted.
Current installation options:
default host triple: x86_64-unknown-linux-gnu
default toolchain: stable
profile: default
modify PATH variable: yes
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>1
info: profile set to 'default'
info: default host triple is x86_64-unknown-linux-gnu
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2020-03-12, rust version 1.42.0 (b8cedc004 2020-03-09)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
12.0 MiB / 12.0 MiB (100 %) 11.1 MiB/s in 1s ETA: 0s
info: downloading component 'rust-std'
17.1 MiB / 17.1 MiB (100 %) 10.9 MiB/s in 1s ETA: 0s
info: downloading component 'rustc'
58.6 MiB / 58.6 MiB (100 %) 11.1 MiB/s in 5s ETA: 0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
12.0 MiB / 12.0 MiB (100 %) 7.4 MiB/s in 1s ETA: 0s
info: installing component 'rust-std'
17.1 MiB / 17.1 MiB (100 %) 11.8 MiB/s in 1s ETA: 0s
info: installing component 'rustc'
58.6 MiB / 58.6 MiB (100 %) 11.5 MiB/s in 5s ETA: 0s
info: installing component 'rustfmt'
info: default toolchain set to 'stable'
stable installed - rustc 1.42.0 (b8cedc004 2020-03-09)
Rust is installed now. Great!
To get started you need Cargo's bin directory ($HOME/.cargo/bin) in your PATH
environment variable. Next time you log in this will be done
automatically.
To configure your current shell run source $HOME/.cargo/env
[root@server ~]# source $HOME/.cargo/env
[root@server ~]# yum install libgit2 cmake git http-parser
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.kakao.com
* extras: mirror.kakao.com
* updates: mirror.kakao.com
Package git-1.8.3.1-21.el7_7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package cmake.x86_64 0:2.8.12.2-2.el7 will be installed
--> Processing Dependency: libarchive.so.13()(64bit) for package: cmake-2.8.12.2-2.el7.x86_64
---> Package http-parser.x86_64 0:2.7.1-8.el7_7.2 will be installed
---> Package libgit2.x86_64 0:0.26.6-1.el7 will be installed
--> Running transaction check
---> Package libarchive.x86_64 0:3.1.2-14.el7_7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=================================================================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================================================================
Installing:
cmake x86_64 2.8.12.2-2.el7 base 7.1 M
http-parser x86_64 2.7.1-8.el7_7.2 updates 29 k
libgit2 x86_64 0.26.6-1.el7 extras 429 k
Installing for dependencies:
libarchive x86_64 3.1.2-14.el7_7 updates 319 k
Transaction Summary
=================================================================================================================================================================================
Install 3 Packages (+1 Dependent package)
Total download size: 7.8 M
Installed size: 29 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): http-parser-2.7.1-8.el7_7.2.x86_64.rpm | 29 kB 00:00:00
(2/4): libgit2-0.26.6-1.el7.x86_64.rpm | 429 kB 00:00:00
(3/4): libarchive-3.1.2-14.el7_7.x86_64.rpm | 319 kB 00:00:00
(4/4): cmake-2.8.12.2-2.el7.x86_64.rpm | 7.1 MB 00:00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 8.0 MB/s | 7.8 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libarchive-3.1.2-14.el7_7.x86_64 1/4
Installing : http-parser-2.7.1-8.el7_7.2.x86_64 2/4
Installing : libgit2-0.26.6-1.el7.x86_64 3/4
Installing : cmake-2.8.12.2-2.el7.x86_64 4/4
Verifying : http-parser-2.7.1-8.el7_7.2.x86_64 1/4
Verifying : libgit2-0.26.6-1.el7.x86_64 2/4
Verifying : cmake-2.8.12.2-2.el7.x86_64 3/4
Verifying : libarchive-3.1.2-14.el7_7.x86_64 4/4
Installed:
cmake.x86_64 0:2.8.12.2-2.el7 http-parser.x86_64 0:2.7.1-8.el7_7.2 libgit2.x86_64 0:0.26.6-1.el7
Dependency Installed:
libarchive.x86_64 0:3.1.2-14.el7_7
Complete!
[root@server ~]# git clone https://github.com/ogham/exa.git && cd exa
Cloning into 'exa'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 6903 (delta 0), reused 1 (delta 0), pack-reused 6897
Receiving objects: 100% (6903/6903), 3.24 MiB | 1.53 MiB/s, done.
Resolving deltas: 100% (4914/4914), done.
[root@server exa]# make install
cargo build --release --no-default-features --features "default"
Updating crates.io index
Downloaded glob v0.3.0
Downloaded ansi_term v0.12.0
Downloaded term_grid v0.1.7
Downloaded locale v0.2.2
Downloaded env_logger v0.6.2
Downloaded users v0.9.1
Downloaded natord v1.0.9
Downloaded unicode-width v0.1.5
Downloaded term_size v0.3.1
Downloaded scoped_threadpool v0.1.9
Downloaded number_prefix v0.3.0
Downloaded zoneinfo_compiled v0.4.8
Downloaded git2 v0.9.1
Downloaded datetime v0.4.7
Downloaded libc v0.2.60
Downloaded num-traits v0.1.43
Downloaded num_cpus v1.10.1
Downloaded lazy_static v1.3.0
Downloaded byteorder v1.3.2
Downloaded log v0.4.7
Downloaded termcolor v1.0.5
Downloaded pad v0.1.5
Downloaded iso8601 v0.1.1
Downloaded url v1.7.2
Downloaded libgit2-sys v0.8.1
Downloaded humantime v1.2.0
Downloaded atty v0.2.13
Downloaded matches v0.1.8
Downloaded percent-encoding v1.0.1
Downloaded bitflags v1.1.0
Downloaded pkg-config v0.3.14
Downloaded regex v1.1.9
Downloaded num-traits v0.2.8
Downloaded idna v0.1.5
Downloaded cfg-if v0.1.9
Downloaded libz-sys v1.0.25
Downloaded nom v1.2.4
Downloaded cc v1.0.37
Downloaded quick-error v1.2.2
Downloaded autocfg v0.1.5
Downloaded thread_local v0.3.6
Downloaded unicode-bidi v0.3.4
Downloaded unicode-normalization v0.1.8
Downloaded memchr v2.2.1
Downloaded utf8-ranges v1.0.3
Downloaded aho-corasick v0.7.4
Downloaded regex-syntax v0.6.8
Downloaded ucd-util v0.1.3
Downloaded smallvec v0.6.10
Compiling libc v0.2.60
Compiling autocfg v0.1.5
Compiling pkg-config v0.3.14
Compiling cc v1.0.37
Compiling memchr v2.2.1
Compiling smallvec v0.6.10
Compiling unicode-width v0.1.5
Compiling nom v1.2.4
Compiling matches v0.1.8
Compiling log v0.4.7
Compiling regex v1.1.9
Compiling cfg-if v0.1.9
Compiling bitflags v1.1.0
Compiling byteorder v1.3.2
Compiling ucd-util v0.1.3
Compiling lazy_static v1.3.0
Compiling utf8-ranges v1.0.3
Compiling percent-encoding v1.0.1
Compiling quick-error v1.2.2
Compiling termcolor v1.0.5
Compiling glob v0.3.0
Compiling number_prefix v0.3.0
Compiling ansi_term v0.12.0
Compiling natord v1.0.9
Compiling scoped_threadpool v0.1.9
Compiling unicode-bidi v0.3.4
Compiling thread_local v0.3.6
Compiling pad v0.1.5
Compiling term_grid v0.1.7
Compiling humantime v1.2.0
Compiling regex-syntax v0.6.8
Compiling unicode-normalization v0.1.8
Compiling iso8601 v0.1.1
Compiling num-traits v0.2.8
Compiling aho-corasick v0.7.4
Compiling locale v0.2.2
Compiling atty v0.2.13
Compiling term_size v0.3.1
Compiling users v0.9.1
Compiling num_cpus v1.10.1
Compiling idna v0.1.5
Compiling num-traits v0.1.43
Compiling datetime v0.4.7
Compiling url v1.7.2
Compiling zoneinfo_compiled v0.4.8
Compiling exa v0.9.0 (/root/exa)
Compiling libz-sys v1.0.25
Compiling libgit2-sys v0.8.1
Compiling env_logger v0.6.2
Compiling git2 v0.9.1
Finished release [optimized] target(s) in 1m 14s
install -m755 -- target/release/exa "/usr/local/bin/"
install -dm755 -- "/usr/local/bin/" "/usr/local/share/man/man1/"
install -m644 -- contrib/man/exa.1 "/usr/local/share/man/man1/"
[root@server exa]#