以service xinetd restart 的方式开启proftpd

  1
    mount /dev/cdrom /mnt
  2
    cd /mnt/Server
  3
    vim /etc/yum.repos.d/rhel-source.repo

[rhel-source]
name=Red Hat Enterprise Linux $releasever - Source
baseurl=file:///mnt/Server/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
   
  4
    yum install -y gcc*
  5
    cd /root
  6
    cd Desktop
  7  
    tar fvxz proftpd-1.3.3.tar.gz
 
   cd proftpd-1.3.3
  8 
   ./configure --prefix=/usr/local/proftpd --enable-shadow --enable-autoshadow --with-modules=mod_ratio:mod_readme:mod_wrap

  9
    make && make install
 10
    cd /usr/local/proftpd/
 11
    vim /etc/man.config

#
.gz             /usr/bin/gunzip -c
.bz2            /usr/bin/bzip2 -c -d
.z
.Z              /bin/zcat
.F
.Y
MANPATH /usr/local/proftpd/man

  12
    cd /etc/xinetd.d/
  13
    vim proftpd

service ftp
{
                      disable = no
                      flags = REUSE
                      socket_type = stream
                      wait = no
                      user = root
                      server = /usr/local/proftpd/sbin/proftpd
                      server_args = -c /usr/local/proftpd/etc/proftpd.conf
                      log_on_success += DURATION USERID
                      log_on_failure += USERID
}

  14

   vim /usr/local/proftpd/etc/proftpd.conf


ServerType                      standalone
ServerType                      inetd
DefaultServer                   on

# Port 21 is the standard FTP port.
Port                            21

# Don't use IPv6 support by default.
UseIPv6                         off

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask                           022

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances                    30

# Set the user and group under which the server will run.
User                            nobody
Group                           nobody

  15

  service xinetd restart
[root@localhost xinetd.d]# service xinetd restart
停止 xinetd:                                              [确定]
启动 xinetd:                                              [确定]

  16

  netstat -antlp | grep :21

[root@localhost xinetd.d]# netstat -antlp | grep :21
tcp        0      0 0.0.0.0:21                  0.0.0.0:*                   LISTEN      23877/xinetd   
 
  17
  mkdir -p ftp/pub
 
  18  在客户端

[root@localhost ~]# ftp 192.168.18.157
Connected to 192.168.18.157.
220 ProFTPD 1.3.3 Server (ProFTPD Default Installation) [192.168.18.157]
500 AUTH not understood
500 AUTH not understood
KERBEROS_V4 rejected as an authentication type
Name (192.168.18.157:root): ftp
331 Anonymous login ok, send your complete email address as your password
Password:
530-Unable to set anonymous privileges.
530 Login incorrect.
Login failed.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

 

用service proftpd restart

1
 cd /root
2
 cd Desktop

3

 cd proftpd-1.3.3
4
  ./configure --prefix=/usr/local/proftpd --enable-shadow --enable-autoshadow --with-./configure --prefix=/usr/local/proftpd --enable-shadow --enable-autoshadow --with-
5
 
 make && make install

6
 cp contrib/dist/rpm/proftpd.init.d /etc/init.d/proftpd

7
  service proftpd restart
8
 cd /etc/init.d/

9
 chmod 755 proftpd

10
  service proftpd restart
11
  vim /usr/local/proftpd/etc/proftpd.conf

# Set the user and group under which the server will run.
User                            nobody
Group                           nobody

12
 vim /etc/init.d/proftpd

PATH="$PATH:/usr/local/proftpd/sbin"

13
 service proftpd restart
[root@localhost ~]# service proftpd restart
Shutting down proftpd:                                     [失败]
Starting proftpd:                                          [确定]

14
  service proftpd restart

[root@localhost ~]# service proftpd restart
Shutting down proftpd:                                     [确定]
Starting proftpd:                                          [确定]

15
 netstat -antlp | grep :21

[root@localhost ~]# netstat -antlp | grep :21
tcp        0      0 0.0.0.0:21                  0.0.0.0:*                   LISTEN      944/proftpd: (accep

16
在客户端上

[root@localhost ~]# ftp 192.168.18.157
Connected to 192.168.18.157.
220 ProFTPD 1.3.3 Server (ProFTPD Default Installation) [192.168.18.157]
500 AUTH not understood
500 AUTH not understood
KERBEROS_V4 rejected as an authentication type
Name (192.168.18.157:root): ftp
331 Anonymous login ok, send your complete email address as your password
Password:
530-Unable to set anonymous privileges.
530 Login incorrect.
Login failed.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> quit
221 Goodbye.
You have new mail in /var/spool/mail/root