Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1130680
  • 博文数量: 221
  • 博客积分: 10152
  • 博客等级: 上将
  • 技术积分: 1518
  • 用 户 组: 普通用户
  • 注册时间: 2005-07-22 10:42
文章分类

全部博文(221)

文章存档

2018年(1)

2015年(6)

2014年(3)

2013年(4)

2012年(1)

2011年(5)

2010年(14)

2009年(10)

2008年(28)

2007年(33)

2006年(114)

2005年(2)

我的朋友

分类: LINUX

2005-07-22 10:42:09


#!/bin/sh
APACHE_VER="2.0.54"
PHP_VER="4.4.0"
MYSQL_VER="4.0.25"
HTTPD="/httpd"
MYSQL="/mysql"
#SRC_ROOT="/root/comp/test"

if [ -e mysql-${MYSQL_VER}.tar.bz2 ]; then
echo "mysql-${MYSQL_VER}.tar.bz2"
tar -jxf mysql-${MYSQL_VER}.tar.bz2
else
echo "mysql-${MYSQL_VER}.tar.gz"
tar -zxf mysql-${MYSQL_VER}.tar.gz
fi
cd mysql-${MYSQL_VER}
pwd
./configure --prefix=${MYSQL}
--with-charset=gb2312 \
--without-bench \
--without-docs \
--with-mysqld-user=mysqld \
CFLAGS=-DUSE_OLD_FUNCTIONS \
--with-pthread 2>&1 >>test.log

make 2>&1 >>test.log
make install 2>&1 >>test.log
cp support-files/my-medium.cnf /etc/my.cnf
cp support-files/mysql.server /etc/rc.d/mysql.server
cd ${MYSQL}
bin/mysql_install_db --user=mysqld
chown -R root  .
chown -R mysqld var
chgrp -R mysqld .
bin/mysqld_safe --user=mysqld &
bin/mysqladmin -u root password 'Passwd'
chmod +x /etc/rc.d/mysql.server
echo "/etc/rc.d/mysql.server start" >>/etc/rc.d/rc.local
echo "skip-networking " >> /etc/my.cnf
/etc/rc.d/mysql.server restart
cp ${MYSQL}/lib/mysql/lib* /usr/lib
ldconfig -v


cd -
cd ..


if [ -e httpd-${APACHE_VER}.tar.bz2 ]; then
pwd
echo "httpd-${APACHE_VER}.tar.bz2"
tar -jxf httpd-${APACHE_VER}.tar.bz2
else
pwd
echo "httpd-${APACHE_VER}.tar.gz"
tar -zxf httpd-${APACHE_VER}.tar.gz
fi
cd httpd-${APACHE_VER}
pwd
./configure --prefix=/${HTTPD}
--enable-example \
--enable-log-forensic \
--enable-logio \
--enable-mime-magic \
--enable-cern-meta \
--enable-expires \
--enable-headers \
--enable-usertrack \
--enable-unique-id \
--enable-ssl \
--enable-static-htpasswd \
--enable-static-htdigest \
--enable-static-rotatelogs \
--enable-static-ab \
--enable-static-checkgid \
--enable-http \
--disable-status \
--enable-cgi \
--enable-cgid \
--disable-dir \
--enable-rewrite \
--with-mpm=worker \
--enable-module=so 2>&1 >>make.log

make 2>&1 >>make.log
make install 2>&1 >>make.log


cd ..
if [ -e php-${PHP_VER}.tar.bz2 ];then
echo "php-${PHP_VER}.tar.bz2"
tar -jxf php-${PHP_VER}.tar.bz2
else
echo "php-${PHP_VER}.tar.gz"
tar -zxf php-${PHP_VER}.tar.gz
fi
cd php-${PHP_VER}

pwd
./configure --with-apxs2=${HTTPD}/bin/apxs --with-mysql=${MYSQL} 2>&1 >>make.log

make 2>&1 >>make.log
make install 2>&1 >>make.log
cp php.ini-dist /usr/local/lib/php.ini
echo "LoadModule php4_module libexec/libphp4.so" >> ${HTTPD}/conf/httpd.conf
echo "AddType application/x-httpd-php .php .phtml " >> ${HTTPD}/conf/httpd.conf
echo " " > ${HTTPD}/htdocs/index.php
${HTTPD}/bin/apachectl start


阅读(1029) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:IPTABLES基本例子

给主人留下些什么吧!~~