CentOS 8 負荷テストツール「Wrk」をインストールする

環境
OSバージョンを確認します
# cat /etc/redhat-release
CentOS Stream release 8

操作方法
1.gitをインストールします

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# sudo dnf install git
# sudo dnf install git
# sudo dnf install git

2.必要なパッケージをインストールします

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# sudo dnf groupinstall 'Development Tools'
# sudo dnf install openssl-devel
# sudo dnf groupinstall 'Development Tools' # sudo dnf install openssl-devel
# sudo dnf groupinstall 'Development Tools'
# sudo dnf install openssl-devel

3.Wrkをダウンロードします

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# git clone https://github.com/wg/wrk.git
# git clone https://github.com/wg/wrk.git
# git clone https://github.com/wg/wrk.git

wrkディレクトリに移動します
# cd wrk
ファイルをビルドします
# make
/usr/local/bin/にコピーします

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# sudo cp wrk /usr/local/bin/
# sudo cp wrk /usr/local/bin/
# sudo cp wrk /usr/local/bin/

4.バージョンを確認します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# wrk --version
wrk 4.2.0 [epoll] Copyright (C) 2012 Will Glozer
Usage: wrk <options> <url>
Options:
-c, --connections <N> Connections to keep open
-d, --duration <T> Duration of test
-t, --threads <N> Number of threads to use
-s, --script <S> Load Lua script file
-H, --header <H> Add header to request
--latency Print latency statistics
--timeout <T> Socket/request timeout
-v, --version Print version details
Numeric arguments may include a SI unit (1k, 1M, 1G)
Time arguments may include a time unit (2s, 2m, 2h)
# wrk --version wrk 4.2.0 [epoll] Copyright (C) 2012 Will Glozer Usage: wrk <options> <url> Options: -c, --connections <N> Connections to keep open -d, --duration <T> Duration of test -t, --threads <N> Number of threads to use -s, --script <S> Load Lua script file -H, --header <H> Add header to request --latency Print latency statistics --timeout <T> Socket/request timeout -v, --version Print version details Numeric arguments may include a SI unit (1k, 1M, 1G) Time arguments may include a time unit (2s, 2m, 2h)
# wrk --version
wrk 4.2.0 [epoll] Copyright (C) 2012 Will Glozer
Usage: wrk <options> <url>
  Options:
    -c, --connections <N>  Connections to keep open
    -d, --duration    <T>  Duration of test
    -t, --threads     <N>  Number of threads to use

    -s, --script      <S>  Load Lua script file
    -H, --header      <H>  Add header to request
        --latency          Print latency statistics
        --timeout     <T>  Socket/request timeout
    -v, --version          Print version details

  Numeric arguments may include a SI unit (1k, 1M, 1G)
  Time arguments may include a time unit (2s, 2m, 2h)

 

CentOS Stream 8

Posted by arkgame