Rocky Linux 8.4にProFTPD をインストールする

2021年10月24日

OSバージョンを確認
# cat /etc/redhat-release
Rocky Linux release 8.4 (Green Obsidian)

1.EPELからProFTPDをインストール

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# dnf --enablerepo=epel -y install proftpd
インストール済み:
libmemcached-libs-1.0.18-15.el8.x86_64 proftpd-1.3.6e-4.el8.x86_64
# dnf --enablerepo=epel -y install proftpd 略 インストール済み: libmemcached-libs-1.0.18-15.el8.x86_64 proftpd-1.3.6e-4.el8.x86_64
# dnf --enablerepo=epel -y install proftpd
 略
 インストール済み:
  libmemcached-libs-1.0.18-15.el8.x86_64       proftpd-1.3.6e-4.el8.x86_64

2.ProFTPDの設定を行う

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# vi /etc/proftpd.conf
80行目
修正前
ServerName "ProFTPD server"
修正後
ServerName "サーバー名"
82行目
修正前
ServerAdmin root@localhost
修正後
ServerAdmin 管理者のメールアドレス
# vi /etc/proftpd.conf 80行目 修正前 ServerName "ProFTPD server" 修正後 ServerName "サーバー名" 82行目 修正前 ServerAdmin root@localhost 修正後 ServerAdmin 管理者のメールアドレス
# vi /etc/proftpd.conf
80行目
修正前
ServerName                      "ProFTPD server"
修正後
ServerName                      "サーバー名"

82行目
修正前
ServerAdmin                     root@localhost
修正後
ServerAdmin                     管理者のメールアドレス

3.アクセスログ、認証ログ設定を追記

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# vi /etc/proftpd.conf
#116行目:下記を追記
ExtendedLog /var/log/proftpd/access.log WRITE,READ default
 ExtendedLog /var/log/proftpd/auth.log AUTH auth
# vi /etc/proftpd.conf #116行目:下記を追記 ExtendedLog /var/log/proftpd/access.log WRITE,READ default  ExtendedLog /var/log/proftpd/auth.log AUTH auth
# vi /etc/proftpd.conf
#116行目:下記を追記
 ExtendedLog                     /var/log/proftpd/access.log WRITE,READ default
 ExtendedLog                     /var/log/proftpd/auth.log AUTH auth

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.FTPサービスを許可

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

 

Rocky Linux 8

Posted by arkgame