Chinaunix首页 | 论坛 | 博客
  • 博客访问: 378931
  • 博文数量: 190
  • 博客积分: 50
  • 博客等级: 民兵
  • 技术积分: 125
  • 用 户 组: 普通用户
  • 注册时间: 2013-01-12 14:05
文章分类

全部博文(190)

文章存档

2013年(190)

我的朋友

分类: LINUX

2013-05-14 10:24:49

原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://blog.chinaunix.net/space.php?uid=9419692&do=blog&id=3182658

#!/bin/bash
# BY kerryhu
# QQ:263205768
# MAIL:king_819@163.com
# BLOG:[url]http://kerry.blog.51cto.com[/url]
# Please manual operation yum of before Operation.....
# yum install ntp vim-enhanced gcc gcc-c++ flex bison autoconf \
# automake bzip2-devel ncurses-devel libjpeg-devel libpng-devel \
# libtiff-devel freetype-devel pam-devel kernel netconfig
#########################################
ntpdate time.nist.gov
cd /opt
#########################################
# INSTALL mysql-5.0.27
cd /opt
tar -zxf mysql-5.0.27.tar.gz
cd mysql-5.0.27
./configure --prefix=/usr/local/mysql --sysconfdir=/etc --localstatedir=/var/lib/mysql --with-extra-charsets=gbk
make
make install
groupadd mysql
useradd mysql -d /dev/null -g mysql -s /sbin/nologin
/usr/local/mysql/bin/mysql_install_db
chown -R mysql.mysql /var/lib/mysql
chown -R mysql.mysql /usr/local/mysql/
cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
cp /opt/mysql-5.0.27/support-files/mysql.server /etc/rc.d/init.d/mysqld
chmod 700 /etc/rc.d/init.d/mysqld
/usr/local/mysql/bin/mysqld_safe --user=mysql &
/etc/rc.d/init.d/mysqld start
#########################################
# INSTALL zlib-1.2.3
cd /opt
tar zxvf zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure --prefix=/usr/local/zlib
make
make install
#########################################
# INSTALL openssl
cd /opt
tar zxvf openssl0.9.7g.tar.gz
cd openssl0.9.7g
./config --prefix=/usr/local/openssl
make
make test
make install
#########################################
# INSTALL httpd
cd /opt
tar zxvf httpd-2.0.58.tar.gz
cd httpd-2.0.58
./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd --enable-so --enable-ssl --with-ssl=/usr/local/openssl --enable-track-vars --enable-rewrite
make
make install
echo "/usr/local/apache/bin/apachectl start" >> /etc/rc.d/rc.local
#########################################
# INSTALL libpng-1.2.14
cd /opt
tar zxvf libpng-1.2.14.tar.gz
cd libpng-1.2.14
cp scripts/makefile.linux makefile
make
make install
#########################################
# INSTALL freetype-2.1.10
cd /opt
tar -zvxf freetype-2.1.10.tar.gz
cd freetype-2.1.10
mkdir -p /usr/local/freetype
./configure --prefix=/usr/local/freetype
make;make install
#########################################
# INSTALL jpegsrc.v6b
mkdir -p /usr/local/jpeg6
mkdir -p /usr/local/jpeg6/bin
mkdir -p /usr/local/jpeg6/lib
mkdir -p /usr/local/jpeg6/include
mkdir -p /usr/local/jpeg6/man
mkdir -p /usr/local/jpeg6/man1
mkdir -p /usr/local/jpeg6/man/man1
#安装
cd /opt
tar zxvf jpegsrc.v6b.tar.gz
cd jpegsrc.v6b
./configure --prefix=/usr/local/jpeg6/ --enable-shared --enable-static
make
make install
make install-lib
#########################################
#INSTALL libxml2-2.6.19
cd /opt
tar -zxf libxml2-2.6.19.tar.gz
cd libxml2-2.6.19
mkdir -p /usr/local/libxml2
./configure --prefix=/usr/local/libxml2
make; make install
cp xml2-config /usr/bin
#########################################
# INSTALL GD-2.0.33
cd /opt
tar -zvxf gd-2.0.33.tar.gz
mkdir -p /usr/local/gd2
cd gd-2.0.33
./configure --prefix=/usr/local/gd2 --with-jpeg=/usr/local/jpeg6/ --with-png=/usr/local/lib/ --with-zlib=/usr/local/zlib/ --with-freetype=/usr/local/freetype/
make;make install
############################################
# INSTALL php
cd /opt
tar -zxvf php-5.2.5.tar.gz
mkdir -p /usr/local/php
cd php-5.2.5
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxm-dir=/usr/local/libxml2 --with-png-dir=/usr/local/lib --with-jpeg-dir=/usr/local/jpeg6 --with-zlib=/usr/local/zlib --with-freetype-dir=/usr/local/freetype --with-gd=/usr/local/gd2 --enable-mbstring=all --enable-ftp --with-config-file-path=/usr/local/php --with-pdo-mysql=/usr/local/mysql
make
make install
cp php.ini-dist /usr/local/php/php.ini
#########################################
# INSTALL ZendOptimizer
cd /opt
tar -zxvf ZendOptimizer-3.2.0-linux-glibc21-i386.tar.gz
cd ZendOptimizer-3.2.0-linux-glibc21-i386
./install
echo "LINUX+MYSQL+APACHE2+PHP5+ZEND INSTALL OK"

本文出自 “聆听未来” 博客,请务必保留此出处http://blog.chinaunix.net/space.php?uid=9419692&do=blog&id=3182658

阅读(399) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~