总述:
a.安装FAMP环境:
一定得修改 此用户UID
pw usermod nobody -u 65533
*Apache 使用nobdy帐户来启动
1.安装ports
2.wget pkg_config libiconv gmake autoconf262 pkg-config bash expect
cd /usr/ports/devel/gmake && make install clean
cd /usr/ports/devel/autoconf262 && make install clean
cd /usr/ports/devel/pkg-config && make install clean
cd /usr/ports/net/openntpd && make install clean
cd /usr/ports/sysutils/lsof && make install clean
cd /usr/ports/shells/bash && make install clean;
安装 pcre
cd /usr/ports/devel/pcre && make install clean
show "Starting install ports (wget pkg_config libiconv gmake autoconf261 pkg-config bash expect)"
#----------------------------------web installtion scripts----------------------------------------
pkg_info |grep -q wget || { cd /usr/ports/ftp/wget && make install clean;}
[ $? -ne 0 ] && eshow "ERROR: install ports wget"
pkg_info |grep -q libiconv || { mkdir -p /var/db/ports/libiconv/
echo '_OPTIONS_READ=libiconv-1.11_1' > /var/db/ports/libiconv/options
echo 'WITH_EXTRA_ENCODINGS=true' >>/var/db/ports/libiconv/options
echo 'WITHOUT_EXTRA_PATCHES=true' >>/var/db/ports/libiconv/options
cd /usr/ports/converters/libiconv && make install clean;}
[ $? -ne 0 ] && eshow "ERROR: install ports libiconv"
pkg_info |grep -q tk-8 || { mkdir -p /var/db/ports/tk84/
echo '_OPTIONS_READ=tk-8.4.16,2' >/var/db/ports/tk84/options
echo 'WITH_TK84_MAN=true' >>/var/db/ports/tk84/options
cd /usr/ports/x11-toolkits/tk84 && make install clean; }
[ $? -ne 0 ] && eshow "ERROR: install ports tk-8.4.16,2"
pkg_info |grep -q gmake || { cd /usr/ports/devel/gmake && make install clean;}
[ $? -ne 0 ] && eshow "ERROR: install ports gmake"
pkg_info |grep -q autoconf || { cd /usr/ports/devel/autoconf261 && make install clean;}
[ $? -ne 0 ] && eshow "ERROR: install ports autoconf261"
pkg_info |grep -q bash || { cd /usr/ports/shells/bash && make install clean;}
[ $? -ne 0 ] && eshow "ERROR: install ports bash"
pkg_info |grep -q expect || {
cp expect-5.43.0.tar.gz /usr/ports/distfiles/
cd /usr/ports/lang/expect && make install clean; }
[ $? -ne 0 ] && eshow "ERROR: install ports expect
修改 MD5值
/usr/ports/lang/expect/distinfo
MD5 (expect-5.43.0.tar.gz) = 230400129630335b3060a42f66fec11d
SHA256 (expect-5.43.0.tar.gz) = d11a77e680ddc0244370b46f117f0b28a6571db842885bee3b7c15372c1ca079
SIZE (expect-5.43.0.tar.gz) = 525570
*注:expect-5.43.0.tar.gz此文件使用ports安装不了,请下载一下。
pkg_add -r axel *注 加速下载的程序,号称*NIX下的迅雷。
3.安装apr-1.3.8.tar.gz axel
apr-util-1.3.9.tar.gz axel
翻译APACHE会用到
cat >>/etc/rc.local <sysctl net.inet.tcp.drop_synfin=1
sysctl net.inet.ip.fw.dyn_ack_lifetime=180
sysctl net.inet.ip.fw.dyn_syn_lifetime=5
sysctl net.inet.icmp.drop_redirect=1
sysctl net.inet.tcp.msl=7500
sysctl net.inet.ip.fw.dyn_max=65535
EOF
echo "set autolist" >> /root/.cshrc
*注:同步时间
crontab -e
1 1 * * * ntpdate clock.nc.fukuoka-u.ac.jp >& /dev/null
安装相关库文件:
U300_setup_package 此包较大,请自行下载,或者可以使用ports安装
#install zlib/jpeg/fontconfig/freetype/gzip/libpng/curl/
cd /root/U300_setup_package
tar -jxf zlib-1.2.3.tar.bz2 && cd zlib-1.2.3 && ./configure && make && make install && cd ..
tar -zxf jpegsrc.v6b.tar.gz && cd jpeg-6b/ && ./configure --enable-shared --enable-static && make && make install && cd
..
tar -zxf libxml2-sources-2.6.30.tar.gz && cd libxml2-2.6.30/ && ./configure && make && make install && cd ..
tar -zxf freetype-2.3.5.tar.gz && cd freetype-2.3.5 && gmake && gmake install && cd ..
tar -zxf fontconfig-2.4.91.tar.gz && cd fontconfig-2.4.91 && ./configure && make && make install && cd ..
tar -zxf gzip-1.2.4.tar.Z && cd gzip-1.2.4/ && ./configure && make && make install && cd ..
tar -zxf libpng-1.2.22.tar.bz2 && cd libpng-1.2.22 && ./configure && make && make install && cd ..
tar -zxf curl-7.17.1.tar.bz2 && cd curl-7.17.1 && ./configure && make && make install && cd ..
#install GD2
setenv LD_LIBRARY_PATH /usr/local/lib
tar -zxf gd-2.0.35.tar.bz2 && cd gd-2.0.35
./configure --prefix=/usr/local/gd2/ --with-png --with-freetype --with-jpeg --without-xpm
make && make install && cd ..
或者:
只能使用Ports安装
cd /usr/ports/graphics/gd && make && make install clean
setenv LD_LIBRARY_PATH /usr/local/lib
#install apache2
tar -zxf httpd-2.2.6.tar.bz2
cd httpd-2.2.6 && ./configure --prefix=/usr/local/apache2/ --enable-mods-shared=all --with-mpm=worker --enable-so --enable-rewrite
make && make install && cd ..
使用其他服务器配制
#install mysql client
tar -zxf mysql-5.0.45.tar.gz && cd mysql-5.0.45
./configure --prefix=/usr/local/mysql5 \
--enable-assembler \
--with-mysqld-ldflags=-all-static \
--with-client-ldflags=-all-static \
--enable-thread-safe-client \
--with-charset=gbk
make && make install && cd ..
#install php5
ldconfig -m /usr/local/mysql5/lib/mysql/
tar -zxf php-5.2.4.tar.bz2 && cd php-5.2.4/
./configure --prefix=/usr/local/php5 \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql=/usr/local/mysql5 \
--with-freetype-dir \
--with-pdo-sqlite \
--with-pdo-mysql=/usr/local/mysql5 \
--with-zlib \
--with-png-dir \
--with-iconv \
--with-libxml-dir \
--with-jpeg-dir \
--with-curl \
--with-gd \
--enable-ftp \
--enable-zip \
--enable-mbstring \
--disable-ipv6 \
--with-mcrypt \
--with-config-file-path=/usr/local/xncenter/confcenter/
make && make install && cp php.ini-dist /usr/local/confcenter/php.ini && cd ..
#install Zend
ln -s /usr/lib/libc.so /usr/lib/libc.so.6
ln -s /usr/lib/libcrypt.so /usr/lib/libcrypt.so.3
ln -s /usr/lib/libutil.so /usr/lib/libutil.so.5
ln -s /usr/lib/libm.so /usr/lib/libm.so.4
cd /usr/ports/devel/ZendOptimizer/work/ZendOptimizer..
tar -zxf ZendOptimizer-3.3.0a-freebsd6.0-i386.tar.gz && cd ZendOptimizer-3.3.0a-freebsd6.0-i386
./install-tty
Please specify the location for installing Zend Optimizer [/usr/local/Zend]:Enter
Confirm the location of your php.ini file [/usr/local/etc]: /usr/local/php5
Are you using Apache Web server?
Answer (yes or no) [YES]: Enter
Specify the full path to the Apache control utility (apachectl) [/usr/local/apache2/bin/apachectl]: Enter
Restart the Web server now?
Answer (yes or no) [YES]: Enter
#install pureftpd
tar -zxf pure-ftpd-1.0.21.tar.gz && cd pure-ftpd-1.0.21
ldconfig -m /usr/local/mysql5/lib/mysql
./configure \
--prefix=/usr/local/pureftpd \
--with-mysql=/usr/local/mysql5 \
--with-paranoidmsg \
--with-shadow \
--with-welcomemsg \
--with-uploadscript \
--with-quotas \
--with-cookie \
--with-pam \
--with-virtualhosts \
--with-virtualchroot \
--with-diraliases \
--with-ratios \
--with-ftpwho \
--with-throttling \
--with-peruserlimits \
--with-language=simplified-chinese
cp configuration-file/pure-config.pl && chmod +x configuration-file/pure-config.pl
拷贝相关配制文件(pure-ftpd.conf pureftpd-mysql.conf pureftpd.msg )
到/usr/local/xncenter/confcenter
修改 pureftpd-mysql.conf
/usr/local/pureftpd//sbin/pure-config.pl /usr/local/xncenter//confcenter//pure-ftpd.conf
FTP日志:
vi /etc/syslog.conf
#ftp.info /var/log/xferlog
ftp.* /usr/local/xncenter/logcenter/pureftp.log
安装mcrypt扩展:
1. wget
2. wget
2.先安装Libmcrypt
1. tar jxvf libmcrypt-2.5.8.tar.bz2
2. cd libmcrypt-2.5.8
3. ./configure
4. make
5. make install
3.安装mhash
1. tar jxvf mhash-0.9.9.9.tar.bz2
2. cd mhash-0.9.9.9
3. ./configure
4. make
5. make install
4.进入原来编译php的源码包下的ext文件夹(一定要和原来编译php的版本相同)
cd src/php-5.2.10/ext/mcrypt/
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make
make install
5.修改php.ini
把php.ini中的
extension_dir 的值改为
/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/
或者不改这个值,把.so文件拷贝到extension_dir值指向的目录下。
加入
extension=mcrypt.so
安装perl DBI :
perl -MCPAN -e shell
install DBI
install DBD::mysql
install MD5
install Digest::MD5
install CGI
install Apache::DBI
install YAML
exit
如果安装不了
cp .cpan/sources/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.013.tar.gz ./
perl Makefile.PL --mysql_config=/usr/local/mysql5/bin/mysql_config
make
make install
阅读(1067) | 评论(0) | 转发(0) |