Install ncftp, ncftpget, ncftpput Using Yum On CentOS Linux Server
I was messing around with the CPAN the Perl world wide archive of resources earlier today and it was asking for the default location of ncftpget. By default this is no longer installed on CentOS so you will first need to install the EPEL repository and then install NCFTP using yum. Follow the directions below to install ncftp which includes ncftpput, ncftpget, ncftpbatch, ncftpspooler, and more.
Install NCFTP Using Yum On A CentOS Linux Server:
- Install EPEL Repository: If you do not already have the EPEL repo installed then issue the below command from a terminal window or shell.
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
This command may change a bit depending on the version of CentOS you have installed or the version of the EPEL that is available.
**NOTE** The EPEL repository version may have been updated since this article was written so if 5.4 does not work then attempt to install 5.5, 5.6, etc. Thanks to L. Ramsey below for pointing out that the latest driver version as of 9/12/2010 was 5.4.
- Install NCFTP Via Yum: Now install NCFTP using the yum package manager. If this is your first time installing something using the EPEL you will be prompted to import the EPEL GPG key as seen in the below example. The includes the entire output of installing ncftp using yum from a shell.
[root@server ~]# yum list *NCFTP* Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.fdcservers.net * base: mirrors.tummy.com * centosplus: mirrors.serveraxis.net * epel: mirrors.tummy.com * extras: centos-distro.cavecreek.net * rpmforge: apt.sw.be * updates: mirror.ubiquityservers.com addons | 951 B 00:00 base | 2.1 kB 00:00 centosplus | 951 B 00:00 epel | 3.4 kB 00:00 epel/primary_db | 2.3 MB 00:02 extras | 1.1 kB 00:00 updates | 1.9 kB 00:00 Available Packages ncftp.i386 2:3.2.2-1.el5 epel [root@corp2 ~]# yum install ncftp Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: mirror.fdcservers.net * base: mirrors.tummy.com * centosplus: mirrors.serveraxis.net * epel: mirrors.tummy.com * extras: centos-distro.cavecreek.net * rpmforge: apt.sw.be * updates: mirror.ubiquityservers.com Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package ncftp.i386 2:3.2.2-1.el5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ==================================================================================================================================== Package Arch Version Repository Size ==================================================================================================================================== Installing: ncftp i386 2:3.2.2-1.el5 epel 567 k Transaction Summary ==================================================================================================================================== Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 567 k Is this ok [y/N]: y Downloading Packages: ncftp-3.2.2-1.el5.i386.rpm | 567 kB 00:00 warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 217521f6 epel/gpgkey | 1.7 kB 00:00 Importing GPG key 0x217521F6 "Fedora EPEL <email@example.com>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL Is this ok [y/N]: y Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : ncftp 1/1 Installed: ncftp.i386 2:3.2.2-1.el5 Complete!
- Verify NCFTP Install: Now from a shell window verify ncftp has been installed by issuing the “ncftp -h” command as shown in the below example.
[root@server ~]# ncftp -h Usage: ncftp [flags] [<host> | <directory URL to browse>] Flags: -u XX Use username XX instead of anonymous. -p XX Use password XX with the username. -P XX Use port number XX instead of the default FTP service port (21). -j XX Use account XX with the username (rarely needed). -F Dump a sample $HOME/.ncftp/firewall prefs file to stdout and exit. Program version: NcFTP 3.2.2/409 Aug 18 2008, 10:48 PM Library version: LibNcFTP 3.2.3 (August 18, 2008) Build system: Linux xenbuilder2.fedora.redhat.com 2.6.18-107.el5xen #1 ... This is a freeware program by Mike Gleason (http://www.NcFTP.com). A directory URL ends in a slash, i.e. ftp://ftp.freebsd.org/pub/FreeBSD/ Use ncftpget and ncftpput for command-line FTP and file URLs.
Now you can use ncftp, ncftpput, and ncftpget on your CentOS Linux server. If you have any further questions comment below and someone will respond.