CENTOS7 network configuration, VSFTPD installation and 530 error resolution

Source: Internet
Author: User
Tags ftp login

Today, installing CentOS7 on a virtual machine, preparing for a new installation of ltmp, results in a lot of problems, but just because of these mistakes, and give yourself a long insight.

1,CENTOS7 Network Configuration

After minimizing the installation of CENTOS7, ifconfig prompt command not found, check is ifconfig net-tools not installed, so Yum search ifconfig find the installation package, but also prompted cannot find a Valid baseurl for Repo:base/7/x86_6, only to find that the network card is not well-equipped, check a bit, the original is centos7 under the IP command instead of ifconfig, using IP addr:

[[email protected] usr]# IP addr 1: Lo: <LOOPBACK,UP,LOWER_UP> MTU65536qdisc noqueue State UNKNOWN Link/loopbackxx:xx:xx:xx:xx:xxBrdxx:xx:xx:xx:xx:xxinet127.0.0.1/8Scope host lo valid_lft forever Preferred_lft Forever Inet6::1/ -Scope host Valid_lft forever Preferred_lft forever2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> MTU theQdisc Pfifo_fast State up Qlen +

Display has lo,eno16777736 two network card, so ls/etc/sysconfig/network-scripts/ view:

 [[email protected] usr]# ls/etc/sysconfig/network-scripts/ ifcfg-eno16777736  ifdown-ippp ifdown-sit ifup-bnep ifup-plip ifup-team network-functions-
   
    ipv6
    ifcfg   
    -lo  Ifdown-ipv6 if    Down-team ifup-eth ifup-plusb ifup-
    teamportifdown ifdown -isdn    Ifdown-teamport Ifup-ib ifup-post ifup-
    tunnelifdown -BNEP ifdown-post      Ifdown-tunnel ifup-ippp ifup-ppp ifup-
    wirelessifdown -eth IFDOWN-PPP Ifup Ifup-ipv6 ifup-routes init.ipv6-
    globalifdown -ib Ifdo Wn-routes ifup-aliases ifup-isdn ifup-sit network-functions 
   

Find the NIC name from the original ifcfg-eth0 into Ifcfg-eno16777736 (with your network card name), at this time VI open the configuration file, modify and add some parameters vi/etc/ Sysconfig/network-scripts/ifcfg-eno16777736

Type=Ethernet#bootproto=DHCP #注释此行, thus using static IPdefroute=Yespeerdns=yespeerroutes=Yesipv4_failure_fatal=Noipv6init=yesipv6_autoconf=Yesipv6_defroute=Yesipv6_peerdns=yesipv6_peerroutes=Yesipv6_failure_fatal=NoNAME=Eno16777736uuid=2fae2065-54b2-4e14-8601-D249e85f83e7device=Eno16777736onboot=Yes #no改为yes, boot service ######## #添加如下参数, IP and host the same network segment is quasi ########IPADDR0=192.168.1.109PREFIX0= -GATEWAY0=192.168.1.1DNS1=192.168.1.1

Shutdown-r Restart the virtual machine after the IP addr, you can see the network card has been set up, ping the host to confirm whether the network connectivity, if not, you can set the virtual machine network for bridging mode , service network Restart and then ping look.

Once successful, you can install the Ifconfig command. Yum Search ifconfig the installation package, matching to net-tools.x86_64, so Yum installs net-tools.x86_64, all the way y down , installed, Enter Ifconfig at this time, display network card information , ok!

2, install VSFTPD

Yum Search vsftpd. Match vsftpd.x86_64. So Yum installs vsftpd.x86_64, all the way y go down , installation is complete. Service VSFTPD start to open the FTP service. To use FTP, you must turn on port 21. Centos 7 uses FIREWALLD instead of the original iptables. To open port 21, use the following command:

Firewall-cmd--zone=public--add-port=21/tcp--permanent
Command meaning:--zone #作用域--add-port=80/tcp #添加端口, in the format: Port/Communication protocol--permanent #永久生效, without this parameter restart after failure successfully set display success, restart the firewall Firewall-cmd--reload3,ftp530 Problem Resolution Test FTP login display 530 Permission denied, Baidu a bit messy, in fact, is vi/etc/vsftpd/vsftpd.confWill Userlist_enable=yes Change to No, and then Service vsftpd RestartRestart the vsftpd. Test the FTP login again, and then prompt 530 login incorrect, check the/etc/pam.d/vsftpd content, one of which is

Auth Required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed

VSFTPD The Forbidden list to/etc/vsftpd/ftpusers, so vi/etc/vsftpd/ftpusersFound root on the list, so Delete root, save, restart VSFTPD。 Login FTP OK Success!

CENTOS7 network configuration, VSFTPD installation and 530 error resolution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.