Pure-ftpd 설치 및 사용
시스템 에 Mysql+Apache+Dns 를 설치 해 야 합 니 다(선택 가능).
준비 소프트웨어
Ftpd Server :
pure-ftpd-1.0.20.tar.gz
pureftpd_php_manager:
pureftpd_php_manager.tar.gz
3.맞 춤 형 설치
1:압축 풀기
다운로드 한 두 파일 이 있 는 디 렉 터 리 로 이동 합 니 다.
#cd download
#tar zxvf pure-ftpd-1.0.20.tar.gz
#tar zxvf pureftpd_php_manager.tar.gz
2:컴 파일
#cd pure-ftpd-1.0.20
#./configure /
--prefix=/usr/local/pureftpd /
--with-mysql=/usr/local/mysql /
--with-paranoidmsg /
--with-shadow /
--with-welcomemsg /
--with-uploadscript /
--with-quotas /
--with-cookie /
--with-pam /
--with-virtualhosts /
--with-virtualroot /
--with-diraliases /
--with-sysquotas /
--with-ratios /
--with-ftpwho /
--with-throttling /
--with-language=simplified-chinese-------------->Socket 세 션 에 표 시 된 정보의 언어.영어,simplified-chinese 간 체 중국어,traditional-chinese BIG 5 번 체 중국어 가 부족 합 니 다.
--with-mysql=/usr/local/mysql/이곳 의/usr/local/mysql 실제 설치 경로 로 변경 하 십시오.configure:error:Your MySQL client libraries aren't properly installed 와 유사 한 오류 가 발생 하면 mysql 디 렉 터 리 에 있 는 include/mysql 의 mysql.h 파일 을 lib/mysql 에 있 는 모든 파일 로 연결 하 십시오.
3:설치
#make
#make check
#make install
#cp pureftpd-mysql.conf /usr/local/etc/
#cd configuration-file
#chmod u+x pure-config.pl
#cp pure-config.pl /usr/local/sbin/
#cp /usr/local/pureftpd/sbin/pure-ftpwho /usr/local/sbin/
#cp pure-ftpd.conf /usr/local/etc/
pureftpdphp_manager 디 렉 터 리 를 사이트 디 렉 터 리 로 복사 합 니 다.
cp -R pureftpd_php_manager /opt/www/pureftpd_php_manager
서비스 설정
1:/usr/local/etc/ure-ftpd.conf 파일 편집
찾아내다
#CreateHomeDir yes
...로 바꾸다
CreateHomeDir yes
사용자 로그 인,홈 디 렉 터 리 가 존재 하지 않 으 면 자동 으로 생 성 되 는 역할 을 합 니 다.
찾아내다
Umask 133:022
...로 바꾸다
Umask 755:755
새 파일 의 기본 속성 을 설정 합 니 다.
찾아내다
# MySQLConfigFile /etc/pureftpd-mysql.conf
...로 바꾸다
MySQLConfigFile /usr/local/etc/pureftpd-mysql.conf
ftpd 서비스의 인 자 를 Pureftpd-mysql.conf 로 설정 합 니 다.
파일 설정
#######################
메모리 종료.
2:/usr/local/etc/ureftpd-mysql.conf 파일 편집
그것 의 대략적인 모습 은 이렇다.
:
##############################################
# #
# Sample Pure-FTPd Mysql configuration file. #
# See README.MySQL for explanations. #
# #
##############################################
# Optional : MySQL server name or IP. Don't define this for unix sockets.
MYSQLServer localhost
#
# Optional : MySQL port. Don't define this if a local unix socket is used.
MYSQLPort 3306
#
# Optional : define the location of mysql.sock if the server runs on this host.
MYSQLSocket /opt/mysql/var/mysql.sock
#
# Mandatory : user to bind the server as.
MYSQLUser root
#
# Mandatory : user password. You must have a password.
MYSQLPassword 123456
#
# Mandatory : database to open.
MYSQLDatabase ftpd
#
# Mandatory : how passwords are stored
# Valid values are : "cleartext", "crypt", "md5" and "password"
# ("password" = MySQL password() function)
# You can also use "any" to try "crypt", "md5" *and* "password"
MYSQLCrypt cleartext
#
# In the following directives, parts of the strings are replaced at
# run-time before performing queries :
#
# /L is replaced by the login of the user trying to authenticate.
# /I is replaced by the IP address the user connected to.
# /P is replaced by the port number the user connected to.
# /R is replaced by the IP address the user connected from.
# /D is replaced by the remote IP address, as a long decimal number.
#
# Very complex queries can be performed using these substitution strings,
# especially for virtual hosting.
# Query to execute in order to fetch the password
MYSQLGetPW SELECT Password FROM users WHERE User="/L" AND status="1"
# ,status="1" .
# Query to execute in order to fetch the system user name or uid
MYSQLGetUID SELECT Uid FROM users WHERE User="/L"
# UID
# Optional : default UID - if set this overrides MYSQLGetUID
#MYSQLDefaultUID 1000
# Query to execute in order to fetch the system user group or gid
MYSQLGetGID SELECT Gid FROM users WHERE User="/L"
# Gid
# Optional : default GID - if set this overrides MYSQLGetGID
#MYSQLDefaultGID 1000
# Query to execute in order to fetch the home directory
MYSQLGetDir SELECT Dir FROM users WHERE User="/L"
#
# Optional : query to get the maximal number of files
# Pure-FTPd must have been compiled with virtual quotas support.
MySQLGetQTAFS SELECT QuotaFiles FROM users WHERE User="/L"
#
# Optional : query to get the maximal disk usage (virtual quotas)
# The number should be in Megabytes.
# Pure-FTPd must have been compiled with virtual quotas support.
MySQLGetQTASZ SELECT QuotaSize FROM users WHERE User="/L"
#
# Optional : ratios. The server has to be compiled with ratio support.
MySQLGetRatioUL SELECT ULBandwidth FROM users WHERE User="/L"
MySQLGetRatioDL SELECT DLBandwidth FROM users WHERE User="/L"
# , , Kb/s
# Optional : bandwidth throttling.
# The server has to be compiled with throttling support.
# Values are in KB/s .
# MySQLGetBandwidthUL SELECT ULBandwidth FROM users WHERE User="/L"
# MySQLGetBandwidthDL SELECT DLBandwidth FROM users WHERE User="/L"
# Enable ~ expansion. NEVER ENABLE THIS BLINDLY UNLESS :
# 1) You know what you are doing.
# 2) Real and virtual users match.
# MySQLForceTildeExpansion 1
# If you upgraded your tables to transactionnal tables (Gemini,
# BerkeleyDB, Innobase...), you can enable SQL transactions to
# avoid races. Leave this commented if you are using the
# traditionnal MyIsam databases or old (< 3.23.x) MySQL versions.
# MySQLTransactions On
저장 종료
실제 상황 에 따라 수정 하 십시오.아니면 직접 잘못 찾 아서 복사 하 십시오.
3:수정/opt/www/pureftpdphp_관리자/index.php 파일
#unzip -d pureftpd_php_manager pureftpd_php_manager.zip
#cd pureftpd_php_manager
주:위 에 Pureftpd-mysql.conf 라 고 써 있어 서 여 기 는 움 직 이지 않 아 도 됩 니 다.
#mv pureftpd-mysql.conf.sample /usr/local/etc/pureftpd-mysql.conf
#cp -R pureftpd_php_manager /var/wwwroot/html/pureftpd_php_manager
#cd /var/wwwroot/html/pureftpd_php_manager
#vi pureftp.config.php
수정:/opt/www/pureftpdphp_manager/pureftp.config.php 파일
:
######################
####### SETUP ########
######################
// pureftpd-mysql.conf , ,
$PUREFTP_CONFIG_FILE = '/usr/local/etc/pureftpd-mysql.conf';
// The location where all the Forms directed to. (Mayby no change needed)
$SELF_URL = 'index.php';
// The location of your pure-ftpdwho binary (set this to chmod 4711)
$FTP_WHO = "/usr/local/sbin/pure-ftpwho";
#######################
# DEFAULT NEW-USER PARAMS #
#######################
$DB_TABLE='users'; # ,
$DefaultUser = "ftpuser"; #
$DefaultPass = "passwd"; #
$DefaultUid = "2004"; # uid( apache uid, 48, PHP )
$DefaultGid = "2004"; # gid( apache gid, 48, PHP )
$DefaultDir = "/var/ftproot/ftpusershome"; #
$DefaultUL = "0"; # (KB/S)
$DefaultDL = "0"; # (KB/S)
$Defaultip = "*"; # IP
$DefaultQS = "50"; # quota
$Defaultcmt = ""; #
$DefaultQF = "0"; # quota
$PWC = "55"; # Vorsatz fuerr Crypt Password
저장 종료
5.시작 서비스 환경 만 들 기
1:사용자 와 그룹 만 들 기
#groupadd ftpusers -g 2004
#useradd ftpusers -g ftpusers -u 2004
2:데이터베이스 및 데이터 시트 만 들 기.
mysql>CREATE DATABASE pureftpd;
CREATE TABLE users (
User varchar(16) NOT NULL default '',
status enum('0','1') NOT NULL default '0',
Password varchar(64) NOT NULL default '',
Uid varchar(11) NOT NULL default '-1',
Gid varchar(11) NOT NULL default '-1',
Dir varchar(128) NOT NULL default '',
ULBandwidth smallint(5) NOT NULL default '0',
DLBandwidth smallint(5) NOT NULL default '0',
comment tinytext NOT NULL,
ipaccess varchar(15) NOT NULL default '*',
QuotaSize smallint(5) NOT NULL default '0',
QuotaFiles int(11) NOT NULL default 0,
PRIMARY KEY (User),
UNIQUE KEY User (User)
) TYPE=MyISAM;
또는 phpmyadmin 을 사용 하여 위의 데이터 테이블 과 데이터베이스 데이터베이스 이름 을 pureftpd 로 만 듭 니 다.
mysql>grant all on pureftpd.* to pureftpd@localhost identified by 'yourpassword'
mysql>FLUSH PRIVILEGES; //과부하 수권 표
편집/usr/local/etc/ureftpd-mysql.conf
방금 my sql 에서 새로 만 든 사용자 와 비밀 번 호 를 추가 합 니 다.옵션 은 간단 합 니 다.잘못 지지 않도록 주의 하 십시오.
6.Pureftpd 시작
1:서 비 스 를 시작 하려 면 서비스 프로필 의 위 치 를 알 리 기 위해 파 라 메 터 를 지정 해 야 합 니 다.
방법 1:
#/usr/local/pureftpd/sbin/pure-ftpd -l mysql:/usr/local/etc/pureftpd-mysql.conf &
방법 2:
#/usr/local/sbin/pure-config.pl /usr/local/etc/pure-ftpd.conf
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
laravel에 yo에서 angularJs&coffeescript를 사용할 수 있도록 한다.먼저 yo 명령을 사용할 수 있어야하므로 아래에서 설치 global에 설치한 곳에서 laravel의 프로젝트 루트로 이동. 클라이언트 코드를 관리하는 디렉토리를 만들고 이동합니다. 클라이언트 환경 만들기 이것으로 히...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.