linux下安装apache2.2+openssl

Posted Jun 5th, 2008 by askie

openssl安装:
./config –prefix=/usr shared
//注意这里一定要是用shared方式,否则编译apahce的时候会有错误
make
make install

apache安装:
./configure -prefix=/usr/local/apache2 -enable-so -enable-ssl=static -with-ssl=/usr/ssl

其他的安装步骤见:Apache2 + mod_ssl + php5 完全安装实录

相关文章:

中文关键字:php openssl apache linux 2.2 ssl enable prefix shared usr make 编译 实录 configure 步骤 要是 否则 错误 一定 Apache2 install 时候 方式 完全 config

2 Responses to “linux下安装apache2.2+openssl”

  • 蝈蝈 on 06 Jun 2008 at 12:16 am

    [编译php]
    ./configure –prefix=/usr/local/php –with-apxs2=/usr/local/apache2/bin/apxs –with-openssl=/usr –with-jpeg-dir=/usr/local/jpeg6/ –with-png-

    dir=/usr/local/libpng2/ –with-gd=/usr/local/gd2/ –with-freetype-dir=/usr/local/freetype2/ –enable-trace-vars –with-zlib-

    dir=/usr/local/zlib2/ -with-mysql=/usr/local/mysql -with-pdo=shared -with-pdo-mysql=shared

    [Reply]

  • 蝈蝈 on 06 Jun 2008 at 12:17 am

    //下载png扩展库
    # wget ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.10.tar.bz2
    //下载tiff扩展库
    # wget ftp://ftp.remotesensing.org/pub/libtiff/tiff-3.8.2.tar.gz
    //下载curl扩展库
    # wget http://curl.haxx.se/download/curl-7.15.3.tar.gz
    //下载libiconv扩展库
    # wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.9.2.tar.gz
    //
    # wget http://www.boutell.com/gd/http/gd-2.0.33.tar.gz
    //
    # wget http://savannah.nongnu.org/download/freetype/freetype-2.1.10.tar.gz
    //
    # wget ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
    //
    # wget http://switch.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.8.tar.gz
    //
    # wget http://www.openssl.org/source/openssl-0.9.7g.tar.gz
    //
    # wget ftp://vsftpd.beasts.org/users/cevans/vsftpd-2.0.3.tar.gz
    //
    # wget http://www.zlib.net/zlib-1.2.2.tar.gz
    //
    # wget http://www.fastio.com/clibpdf202r1.tar.gz

    (1) 安装zlib
    # tar zxvf zlib-1.2.2.tar.gz
    # cd zlib-1.2.2
    # ./configure
    # make
    # make install

    (2) 安装libpng
    # tar zxvf libpng-1.2.7.tar.tar
    # cd libpng-1.2.7
    # cd scripts/
    # mv makefile.linux ../makefile
    # cd ..
    # make
    # make install
    注意,这里的makefile不是用./configure生成,而是直接从scripts/里复制一个。

    (3) 安装freetype
    # tar zxvf freetype-2.1.9.tar.gz
    # cd freetype-2.1.9
    # ./configure
    # make
    # make install

    (4) 安装Jpeg
    # mkdir /usr/local/jpeg
    # mkdir /usr/local/jpeg/bin
    # mkdir /usr/local/jpeg/lib
    # mkdir /usr/local/jpeg/include
    # mkdir /usr/local/jpeg/man
    # mkdir /usr/local/jpeg/man/man1

    # tar zxvf jpegsrc.v6b.tar.gz
    # cd jpeg-6b/
    # ./configure –prefix=/usr/local/jpeg/ –enable-shared -enable-static
    # make
    # make test
    # make install
    注意:这里configure一定要带–enable-shared参数,不然,不会生成共享库

    (5)安装GD
    # tar zxvf gd-2.0.33.tar.gz
    # cd gd-2.0.33
    # ./configure –with-png –with-freetype –with-jpeg
    # make install

    (6)tiff 扩展库安装
    //直接拷贝如下指令,进行操作
    # ./configure –prefix=/usr/local/tiff
    # make
    # su
    # make install

    (7)openssl 扩展库安装
    # 直接拷贝如下指令,进行操作
    # ./config –prefix=/usr/local/ssl –openssldir=/usr/local/ssl
    # make
    # make install

    (8)CURL 扩展库安装
    # ./configure –prefix=/usr/local/curl
    # make
    # make install

    //mysql 安装
    ./configure
    –prefix=/usr/local/mysql 指定mysql安装目录
    –localstatedir=/usr/local/mysql/data 指定mysql数据存在目录
    –with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock 指定mysql的sock连接文件存在目录
    –with-client-ldflags=-all-static
    –with-mysqld-ldflags=-all-static
    –with-charset=gb2312 指定mysql数据库字符集

    //直接拷贝如下指令,进行操作
    # ./configure –prefix=/usr/local/mysql –localstatedir=/usr/local/mysql/data –with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock –with-client-ldflags=-all-static –with-mysqld-ldflags=-all-static –with-charset=gb2312

    //apache 安装
    //./configure
    //–prefix=/usr/local/apache 指定apache安装目录
    //–with-mysql=/usr/local/mysql/ 指定mysql数据库目录
    //–with-config-file-path=/usr/local/apache/conf //指定apache配置文件目录
    //–with-ssl=/usr/local/ssl //指定openssl扩展库安装目录
    //–with-mpm=worker 加载MPM多道处理模块
    //–enable-so
    //–enable-cgi
    //–enable-track-vars
    //–enable-mods-shared=all
    //–enable-cache
    //–enable-disk-cache
    //–enable-mem-cache
    //–enable-rewrite
    //–enable-ssl

    //直接拷贝如下指令,进行操作
    # ./configure –prefix=/usr/local/apache2 –with-mysql=/usr/local/mysql/ –with-config-file-path=/usr/local/apache2/conf –with-ssl=/usr/local/ssl –with-mpm=worker –enable-so –enable-cgi –enable-track-vars –enable-mods-shared=all –enable-cache –enable-disk-cache –enable-mem-cache –enable-rewrite –enable-ssl
    # make
    # make install

    //编辑 httpd.conf 文件以调用 PHP 模块。LoadMolude 表达式右边的路径必须指向系统中的 PHP。以上的 make install 命令可能已经完成了这些,但务必要检查。
    对于 PHP 4:
    LoadModule php4_module modules/libphp4.so
    对于 PHP 5:
    LoadModule php5_module modules/libphp5.so

    # chcon /usr/local/apache/modules/libphp5.so -t shlib_t

    //告知 Apache 将特定的扩展名解析成 PHP,例如,让 Apache 将扩展名 .php 解析成 PHP。可以将任何扩展名指定为 PHP,只需添加它们,每一个用空格分隔。例如,要添加 .phtml:
    AddType application/x-httpd-php .php .phtml
    //通常还将 .phps 扩展名设置成显示高亮的 PHP 源文件,可以这样来完成:
    AddType application/x-httpd-php-source .phps

    //启动 Apache 服务器
    # usr/local/apache2/bin/apachectl start

    rpm -ivh /home/download/LinuxSoftware/rpms/flex-2.5.4a-27.i386.rpm

    //PHP 的安装
    ./configure –prefix=/usr/local/php 指定PHP安装目录
    –with-apxs2=/usr/local/apache/bin/apxs 指定apache指令存在目录
    –with-config-file-path=/usr/local/apache/conf 指定配制文件存在目录
    –with-mysql=/usr/local/mysql 指定mysql存在目录
    –with-mysql-sock=/usr/local/mysql/tmp/mysql.sock 指定mysql的sock连接文件存在目录
    –with-gd=/usr/local/gd 指定gd库安装目录
    –with-jpeg-dir=/usr/local/jpeg 指定jpeg库安装目录
    –with-png-dir=/usr/local 指定png安装目录
    –with-tiff-dir=/usr/local/tiff 指定tiff安装目录
    –with-freetype-dir=/usr/local/freetype 指定freetype安装目录
    –with-openssl=/usr/local/ssl 指定ssl安装目录
    –with-pear=/usr/local/php/pear 指定php扩展对象库存在目录
    –with-curl=/usr/local/curl 指定curl安装目录
    –with-iconv=/usr/local/iconv 指定iconv安装目录
    –with-zlib=/usr/local/zlib 指定zlib安装目录
    –with-curlwrappers
    –with-iconv
    –with-mbstring
    –enable-so
    –enable-magic-quotes
    –enable-gd
    –enable-mbstring
    –enable-track-vars
    –enable-force-cgi-redirect
    –enable-ftp
    –enable-wddx

    //直接拷贝如下指令,进行操作
    # ./configure –prefix=/usr/local/php –with-apxs2=/usr/local/apache2/bin/apxs –with-config-file-path=/usr/local/apache2/conf –with-mysql=/usr/local/mysql –with-mysql-sock=/tmp/mysql.sock –with-gd=/usr/local/gd –with-jpeg-dir=/usr/local/jpeg –with-png-dir=/usr/local/libpng –with-tiff-dir=/usr/local/tiff –with-freetype-dir=/usr/local/freetype –with-pear=/usr/local/php/pear –with-curl=/usr/local/curl –with-iconv=/usr/local/iconv –with-zlib=/usr/local/zlib –with-libxml-dir=/usr/local/libxml2/ –with-curlwrappers –with-iconv –with-mbstring –enable-so –enable-magic-quotes –enable-gd –enable-track-vars –enable-force-cgi-redirect –enable-wddx

    [Reply]

Trackback URI | Comments RSS

Leave a Reply