Rocky Linuxにサーバー管理ツールAjentiをインストールする

2021年11月26日

1.OSバージョンの確認

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# cat /etc/redhat-release
Rocky Linux release 8.5 (Green Obsidian)
# cat /etc/redhat-release Rocky Linux release 8.5 (Green Obsidian)
# cat /etc/redhat-release
Rocky Linux release 8.5 (Green Obsidian)

2.リポジトリを追加します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# sudo dnf -y install epel-release
インストール済み:
epel-release-8-13.el8.noarch
# sudo dnf -y install epel-release 略 インストール済み: epel-release-8-13.el8.noarch
# sudo dnf -y install epel-release
略
インストール済み:
epel-release-8-13.el8.noarch

3.依存パッケージをインストールします

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# sudo dnf install -y chrony gcc python3-devel python3-pip python3-pillow python3-augeas python3-dbus
# sudo dnf install -y chrony gcc python3-devel python3-pip python3-pillow python3-augeas python3-dbus
# sudo dnf install -y chrony gcc python3-devel python3-pip python3-pillow python3-augeas python3-dbus

4.Ajentiをインストールします

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# sudo curl https://raw.githubusercontent.com/ajenti/ajenti/master/scripts/install.sh | sudo bash -s
Created symlink /etc/systemd/system/multi-user.target.wants/ajenti.service → /usr/lib/systemd/system/ajenti.service.
:: Complete
Ajenti will be listening at HTTP port 8000
Log in with your root password or another OS user
# sudo curl https://raw.githubusercontent.com/ajenti/ajenti/master/scripts/install.sh | sudo bash -s 略 Created symlink /etc/systemd/system/multi-user.target.wants/ajenti.service → /usr/lib/systemd/system/ajenti.service. :: Complete Ajenti will be listening at HTTP port 8000 Log in with your root password or another OS user
# sudo curl https://raw.githubusercontent.com/ajenti/ajenti/master/scripts/install.sh | sudo bash -s

略
Created symlink /etc/systemd/system/multi-user.target.wants/ajenti.service → /usr/lib/systemd/system/ajenti.service.
:: Complete

Ajenti will be listening at HTTP port 8000
Log in with your root password or another OS user

5.ファイアウォールを設定します
ポート「8000」を許可します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# sudo firewall-cmd --permanent --zone=public --add-port=8000/tcp
success
# sudo firewall-cmd --reload
success
# sudo firewall-cmd --permanent --zone=public --add-port=8000/tcp success # sudo firewall-cmd --reload success
# sudo firewall-cmd --permanent --zone=public --add-port=8000/tcp
success
# sudo firewall-cmd --reload
success

6.Aigentiのステータスを確認

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# sudo systemctl status ajenti
● ajenti.service - Ajenti panel
Loaded: loaded (/usr/lib/systemd/system/ajenti.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2021-11-26 09:51:58 JST; 1min 15s ago
Process: 7506 ExecStartPost=/bin/sleep 5 (code=exited, status=0/SUCCESS)
# sudo systemctl status ajenti ● ajenti.service - Ajenti panel Loaded: loaded (/usr/lib/systemd/system/ajenti.service; enabled; vendor preset: disabled) Active: active (running) since Fri 2021-11-26 09:51:58 JST; 1min 15s ago Process: 7506 ExecStartPost=/bin/sleep 5 (code=exited, status=0/SUCCESS)
# sudo systemctl status ajenti
● ajenti.service - Ajenti panel
Loaded: loaded (/usr/lib/systemd/system/ajenti.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2021-11-26 09:51:58 JST; 1min 15s ago
Process: 7506 ExecStartPost=/bin/sleep 5 (code=exited, status=0/SUCCESS)

起動
# sudo systemctl start ajenti
停止
# sudo systemctl stop ajenti

再起動
# sudo systemctl restart ajenti

7.動作確認

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
ブラウザから「http://http://192.168.229.132:8000/」にアクセスします
ユーザー名 root
パスワード admin
ブラウザから「http://http://192.168.229.132:8000/」にアクセスします ユーザー名 root パスワード admin
ブラウザから「http://http://192.168.229.132:8000/」にアクセスします
ユーザー名 root
パスワード admin

 

Rocky Linux 8

Posted by arkgame