Thursday, March 8, 2012

FTP Install

First you need to download lftp


[root@localhost /]# yum install lftp

after that 

mkdir /usr/local/src/ftpd
cd /usr/local/src/ftpd


before you write below line, you should look on the http://www.proftpd.org/
and check lasted version.

lftpget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.4a.tar.gz

[root@localhost ftpd]# tar -xvzf proftpd-1.3.4a.tar.gz
proftpd-1.3.4a/
proftpd-1.3.4a/doc/
proftpd-1.3.4a/doc/utils/
proftpd-1.3.4a/doc/utils/ftpcount.html
proftpd-1.3.4a/doc/utils/ftpmail.html
proftpd-1.3.4a/doc/utils/ftpasswd.html
proftpd-1.3.4a/doc/utils/ftpscrub.html
proftpd-1.3.4a/doc/utils/ftpwho.html
proftpd-1.3.4a/doc/utils/ftptop.html
proftpd-1.3.4a/doc/utils/ftpquota.html
proftpd-1.3.4a/doc/utils/ftpdctl.html
proftpd-1.3.4a/doc/utils/index.html
proftpd-1.3.4a/doc/utils/ftpshut.html
proftpd-1.3.4a/doc/contrib/
proftpd-1.3.4a/doc/contrib/mod_sql_odbc.html
proftpd-1.3.4a/doc/contrib/mod_wrap2_file.html
proftpd-1.3.4a/doc/contrib/mod_ifsession.html
proftpd-1.3.4a/doc/contrib/mod_exec.html
proftpd-1.3.4a/doc/contrib/mod_quotatab.html
proftpd-1.3.4a/doc/contrib/mod_ldap.html
proftpd-1.3.4a/doc/contrib/mod_radius.html
proftpd-1.3.4a/doc/contrib/

...............


[root@localhost proftpd-1.3.4a]# ./configure --prefix=/usr/local/server/proftpd --enable-autoshadow --enable-shadow
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
[root@localhost proftpd-1.3.4a]# 



if you find 

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH

you should install : yum install gcc
you should install : yum install make

and retry ./configure ..........


write : make

write : make install

/usr/local/server/proftpd/etc/proftpd.conf 

oepn with vi 

and line 27 nogroup -> nobody

[root@localhost sbin]# ./proftpd &
[1] 11663

why & add??
this means that we run server in background


vi iptables

# Generated by iptables-save v1.4.2 on Mon Jul 11 14:23:01 2011
*filter
:INPUT ACCEPT [1190:468478]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [763:273145]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
COMMIT

service iptables restart

and try to access from ftp tools






No comments:

Post a Comment