linux 基本操作記錄

從普通用戶切換到root用戶:

[xiaocai@localhost /]$ su
Password: 
[root@localhost /]# cd

刪除之前的vsftpd:

 yum remove vsftpd

安裝vsftpd

[root@izwz9ddpesgkw9afz1vbedz /]# yum -y install vsftpd
Loaded plugins: fastestmirror
base                                                     | 3.6 kB     00:00
epel                                                     | 4.2 kB     00:00
extras                                                   | 3.4 kB     00:00
updates                                                  | 3.4 kB     00:00
epel/x86_64/updateinfo         FAILED
http://mirrors.cloud.aliyuncs.com/epel/7/x86_64/repodata/7c69a981bdad61652d8490b811812c62c7254618e6f5e35284dc86c8a108c903-updateinfo.xml.bz2: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/

epel/x86_64/primary_db         FAILED
http://mirrors.cloud.aliyuncs.com/epel/7/x86_64/repodata/bb3c5cf236d482017675c6363d454ed0692a34aea55c4cda7f7a9c9a5dc647f4-primary.sqlite.xz: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
(1/7): epel/x86_64/group_gz                                | 170 kB   00:00
(2/7): base/7/x86_64/group_gz                              | 155 kB   00:00
(3/7): extras/7/x86_64/primary_db                          | 168 kB   00:00
(4/7): base/7/x86_64/primary_db                            | 5.6 MB   00:01
(5/7): updates/7/x86_64/primary_db                         | 6.4 MB   00:02
Determining fastest mirrors
epel/x86_64/primary_db                                     | 4.8 MB   00:01
Resolving Dependencies
--> Running transaction check
---> Package vsftpd.x86_64 0:3.0.2-21.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package          Arch             Version                 Repository      Size
================================================================================
Installing:
 vsftpd           x86_64           3.0.2-21.el7            base           169 k

Transaction Summary
================================================================================
Install  1 Package

Total download size: 169 k
Installed size: 348 k
Downloading packages:
vsftpd-3.0.2-21.el7.x86_64.rpm                             | 169 kB   00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : vsftpd-3.0.2-21.el7.x86_64                                   1/1
  Verifying  : vsftpd-3.0.2-21.el7.x86_64                                   1/1

Installed:
  vsftpd.x86_64 0:3.0.2-21.el7

Complete!
[root@izwz9ddpesgkw9afz1vbedz /]#  yum remove vsftpd

創(chuàng)建ftpfile文件夾:

[root@izwz9ddpesgkw9afz1vbedz /]# clear
[root@izwz9ddpesgkw9afz1vbedz /]# mkdir ftpfile
[root@izwz9ddpesgkw9afz1vbedz /]# cd ftpfile/
[root@izwz9ddpesgkw9afz1vbedz ftpfile]#

創(chuàng)建用戶 并更改權(quán)限

image.png

修改用戶密碼

[root@izwz9ddpesgkw9afz1vbedz ~]# passwd ftpuser
Changing password for user ftpuser.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@izwz9ddpesgkw9afz1vbedz ~]#

安全組策略,很多情況是安全組策略沒(méi)有打開(kāi)而訪問(wèn)不到

image.png

將8080端口映射為80端口:

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080  
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容