编译安装LAMP
2011-03-15 15:33:06| 分类:
Shell
| 标签:
|举报
|字号大中小 订阅
#!/bin/sh
# set running services
chkconfig --del microcode_ctl
chkconfig --del kudzu
chkconfig --del openibd
chkconfig --del cpuspeed
chkconfig --del iptables
chkconfig --del isdn
chkconfig --del pcmcia
chkconfig --del irqbalance
chkconfig --del portmap
chkconfig --del nfslock
chkconfig --del mdmonitor
chkconfig --del rpcidmapd
chkconfig --del rpcgssd
chkconfig --del netfs
chkconfig --del lm_sensors
chkconfig --del autofs
chkconfig --del smartd
chkconfig --del cups
chkconfig --del rawdevices
chkconfig --del xinetd
chkconfig --del sendmail
chkconfig --del gpm
chkconfig --del xfs
chkconfig --del anacron
chkconfig --del atd
chkconfig --del messagebus
chkconfig --del rhnsd
chkconfig --del haldaemon
RPMS="
curl-7.12.1-8.rhel4.i386.rpm
gd-2.0.28-4.4E.1.i386.rpm
libidn-0.5.6-1.i386.rpm
libtool-libs-1.5.6-4.EL4.1.i386.rpm
vim-common-6.3.046-0.40E.7.i386.rpm
vim-enhanced-6.3.046-0.40E.7.i386.rpm
glibc-kernheaders-2.4-9.1.98.EL.i386.rpm
glibc-headers-2.3.4-2.25.i386.rpm
glib-devel-1.2.10-15.i386.rpm
cpp-3.4.6-3.i386.rpm
glibc-devel-2.3.4-2.25.i386.rpm
gcc-3.4.6-3.i386.rpm
apr-devel-0.9.4-24.5.i386.rpm
apr-util-0.9.4-21.i386.rpm
db4-devel-4.2.52-7.1.i386.rpm
expat-devel-1.95.7-4.i386.rpm
cyrus-sasl-devel-2.1.19-5.EL4.i386.rpm
openldap-devel-2.2.13-6.4E.i386.rpm
apr-0.9.4-24.5.i386.rpm
apr-util-devel-0.9.4-21.i386.rpm
pcre-devel-4.5-3.2.RHEL4.i386.rpm
libxml2-2.6.16-6.i386.rpm
zlib-devel-1.2.1.2-1.2.i386.rpm
libxml2-devel-2.6.16-6.i386.rpm
pkgconfig-0.15.0-3.i386.rpm
libidn-devel-0.5.6-1.i386.rpm
e2fsprogs-devel-1.35-12.4.EL4.i386.rpm
krb5-devel-1.3.4-27.i386.rpm
openssl-devel-0.9.7a-43.10.i386.rpm
curl-devel-7.12.1-8.rhel4.i386.rpm
libpng-devel-1.2.7-1.el4.2.i386.rpm
libjpeg-devel-6b-33.i386.rpm
fontconfig-devel-2.2.3-7.i386.rpm
freetype-devel-2.1.9-1.i386.rpm
xorg-x11-devel-6.8.2-1.EL.13.36.i386.rpm
gd-devel-2.0.28-4.4E.1.i386.rpm
mysql-devel-4.1.20-1.RHEL4.1.i386.rpm
mysql-4.1.20-1.RHEL4.1.i386.rpm
perl-DBD-MySQL-2.9004-3.1.i386.rpm
perl-DBI-1.40-8.i386.rpm
mysql-server-4.1.20-1.RHEL4.1.i386.rpm
libstdc++-devel-3.4.6-3.i386.rpm
gcc-c++-3.4.6-3.i386.rpm
ntp-4.2.0.a.20040617-4.EL4.1.i386.rpm
"
for r in $RPMS
do
#fetchfile $r
echo -n installing $r
rpm -i --quiet -f --nodeps $r > /dev/null 2>/dev/null
echo " OK"
done
HTTPFILE="httpd-2.2.8.tar.gz"
tar -zvxf $HTTPFILE
cd httpd-2.2.8
'./configure' \
'--prefix=/usr/local/apache' \
'--enable-so'
make
make install
cd ~/rht4u4up/updates
groupadd mysql
useradd -g mysql mysql
MYSQLFILE="mysql-5.1.24-rc.tar.gz"
tar -zvxf $MYSQLFILE
cd mysql-5.1.24-rc
'./configure' \
'--prefix=/usr/local/mysql' \
'--with-charset=utf8' \
'--with-extra-charsets=latin1,gbk,gb2312,ascii,big5'
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
chown -R mysql .
chgrp -R mysql .
bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql var
cd ~/rht4u4up/updates
PHPFILE="php-5.2.3.tar.bz2"
tar xfj $PHPFILE
cd php-5.2.3
'./configure' \
'--with-config-file-path=/etc' \
'--with-mysql=/usr/local/mysql' \
'--with-apxs2=/usr/local/apache/bin/apxs' \
'--with-libxml-dir=/usr/lib/' \
'--with-zlib-dir=/usr/local/zlib/' \
'--with-gd=/usr' \
'--enable-gd-native-ttf' \
'--with-freetype=/usr' \
'--with-ttf=/usr' \
'--with-freetype2=/usr' \
'--with-png=/usr' \
'--with-gettext=/usr' \
'--with-libpng=/usr' \
'--with-libjpeg=/usr' \
'--with-freetype-dir=/usr' \
'--with-png-dir=/usr' \
'--with-jpeg-dir=/usr' \
'--with-dom=/usr' \
'--with-curl=/usr' \
'--with-iconv' \
'--enable-debug=no' \
'--enable-sockets'
make
make install
评论这张
转发至微博
转发至微博
评论