Alibaba CloudサーバーはFTPを使用してファイルを転送します
1.ソースを更新する
私は、それはそう、私は彼のデフォルトのアップデート元を参照してください、アリ雲ECSがUbuntu18で使用し、アリのサイトが、FTPダウンロードしない理由を私は知らない
だけで、その後の問題、再び更新ソース、そのバックアップの最初の
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
次にsources.list
、次のように変更します
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
コマンドを使用して、変更後に更新します
sudo apt-get update
2、ubuntu18インストールFTPサービス
次に、FTPサービスをインストールします。
sudo apt-get install vsftpd
インストールが完了したら、viを使用して/etc/vsftpd.confを開き、構成を行います。コマンドは次のとおりです。
sudo vi /etc/vsftpd.conf
vsftpd.confファイルを開いた後、次の2行を見つけます。
local_enable=YES
write_enable=YES
上記の2行の前に「#」がないことを確認し、ある場合はキャンセルします。完了後、図に示すように、
vsftpd.confを変更した後、保存して終了し、次のコマンドを使用してFTPサービスを再起動します。
sudo /etc/init.d/vsftpd restart
3. Alibaba Cloud ECSセキュリティグループを設定する
Alibaba Cloudサーバーにはデフォルトのセキュリティグループ保護機能があるため、FTPが使用する必要があるポートを解放する必要があります。
Alibaba Cloudコンソールに入り、[More]-> [Network and Security Group]-> [Security Group Configuration]
をクリックし、[Add Security Group Configuration]を選択し
てポート20と21をセキュリティグループに追加し、アクセスを許可し、必ず保存してください
4、FTP接続
次に、[FileZilla]を開き、クリックしてサイトマネージャーを開き
ます。[SFTP]プロトコルを選択し、Alibaba CloudのパブリックIPアドレスを入力してから、ユーザー名とパスワードを入力し、
[接続]をクリックして接続します