proftpd 설치 방법이다.  아래순서대로 따라 입력하면 된다.

http://www.proftpd.org
proftpd-1.2.2.tar.gz


vi /etc/passwd

proftpd:x:501:501::/usr/local/proftpd:/bin/false

vi /etc/group

proftpd:x:501:

gzip -dc proftpd-1.2.2.tar.gz | tar vxf -
cd proftpd-1.2.2
./configure --prefix=/usr/local/proftpd --enable-autoshadow
make
make install

cp contrib/dist/rpm/proftpd.init.d /etc/rc.d/init.d/proftpd
cd /etc/rc.d/init.d/
chmod 755 proftpd

vi /etc/rc.d/init.d/proftpd


#!/bin/sh
#
# Startup script for ProFTPd
#
# chkconfig: 345 85 15
# description: ProFTPD is an enhanced FTP server with \
#               a focus toward simplicity, security, and ease of configuration. \
#              It features a very Apache-like configuration syntax, \
#               and a highly customizable server infrastructure, \
#               including support for multiple 'virtual' FTP servers, \
#               anonymous FTP, and permission-based directory visibility.
# processname: proftpd
# config: /etc/proftpd.conf
#

# Source function library.
. /etc/rc.d/init.d/functions

FTPSHUT=/usr/local/proftpd/sbin/ftpshut
FTPDAEMON=/usr/local/proftpd/sbin/in.proftpd
PID=/usr/local/proftpd/var/proftpd.pid

# See how we were called.
case "$1" in
  start)
        echo -n "Starting proftpd: "
        if [ -f $FTPDAEMON ]; then
                echo -n "Started "
                $FTPDAEMON
        fi
        echo
        touch /var/lock/subsys/proftpd
        ;;
  stop)
        echo -n "Shutting down proftpd: "
        if [ -f $PID ]; then
                echo -n "Stopped "
                /bin/kill `cat $PID`
        fi
        echo
        rm -f /var/lock/subsys/proftpd
        ;;
  status)
        status proftpd
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  reread)
        echo -n "Re-reading proftpd config: "
        killproc proftpd -HUP
        echo
        ;;
  suspend)
        if [ -f $FTPSHUT ]; then
                if [ $# -gt 1 ]; then
                        shift
                        echo -n "Suspending with '$*' "
                        $FTPSHUT $*
                else
                        echo -n "Suspending NOW "
                        $FTPSHUT now "Maintanance in progress"
                fi
        else
                echo -n "No way to suspend "
        fi
        echo
        ;;
  resume)
        if [ -f /etc/shutmsg ]; then
                echo -n "Allowing sessions again "
                rm -f /etc/shutmsg
        else
                echo -n "Was not suspended "
        fi
        echo
        ;;
  *)
        echo -n "Usage: $0 {start|stop|restart|status|reread|resume"
        if [ "$FTPSHUT" = "" ]; then
                echo "}"
        else
                echo "|suspend}"
                echo "suspend accepts additional arguments which are passed to ftpshut(8)"
        fi
        exit 1
esac

