系统 Slackware 12 32bit (单核虚拟机)
装备:
1.pcre ----The PCRE library is a set of functions that implement regular
expression pattern matching using the same syntax and semantics as
Perl 5. PCRE has its own native API, as well as a set of
wrapper functions that correspond to the POSIX regular expression
API. The PCRE library is free, even for building commercial
software. (安装nginx需要,nginx里面需要用到regular)
2.库类
zlib ----
zlib is designed to be a ,
general-purpose, legally unencumbered -- that is, not covered by any patents
-- lossless data-compression library for use on virtually any computer hardware
and operating system. (虽然系统自带都有,但是有时候或多或少出现版本的问题,最好自行编译,另外对于软件务求将模块编译进去,这样运行时候不必作无谓的搜索调用)
gd ----GD is an open source code library for the dynamic creation of images by
programmers. GD creates PNG, JPEG and GIF images, among other formats.
GD is commonly used to generate charts, graphics, thumbnails, and most
anything else, on the fly. While not restricted to use on the web, the
most common applications of GD involve web site development.
(同上)
3.jpeg png freetype xml 不多详述
4.nginx0.7.6一条 (nginx在新版本推出增加了-s参数)
php5.2一个
mysql5.0.2一只
zlib:
dir=/server
mkdir $dir/zlib ./configure \ --prefix=$dir/zlib 2>&1 >zlib.config.log
make 2>&1 >zlib.make.log make install 2>&1 >zlib.makeinstall.log
libxml2:
dir=/server mkdir -p $dir/libxml2 ./configure \ --prefix=$dir/libxml2 \ --with-http \ --with-zlib=$dir/zlib \ --enable-ipv6=no \ --enable-static \ --with-iconv=$dir/libiconv \ --with-zlib=$dir/zlib
make 2>&1 > libxml2.make.log make instal 2>&1 > libxm12.makeinstall.log
libpng:
mkdir -p $dir/server dir=/server ./configure \ --prefix=$dir/png 2>&1 >png.config.log \ --enable-static
make 2>&1 > png.make.log make install 2>&1 >png.makeinstall.log
jpeg: dir=/server mkdir -p $dir/jpeg/bin mkdir -p $dir/jpeg/lib mkdir -p $dir/jpeg/include mkdir -p $dir/jpeg/man/man1 mkdir -p $dir/jpeg/man1
./configure \ --prefix=$dir/jpeg \ --enable-static 2>&1 > jpeg.config.log
make 2>&1 > jpeg.make.log make install 2>&1 > jpeg.makeinstall.lo
freetype: dir=/server mkdir -p $dir/freetype
./configure \ --prefix=$dir/freetype \ --enable-static \ --with-zlib=$dir/zlib 2>&1 > freetype.config.log
make 2>&1 >freetype.make.log make install 2>&1 >freetype.makeinstall.log
以上是一些小东西的编译安装
php:
dir=/server
mkdir -p $dir/php
./configure \
--prefix=$dir/php \
--enable-static \
--with-gd=$dir/gd \
--enable-gd-native-ttf \
--with-jpeg-dir=$dir/jpeg \
--with-png-dir=$dir/png \
--with-freetype-dir=$dir/freetype \
--with-mysql=$dir/mysql \
--with-zlib-dir=$dir/zlib \
--with-libxml-dir=$dir/libxml2 \
--with-iconv-dir=$dir/libiconv \ ---这个我也是自行编译的,所以路径我改了
--enable-mbstring \
--with-pear=$dir/php/lib/php \
--with-readline \
--enable-fpm \ ----这个就是fcgi的控制器,新版本的php支持这个就自动支持fastcgi
不过仍然可以使用spwan来控制cgi fcgi,另外fpm是php的补丁,需要自行下载
[ gzip -cd php-fpm-5.X.diff.gz |patch -d php5.2 -p1 ] 进行打补丁行动
--enable-fastcgi \ ---这里有个奇怪的是在php520需要加上,php530不需要
--enable-sockets \
--enable-magic-quotes \
--enable-ftp \
-disable-ipv6
make 2>&1 >php.make.log
make install 2>&1 >php.makeinstall.log
mysql:
dir=/server groupadd mysql useradd mysql -s /bin/false -g mysql mkdir -p $dir/mysql/tmp mkdir $dir/mysql/data0 chown -R mysql:mysql $dir/mysql chmod 777 -R $dir/mysql touch $dir/mysql/tmp/mysql.sock
./configure \ --prefix=$dir/mysql \ --enable-static \ --enable-assembler \ --with-mysqld-user=mysql \ --with-client-ldflags=-all-static \ --with-mysqld-ldflags=-all-static \ --with-charset=utf8 \ --with-extra-charset=complex \ --with-zlib-dir=$dir/zlib \ --with-big-tables \ --localstatedir=$dir/mysql/data0 \ --enable-thread-safe-client \ --without-debug 2>&1 >mysql.config.log
make 2>&1 > mysql.make.log make install 2>&1 > mysql.makeinstall.log
#--with-openssl=$dir/openssl \ #--with-openssl-libs=$dir/openssl/lib \
nginx:
首先要安装pcre,不过很简单的
./configuer --prefix=XXXX
make ; make install
然后到nginx
groupadd www useradd www -s /bin/false -g www
dir=/server mkdir -p $dir/nginx ./configure --prefix=/server/nfp \ --user=nobody \ --group=nogroup \ --with-rtsig_module \ --with-select_module \ --with-poll_module \ --with-http_ssl_module \ --with-http_realip_module \ --with-http_addition_module \ --with-http_xslt_module \ --with-http_image_filter_module \ -这个需要gd库 --with-http_sub_module \ --with-http_dav_module \ --with-http_flv_module \ --with-http_gzip_static_module \ --with-http_random_index_module \ --with-http_secure_link_module \ --with-http_stub_status_module \ --with-perl=/usr/bin/perl \ --http-client-body-temp-path=/server/nfp/tmp/http \ --http-proxy-temp-path=/server/nfp/tmp/proxt \ --http-fastcgi-temp-path=/server/nfp/tmp/fcgi \ --without-mail_pop3_module \ --without-mail_imap_module \ --without-mail_smtp_module \ --with-pcre \ --with-md5-asm \ --with-sha1-asm \ --with-zlib-asm=pentiumpro \ --with-debug
make make install
|
阅读(516) | 评论(0) | 转发(0) |