[ROOT@ZHANGC server]# yum install-y vsftpd-2.0.5-16.el5.i386.rpm–nogpgcheck ' Install vsftpd '
[ROOT@ZHANGC ~]# cd/etc/pki/ca/"into the CA directory"
[ROOT@ZHANGC ca]# CD ...
[ROOT@ZHANGC pki]# Vim tls/openssl.cnf
Dir =/etc/pki/ca "root directory of CAS"
# for the CA policy
[Policy_match]
CountryName = Optional
Stateorprovincename = Optional
OrganizationName = Optional
136 Countryname_default = CN
Stateorprovincename_default = HN
144 Localityname_default = ZZ
[ROOT@ZHANGC ca]# mkdir CRL certs newcerts ' Create Missing folder '
[ROOT@ZHANGC ca]# Touch index.txt serial "Create Missing Files"
[ROOT@ZHANGC ca]# echo ">serial" Enter the starting serial number "
[ROOT@ZHANGC ca]# OpenSSL genrsa 1024 >private/cakey.pem "Generate key"
[ROOT@ZHANGC ca]# chmod private/* "Modify Permissions"
[ROOT@ZHANGC ca]# OpenSSL req-new-key private/cakey.pem-x509-out cacert.pem ' Generate certificate '
Country Name (2 letter code) [CN]:
State or province Name (full name) [HN]:
Locality Name (eg, city) [ZZ]:
Organization Name (eg, company) [Me company LTD]:ZHANGC
Organizational unit Name (eg, section) []:zhangc.com
Common name (eg, your name or your server ' s hostname) []:www.zhangc.com
Email Address []:vipzhangchao@yeah.net
[ROOT@ZHANGC server]# mkdir/etc/vsftpd/certs "Create certificate store Directory"
[ROOT@ZHANGC server]# cd/etc/vsftpd/certs/
[ROOT@ZHANGC certs]# OpenSSL genrsa 1024 >vsftpd.key ' Create key '
[ROOT@ZHANGC certs]# OpenSSL req-new-key vsftpd.key-out VSFTPD.CSR "Generate certificate request file using keys"
[ROOT@ZHANGC certs]# OpenSSL ca-in vsftpd.csr-out vsftpd.cert ' Generate certificate with certificate request file '
[ROOT@ZHANGC certs]# vim/etc/vsftpd/vsftpd.conf "Edit FTP Security certificate authentication feature"
119 Rsa_cert_file=/etc/vsftpd/certs/vsftpd.cert
Rsa_private_key_file=/etc/vsftpd/certs/vsftpd.key
121 Ssl_tlsv1=yes
122 Ssl_sslv3=yes
123 Ssl_enable=yes
124 Force_local_logins_ssl=yes
Force_local_data_ssl=yes
: Wq
FTP server with SSL Layer Security certificate to be built.
This article is from the "Art Boundless" blog, please be sure to keep this source http://zhangc.blog.51cto.com/5627676/998866