if [ $# -gt 1 ]; then
        shift
        $0 $*
fi

exit 0


chmod 755 /etc/rc.d/init.d/proftpd
chown -R proftpd:proftpd /usr/local/proftpd/

vi /usr/local/proftpd/etc/proftpd.conf


# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use.  It establishes a single server
# and a single anonymous login.  It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName                      "OPEN"
ServerType                      standalone
DefaultServer                   on

# Port 21 is the standard FTP port.
Port                            21
# 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 that the server normally runs at.
User                            proftpd
Group                           proftpd

# Normally, we want files to be overwriteable.
<Directory /*>
  AllowOverwrite                on
</Directory>

######## Global start ###################################
<Global>
Umask                           022
#DisplayLogin                    .welcome.msg
#DisplayFirstChdir               .message
#User                           nobody
#Group                          nogroup
#MaxClients                     10
#MaxClientsPerHost              1
#UserAlias                       anonymous       ftp
RootLogin   off
#AuthPAMAuthoritative  on
#TimeoutIdle   300
DeferWelcome   off
RequireValidShell               on
ShowSymlinks                    on
DefaultRoot                     ~
timesGMT                        off
</Global>
######## Global end ###################################

# A basic anonymous configuration, no upload directories.
<Anonymous ~ftp>
  User                          ftp
  Group                         ftp
  # We want clients to be able to login with "anonymous" as well as "ftp"
  UserAlias                     anonymous ftp

  # LsDefaultOptions  "-a"

  # Limit the maximum number of anonymous logins
  MaxClients                    10
  MaxClientsPerHost  3 "Sorry, one connection allow per one host"
 
  # HideUser   root
  # HideGroup   root
 
  # We want 'welcome.msg' displayed at login, and '.message' displayed
  # in each newly chdired directory.
  DisplayLogin                  welcome.msg
  DisplayFirstChdir             .message

  # Limit WRITE everywhere in the anonymous chroot
  <Limit WRITE>
    DenyAll
  </Limit>

  <Directory incoming>
    <Limit READ>
      DenyALL
    </Limit>
    <Limit STOR MKD>
      AllowALL
    </Limit>
  </Directory>
 
  <Directory logs>
    <Limit READ WRITE DIRS>
      DenyALL
    </Limit>
  </Directory> 

</Anonymous>


/etc/rc.d/init.d/proftpd restart

'전자/컴퓨터 > Unix/Linux' 카테고리의 다른 글

sendmail 설치 스크립트  (2) 2008.07.21
NetBSD3.0에 APM설치 방법  (0) 2007.04.17
얼마전에 VMwere를 써서 NetBSD를 설치해보았다. 리눅스는 용량이커서 설치하기가 버거웠는는데 NetBSD 3.0
은 약 200메가 남짓하다. AMP을 소스로 받아설치하는 방법을 정리해보았다.

 1) 설치환경

  - 운영체제 : NetBSD 3.0

  - 사용버젼 : Apache-1.3.36, Mysql-4.0.26, PHP-4.4.2


 2) 설치방법

  * APM 설치 순서 *

    Mysql -> Apache configure -> PHP -> Apach

  (1) Mysql 설치

     #tar -zxvf mysql-4.0.26.tar.gz

     #cd mysql-4.0.26

     #./configure --prefix=/usr/local/mysql --with-charset=euc_kr -localstatedir=/usr/local/mysql/data

     #make

     #make install

     #/usr/local/mysql/bin/mysql_install_db

     #useradd -M -s /sbin/nologin mysql

     #chown -R mysql:mysql /usr/local/mysql

      *mysql 그룹이 없을 경우 ‘groupadd mysql’을 입력해 그룹을 생성해 줄것

     #/usr/local/mysql/bin/safe_mysqld &


   (2)Apache configure

     #tar -zxvf apache-1.3.36.tar.gz

     #cd apache-1.3.36

     #./configure

   

   (3)PHP 설치

     #tar -zxvf php-4.4.2.tar.gz

     #cd php-4.4.2

     #./configure --with-apache=[(2)번에서 apache-1.3.36의 경로] --with-mysql=/usr/local/mysql

     #make

     #make install

     #cp php.ini-dist /usr/local/lib/php.ini  * get, post가 안될 경우 regster_gobals = on 으로 설정할것

   

   (4)Apache 설치

     #cd  [(2)번에서 apache-1.3.36의 경로]

     #./configure --prefix=/usr/local/apache --activate-module=src/modules/php4/libphp4.a

     #make

     #make install

     #vi /usr/local/apache/bin/conf/httpd.conf (파일을 텍스트 에디터로 열어 아래의 내용이 있는지 확인후 없으면 아래와 같이 입력해 추가할것.)

      AddType application/x-httpd-php .php .php3 .phtml

      :wq

     #/usr/local/apache/bin/apachectl start

   

   (5)batch 파일설정 (/etc/rc.d/rc.local *파일 없을시 생성할것*)

     #vi /etc/rc.d/rc.local (파일을 텍스트 에디터로 열어 아래와 같이 입력할것.)

      /usr/local/mysql/bin/safe_mysqld &

      /usr/local/apache/bin/apachectl start

     :wq

'전자/컴퓨터 > Unix/Linux' 카테고리의 다른 글

sendmail 설치 스크립트  (2) 2008.07.21
proftpd 설치 방법  (0) 2007.04.17

+ Recent posts