FTP Connection Virtual Machine Linux

Source: Internet
Author: User
Tags ftp connection

1, install FTP

from redhat official website www.redhat.com download RHEL6.4 64bit Trial version (must be registered with the Enterprise mailbox as a partner instead of individual users to download), after installation found that the system does not have FTP life Make. Yum is not available because RHEL6.4 is not registered with the trial version. Then try to use RPM to install the appropriate FTP installation package from the CD.
1. First mount the system installation disk, MOUNT/DEV/CDROM/MNT

(You can find it first in the Packages folder or in otherftp-0.17-53.el6.x86_64.rpm, unable to find the Mount system installation disk)
2. Enter the disc to find the installation package,cd/mnt/Packages
3.[Email protected] packages]#ls-a | grep ftp*
ftp-0.17-53.el6.x86_64.rpm

4. Install the program,RPM-IVH ftp-0.17-53.el6.x86_64.rpm
5. After the installation is complete, review the service Chkconfig--list and discover that the vsftpd service is installed
Note: The start and close commands for the FTP service are: Service vsftpd Strat/stop/restart

2, if chkconfig--list, no vsftpd service, need to install VSFTPD

①, set yum software source as local ISO

Right-click on the virtual machine name--Settings--options--shared folder--enable--add--(the folder where the Linux image files on the computer are located, for example:)

Shared image files can be found under the /mnt/hgfs/iso path:rhel-server-6.3-x86_64-dvd.iso

②, mount the ISO to a directory (for example, my:/media/rheliso/):

               # MOUNT –O LOOP  /mnt/hgfs/iso/rhel-server-6.3-x86_64-dvd.iso  /media /rheliso/ 

③, editor Rhel-source.repo

#vi /etc/yum.repos.d/rhel-source.repo

Add :

[Server]

Name=rhel5server

Baseurl=file:///media/rheliso/server

Enable=1

Gpgcheck=1

Gpgkey=file:///media/rheliso/rpm-gpg-key-redhat-release

④, installing VSFTPD

#yum Install vsftpd (select "Y" in the installation)

⑤, configuring VSFTPD

#vi/etc/vsftpd/vsftpd.conf

            once the VSFTP package is installed, the VSFTP system service will be added automatically and the "/etc/init.d/vsftp" script can control the start-up and termination of the VSFTP service
the configuration file for the VSFTP service is located by default in the /etc/vsftp/ folder, mainly including the user Control list file (ftpusers, User_list) and the Master profile (vsftpd.conf ).
The ftpusers and user_list files contain a list of FTP users, while two files are used for FTP user control, but there are some differences in the role
& nbsp         ftpusers file: The file contains a user account that will be blocked from logging on to the VSFTP server

        (for example, to log in with root, ftpusers to avoid being vsftp Disable )
         user_ List file: The user account contained in the file may be blocked from logging in, or may be allowed to log in to , as determined in the main profile vsftpd.conf.

When the "Userlist_enable=yes" configuration item is present, the User_list file takes effect and if "Userlist_deny=yes" is configured, only the user account in the list is blocked from logging in.

If "Userlist=deny=no" is configured, only user accounts in the list are allowed to log on

--------------------------------------------------------------------------------------------------------------- -----
Vsftpd.conf Common configuration items and meanings

anonymous_enable=YESwhether to allow anonymous access
local_enable=YES whether to allow local system users access
write_enable=YESenabling any form of write permission (such as uploading, deleting files, etc.) requires that this item be turned on
local_umask=022Set default permission mask values for files uploaded by local users
dirmessage_enable=YES Displays the contents of the. message file (if present) when the user switches into the directory.
xferlog_enable=YESenable Xferlog logging, default logging to "/var/log/xferlog" file
connect_from_port_20=YESAllow server active mode (data connection is established from Port 20)
xferlog_std_format=YESenable the standard Xferlog log format, and if you disable the secondary option, you will use Vsftp's own log format
listen=YESwhether to monitor the service in a stand-alone manner

Pam_service_name=vsftpd
userlist_enable=yes (user_list file takes effect)
Tcp_wrappers=yes
Userlist_deny=no ( allow only user accounts in the list to log in)
Userlist_file=/etc/vsftpd/user_list (add)

⑥, creating a user and host directory

# Useradd User1

# mkdir-p/var/ftp/pub

# ls-ld/var/ftp/pub

⑦, start the VSFTPD service

Chkconfig--list

Service VSFTPD Start/stop/restart


FTP Connection Virtual Machine Linux

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.