Install and configure VSFTPD under CentOS5.2 源码配置安装vsftpd

20

Steps:

1.Download latest stable version 下载最新稳定版本
2.Uninstall installed version 卸载早期安装版本
3.Depcompress & make install 解压缩并执行安装

Step 1. Download  Latest Stable Version 下载最新稳定版本

[root@localhost opt]# wget ftp://vsftpd.beasts.org/users/cevans/vsftpd-2.1.0.tar.gz

Step2.Decompress & install

[root@localhost vsftpd-2.1.0]# make
……
/lib/libcap.so.1: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [vsftpd] Error 1
[root@localhost vsftpd-2.1.0]#

解决问题:操作系统为64位,选择64位的lib,即/lib64/….
修改vs_findlib.sh
接下来执行

[root@localhost vsftpd-2.1.0]# make
[root@localhost vsftpd-2.1.0]# make install

4.拷贝默认配置文件到/ETC

[root@localhost vsftpd-2.1.0]# cp vsftpd.conf /etc

并添加listen=YES在最后一行
5. 添加必要的帐户和目录
以下目录和帐户可能都已经有了就不用再建立了;

[root@localhost vsftpd-2.1.0]# adduser nobody
[root@localhost vsftpd-2.1.0]# mkdir /usr/share/empty
[root@localhost vsftpd-2.1.0]# mkdir /var/ftp
[root@localhost vsftpd-2.1.0]# adduser -d /var/ftp ftp
[root@localhost vsftpd-2.1.0]# chown root:root /var/ftp
[root@localhost vsftpd-2.1.0]# chmod og-w /var/ftp

6.
………………..没完成遇到点困难

Linux(CentOS5)下安装apc

14

#wget XXX //下载
# tar -zxvf APC-3.0.19.tgz //解压
# cd APC-3.0.19
# /usr/local/php5/bin/phpize //进入目录后运行PHPIZE 生产configure文件
# ./configure –enable-apc –enable-apc-mmap –with-php-config=/usr/local/php5/lib/php/php-config //编译
# make
# make install //安装后会在目录生成如下文件 /no-debug-zts-20060613/apc.so
# cp /usr/local/lib/php/extensions/no-debug-zts-20060613/apc.so /usr/local/php5/lib/php/extensions/apc.so //apc.so 拷贝到extensions目录
# chmod 755 /usr/local/php5/lib/php/extensions/apc.so //设置访问权限755修改 php.ini下
extension_dir = “./”
extension_dir = “/usr/local/php5/lib/php/extensions”配置/etc/php.ini 末尾加入
extension=apc.so
apc.enabled = 1
apc.cache_by_default = on
apc.shm_segments = 1
apc.shm_size = 32
apc.ttl = 600
apc.user_ttl = 600
apc.num_files_hint = 0
apc.write_lock = On
重启apache

mysql

07

[root@localhost opt]# /usr/local/bin/mysqld_safe &
[1] 7028
[root@localhost opt]# 090307 02:14:23 mysqld_safe Logging to ‘/usr/local/var/localhost.localdomain.err’.
090307 02:14:24 mysqld_safe Starting mysqld daemon with databases from /usr/local/var

[root@localhost opt]#

Install php

07

#tar zxvf php-5.2.6.tar.gz
# ./configure –prefix=/usr/local/php5 –with-

apxs2=/usr/local/apache2/bin/apxs –with-mysql=/usr/local –with-

gd=/usr/local/libgd –enable-gd-native-ttf –with-ttf –enable-gd-jis-

conv –with-freetype-dir=/usr/local/freetype –with-jpeg-

dir=/usr/local/libjpeg –with-png-dir=/usr/local/libpng –with-libxml-

dir=/usr/local/libxml2 –with-zlib-dir=/usr/local/zlib –enable-xml –

enable-mbstring –enable-sockets
#make
#make install
#cp php.ini-dist /usr/local/php5/lib/php.ini
#vi /etc/httpd.conf

ADD:

AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
#/usr/local/apache2/bin/apachectl stop &

我没有遇到下面的问题,貌似装系统的时候没有启动

这里出现一个错误:
httpd: Syntax error on line 53 of /etc/httpd.conf: Cannot load

/usr/local/apache2/modules/libphp5.so into server:

/usr/local/apache2/modules/libphp5.so: cannot restore segment prot after

reloc: Permission denied

解决办法:关闭 SELinux

vi /etc/sysconfig/selinux
屏蔽掉,
#SELINUX=enforcing
然后添加
SELINUX=disabled

Install GD Error

06

[root@localhost gd-2.0.35]# make
cd . && /bin/sh /opt/gd-all-17rumen/gd-2.0.35/config/missing –run automake-1.9 –foreign
Makefile.am:18: Libtool library used but `LIBTOOL’ is undefined
Makefile.am:18:
Makefile.am:18: The usual way to define `LIBTOOL’ is to add `AC_PROG_LIBTOOL’
Makefile.am:18: to `configure.ac’ and run `aclocal’ and `autoconf’ again.
make: *** [Makefile.in] Error 1
[root@localhost gd-2.0.35]#

1. yum -y install gettext-devel 未起作用
2.安装后按提示分别#aclocal #autoconf 进入MAKE成功