linux中lamp平台搭建,Linux下搭建LAMP环境

#!/bin/bash

# yum -y install curl curl-devel libxml2 libxml2-devel libjpeg libjpeg-devel libpng libpng-devel zlib zlib-devel freetype freetype-devel openldap openldap-devel xmlrpc

if [ `getconf LONG_BIT` == 64 ];then

yum -y install curl.i386 curl-devel.i386 libxml2.i386 libxml2-devel.i386 libjpeg.i386 libjpeg-devel.i386 libpng.i386 libpng-devel.i386 zlib.i386 zlib-devel.i386 freetype.i386 freetype-devel.i386 openldap.i386 openldap-devel.i386 xmlrpc.i386

yum -y install curl.x86_64 curl-devel.x86_64 libxml2.x86_64 libxml2-devel.x86_64 libjpeg.x86_64 libjpeg-devel.x86_64 libpng.x86_64 libpng-devel.x86_64 zlib.x86_64 zlib-devel.x86_64 freetype.x86_64 freetype-devel.x86_64 openldap.x86_64 openldap-devel.x86_64 xmlrpc.x86_64

else

yum -y install curl.x86_64 curl-devel.x86_64 libxml2.x86_64 libxml2-devel.x86_64 libjpeg.x86_64 libjpeg-devel.x86_64 libpng.x86_64 libpng-devel.x86_64 zlib.x86_64 zlib-devel.x86_64 freetype.x86_64 freetype-devel.x86_64 openldap.x86_64 openldap-devel.x86_64 xmlrpc.x86_64

fi

tar zxvf gd-2.0.33.tar.gz

cd gd-2.0.33

./configure--prefix=/usr

make && make install

cd ..

tar zxvf libmcrypt-2.5.8.tar.gz

cd libmcrypt-2.5.8

./configure--prefix=/usr

make && make install

cd libltdl/

./configure--prefix=/usr --enable-ltdl-install

make && make install

cd ../..

tar zxvf mhash-0.9.9.9.tar.gz

cd mhash-0.9.9.9

./configure--prefix=/usr

make && make install

cd ..

tar zxvf freetds-0.64.tar.gz

cd freetds-0.64

./configure--prefix=/usr/local/freetds --enable-msdblib --with-gnu-ld --with-tdsver=8.0

make && make install

cd ..

echo"/usr/local/freetds/lib">> /etc/ld.so.conf.d/freetds.conf

ldconfig -v

tar zxvf php-5.2.6.tar.gz

cd php-5.2.6

if [ `getconf LONG_BIT` == 64 ];then

./configure--prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/php/etc --enable-bcmath --with-curl --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf --with-ldap --enable-mbstring --with-mcrypt --with-mhash --with-mssql=/usr/local/freetds --with-mysql=/usr/local/mysql --enable-pcntl --with-pdo-mysql=/usr/local/mysql --with-pdo-oci=/usr/lib/oracle/10.2.0.4/client64 --enable-soap --enable-sockets --with-xmlrpc

else

./configure--prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/php/etc --enable-bcmath --with-curl --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf --with-ldap --enable-mbstring --with-mcrypt --with-mhash --with-mssql=/usr/local/freetds --with-mysql=/usr/local/mysql --enable-pcntl --with-pdo-mysql=/usr/local/mysql --with-pdo-oci=/usr/lib/oracle/10.2.0.4/client --enable-soap --enable-sockets --with-xmlrpc

fi

make && make install

cd ..

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值