SLES-LAMP配置文档

SLES-LAMP配置文档

1.   安装操作系统

SLES-11-sp1-x86_64,内核版本:2.6.32.12-0.7-default

安装模式:文本安装,无图形界面,编码:en_USUTF-8

2.   安装zlib

tar -jxvf zlib-1.2.5.tar.bz2

cd zlib-1.2.5/

./configure –shared

make

make install

3.   安装openssl

tar -zxvf openssl-1.0.0a.tar.gz

cd openssl-1.0.0a/

./config shared --prefix=/usr/local/ssl

make

make install

ln -s /usr/local/ssl/lib64 lib

4.   安装httpd

tar zxvf httpd-2.2.9.tar.gz

cd http-2.2.9

./configure --prefix=/usr/local/apache --enable-so --enable-rewrite --enable-cgi --enable-expires --enable-headers --enable-deflate --with-mpm=prefork --enable-mods-shared=all

make

make install

5.   安装curl

tar -jxvf curl-7.21.2.tar.bz2

cd curl-7.21.2/

./configure

make

make install

6.   安装freetype

tar -jxvf freetype-2.4.3.tar.bz2

cd freetype-2.4.3/

./configure

make

make install

7.   安装jpeg

tar -zxvf jpegsrc.v8b.tar.gz

cd jpeg-8b/

./configure

make

make install

8.   安装libevent

tar -zxvf libevent-1.4.14b-stable.tar.gz

cd libevent-1.4.14b-stable/

./configure

make

makemake install

9.   安装libmcrypt

tar -jxvf libmcrypt-2.5.8.tar.bz2

cd libmcrypt-2.5.8

./configure

make

make install

10.  安装libpng

tar -jxvf libpng-1.4.4.tar.bz2

cd libpng-1.4.4/

./configure

make

make install

11.  安装gd

tar –jxvf gd-2.0.35.tar.gz

cd gd-2.0.35/

./configure

make

make install

12.  安装libxml2

tar -zxvf libxml2-2.7.7.tar.gz

cd libxml2-2.7.7/

./configure

make

make install

13.  安装mysql

tar -zxvf mysql-5.1.51.tar.gz

cd mysql-5.1.51/

./configure --enable-profiling --enable-local-infile --with-extra-charsets=all --with-big-tables

make

make install

14.  安装PHP

tar -jxvf php-5.2.14.tar.bz2

cd php-5.2.14

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-openssl=shared,/usr/local/ssl --with-zlib=shared --enable-calendar=shared --enable-ftp=shared --with-gd=shared --with-jpeg-dir --with-png-dir --with-freetype-dir --enable-gd-native-ttf --with-gettext=shared --enable-mbstring=shared --with-mcrypt=shared --with-mysql=shared --with-mysqli=shared --with-pdo-mysql=shared --enable-shmop=shared --enable-soap=shared --enable-sockets=shared --enable-zip=shared --enable-zend-multibyte  --with-libevent=shared,/usr/local/lib

make

make install

            cp php.ini-dist /usr/local/php/lib/php.ini

15.  安装memcached

tar -zxvf memcached-1.4.5.tar.gz

cd memcached-1.4.5

./configure --enable-64bit --with-libevent=/usr/local/lib

make

make install

16.  安装libmemcached

tar -zxvf libmemcached-0.44.tar.gz

cd libmemcached-0.44/

./configure –enable-static

make

make install

pear channel-update pear.php.net

pecl channel-update pecl.php.net

pecl install memcache memcached || pecl upgrade memcache memcached

Installing shared extensions:     /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/

修改php.ini

Extension_dir=” /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/”

加入

extension=memcache.so

extension=memcached.so

17.  安装xcache

tar -jxvf xcache-1.3.0.tar.bz2

cd xcache-1.3.0

/usr/local/php/bin/phpize

./configure

make

make install

php.ini加入extension=xcache.so

18.  安装ZendOptimizer

tar -zxvf ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz

cd ZendOptimizer-3.3.9-linux-glibc23-x86_64/

cp -a data/5_2_x_comp/ZendOptimizer.so /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/.

php.ini中加入extension=ZendOptimizer.so

19.  测试php

修改http.conf

httpd.conf里面已经有这行了:LoadModule php5_module   modules/libphp5.so

<IfModule mime_module>下面加上一行:

AddType application/x-httpd-php .php

添加index.php   DirectoryIndex index.php index.html

重启apache,使http.confphp.ini的修改生效

/usr/local/apache/bin/apachectl –k restart

Phpinfo测试页

<?php

phpinfo();

?>

 

你可能感兴趣的:(职场,lamp,64bit,休闲,SLES)