码迷,mamicode.com
首页 > 其他好文 > 详细

lamp一键安装脚本

时间:2015-11-06 23:43:06      阅读:412      评论:0      收藏:0      [点我收藏+]

标签:lamp apache mysql php memcache

#!/bin/bash

##cp -r /usr/local/src/mysql-5.0.41-linux-i686-glibc23 /usr/local/mysql

cp -r /usr/local/src/mysql_x86_64 /usr/local/mysql

sleep 5

cd /usr/local/src

tar xvzf freetype-2.1.9.tar.gz

cd /usr/local/src/freetype-2.1.9

./configure

make && make install

sleep 5 

cd /usr/local/src

tar xvzf libpng-1.2.8-config.tar.gz

cd /usr/local/src/libpng-1.2.8-config

cp scripts/makefile.linux Makefile

make && make install

sleep 5

cd /usr/local/src 

tar xvzf jpegsrc.v6b.tar.gz

\cp /usr/share/libtool/config.* /usr/local/src/jpeg-6b/

mkdir -p /usr/local/man/man1

cd /usr/local/src/jpeg-6b

./configure --prefix=/usr/local --enable-static --enable-shared

make && make install

sleep 5

cd /usr/local/src

tar xvfj gd-2.0.34.tar.bz2

cd /usr/local/src/gd-2.0.34

./configure --prefix=/usr/local --with-jpeg=/usr/local --with-png=/usr/local

make && make install

sleep 5

cd /usr/local/src

tar xvzf cronolog-1.6.2.tar.gz

cd /usr/local/src/cronolog-1.6.2

./configure

make && make install

sleep 10

cd /usr/local/src

tar xvzf libmcrypt-2.5.7.tar.gz

cd /usr/local/src/libmcrypt-2.5.7

./configure

make && make install

sleep 5

cd /usr/local/src

tar jxvf mhash-0.9.9.tar.bz2

cd /usr/local/src/mhash-0.9.9

./configure

make && make install

sleep 5

cd /usr/local/src

tar zxvf httpd-2.2.21.tar.gz

cd /usr/local/src/httpd-2.2.21

./configure --prefix=/usr/local/apache2 --with-mpm=prefork --enable-deflate --disable-auth --disable-autoindex --disable-status --disable-asis --disable-cgi --disable-actions --disable-userdir --enable-so --enable-headers --enable-rewrite --enable-expires

make && make install

sleep 10

cd /usr/local/src

tar zxvf mod_evasive_1.10.1.tar.tar

cd mod_evasive

/usr/local/apache2/bin/apxs -cia mod_evasive20.c

mkdir -p /var/log/mod_evasive

chown nobody:nobody /var/log/mod_evasive

sleep 5

cd /usr/local/src

tar zxvf php-5.2.17.tar.gz

cd php-5.2.17

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-zlib --with-xml --enable-sockets --with-zlib-dir --with-gd --enable-gd-native-ttf --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-ttf --with-freetype-dir=/usr/local --with-iconv --with-curl --with-gettext --enable-trans-id --enable-ftp --enable-mbstring --with-mcrypt --with-mhash --enable-bcmath --enable-soap

make && make install

sleep 5

\cp /usr/local/src/php-5.2.17/php.ini-dist /usr/local/php/etc/php.ini

ln -s /usr/local/php/etc/php.ini /etc

touch /var/log/php_errorlog.dat

chown nobody:nobody /var/log/php_errorlog.dat

sleep 10

cd /usr/local/src

tar jxvf eaccelerator-0.9.5.1.tar.tar

cd eaccelerator-0.9.5.1

/usr/local/php/bin/phpize

./configure --enable-eaccelerator=shared --with-php-config=/usr/local/php/bin/php-config

make && make install

mkdir -p /tmp/eaccelerator

chmod 777 /tmp/eaccelerator

sleep 10

cd /usr/local/src

tar vxzf memcache-2.1.2.tgz  

cd memcache-2.1.2

/usr/local/php/bin/phpize

./configure --enable-memcache --with-php-config=/usr/local/php/bin/php-config --with-zlib-dir

make && make install

sleep 2

cd /usr/local/src

tar zxvf mongodb-mongo-php-driver-1.1.4-0-g8684b8a.tar.gz

cd mongodb-mongo-php-driver-4e3a432

/usr/local/php/bin/phpize

./configure --enable-mongo --with-php-config=/usr/local/php/bin/php-config

make && make install

##\cp /usr/local/src/memcache.so_x86  /usr/local/php/lib/php/extensions/no-debug-non-zts-20020429/memcache.so

#\cp /usr/local/src/memcache.so_x86_64  /usr/local/php/lib/php/extensions/no-debug-non-zts-20020429/memcache.so

#sleep 5

本文出自 “zhangdh开放空间” 博客,请务必保留此出处http://linuxblind.blog.51cto.com/7616603/1710438

lamp一键安装脚本

标签:lamp apache mysql php memcache

原文地址:http://linuxblind.blog.51cto.com/7616603/1710438

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!