Rocky Linux 9にFTPサーバーProFTPD をインストールをインストールする

環境
OSバージョンを確認します

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

操作方法
1. EPEL, CRBリポジトリから ProFTPD をインストールします

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# dnf --enablerepo=epel,crb -y install proftpd
# dnf --enablerepo=epel,crb -y install proftpd
# dnf --enablerepo=epel,crb -y install proftpd

2.配置ファイルの修正
# vi /etc/proftpd.conf
80行目
修正前
ServerName “ProFTPD server"
修正後
ServerName “自身のサーバー名"

82行目
修正前
ServerAdmin root@localhost
修正後

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
ServerAdmin 管理者メールアドレス
ServerAdmin 管理者メールアドレス
ServerAdmin 管理者メールアドレス

116行目 アクセスログと認証ログ取得設定を追記します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
ExtendedLog /var/log/proftpd/access.log WRITE,READ default
ExtendedLog /var/log/proftpd/auth.log AUTH auth
ExtendedLog /var/log/proftpd/access.log WRITE,READ default ExtendedLog /var/log/proftpd/auth.log AUTH auth
ExtendedLog /var/log/proftpd/access.log WRITE,READ default
ExtendedLog /var/log/proftpd/auth.log AUTH auth

3.FTP 接続を禁止したいユーザーを設定します
# vi /etc/ftpusers
例「arkuser」

4.proftpdを起動します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# systemctl enable --now proftpd
Created symlink /etc/systemd/system/multi-user.target.wants/proftpd.service → /usr/lib/systemd/system/proftpd.service.
# systemctl enable --now proftpd Created symlink /etc/systemd/system/multi-user.target.wants/proftpd.service → /usr/lib/systemd/system/proftpd.service.
# systemctl enable --now proftpd
Created symlink /etc/systemd/system/multi-user.target.wants/proftpd.service → /usr/lib/systemd/system/proftpd.service.

5.SELinux を有効にしている場合は、ブール値を変更します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# setsebool -P ftpd_full_access on
# setsebool -P ftpd_full_access on
# setsebool -P ftpd_full_access on

6.Firewalld を有効にしている場合は、FTP サービスを許可します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# firewall-cmd --add-service=ftp
# firewall-cmd --runtime-to-permanent
success
# firewall-cmd --add-service=ftp # firewall-cmd --runtime-to-permanent success
# firewall-cmd --add-service=ftp
# firewall-cmd --runtime-to-permanent
success

 

Rocky Linux 9

Posted by arkgame