apachemysql安装
在redhat 7.2上,假设所有安装程序包都下在/pub下面,源码包都用红色表示,
假设在telnet或ssh文本界面下进行如下所有操作。
install target=_blank>j2sdk 1.4
下载 j2sdk1.4 的 linux rpm版本 j2sdk-1_4_0-linux-i386-rpm.bin
cd /pub
chmod +x j2sdk-1_4_0-linux-i386-rpm.bin
./j2sdk-1_4_0-linux-i386-rpm.bin
rpm -ivh j2sdk-1_4_0-fcs-linux-i386.rpm
vi /etc/profile 增加如下内容:
java_home=/usr/java/j2sdk1.4.0
export java_home
classpath=/usr/java/j2sdk1.4.0/lib:/usr/java/j2sdk1.4.0/jre/lib
export classpath
path=$path:$java_home/bin:$java_home/jre/bin
export path
重新登录让环境变量生效
install target=_blank>tomcat 4.0
下载tomcat的linux binary版本,以及 mod_webapp.so
tar zxvf jakarta-tomcat-4.0.3.tar.gz
做 /pub/jakarta-tomcat-4.0.3/conf 目录下面server.xml中的其他相关配置
(暂时不做也可以)
/pub/jakarta-tomcat-4.0.3/bin/startup.sh
启动 tomcat 服务,并且将它加到系统的启动程序中/etc/rc.d/rc.local
(用/pub/jakarta-tomcat-4.0.3/bin/shutdown.sh
停止tomcat )
install target=_blank>mysql
groupadd mysql
useradd -g mysql mysql
tar zxvf mysql-3.23.49.tar.gz
(or, gunzip
cd mysql-3.23.49
./configure --prefix=/usr/local/mysql
make
make install
scripts/mysql_install_db
chown -r root /usr/local/mysql
chown -r mysql /usr/local/mysql/var
chgrp -r mysql /usr/local/mysql
cp support-files/my-medium.cnf /etc/my.cnf
cp scripts /usr/local/mysql -r
cp support-files /usr/local/mysql -r
cd /usr/local/mysql
chmod +x support-files/mysql.server
cp support-files/mysql.server /etc/rc.d/init.d/mysqld
同时要设置 /etc/rc.d/init.d/mysqld 开机自动运行:
ln -s /etc/rc.d/init.d/mysqld /etc/rc.d/rc3.d/s99mysqld
/etc/rc.d/init.d/mysqld start
启动 mysql
/usr/local/mysql/bin/mysqladmin -u root password
ew-password
设置 mysql root 口令
install target=_blank>openssl
cd /pub
tar zxvf openssl-0.9.6b.tar.gz
cd openssl-0.9.6b
./config
make
make test
make install
install target=_blank>mod_ssl
cd /pub
tar zxvf mod_ssl-2.8.8-1.3.24.tar.gz
tar zxvf apache_1.3.24.tar.gz
(from www.apache.org)
cd mod_ssl-2.8.8-1.3.24
./configure --with-apache=../apache_1.3.24
cd ../apache_1.3.24
./configure --prefix=/www
install href=ftp://ftp.cac.washington.edu/imap/ target=_blank>imap support
cd /pub
tar zxvf imap-2001a.tar.z
cd imap-2001a
make slx (for linux)
修改 /etc/services 注册端口,修改 /etc/inetd.conf 开启服务
cp c-client/c-client.a /usr/local/lib/libc-client.a
cp c-client/rfc822.h /usr/local/include
cp c-client/mail.h /usr/local/include
cp c-client/linkage.h /usr/local/include
install target=_blank>curl support
cd /pub
tar zxvf curl-7.9.6.tar.gz
cd curl-7.9.6
./configure --with-ssl --with-prefix=/usr/local/curl
make
make test
make install
install target=_blank>gd support
install target=_blank>zlib support
cd /pub
tar zxvf zlib-1.1.3.tar.gz
cd zlib-1.1.3
./configure
make
make test
make install
install target=_blank>libpng support
cd /pub
tar zxvf libpng-1.0.10.tar.gz
cd libpng-1.0.10
cp scripts/makefile.linux makefile
vi makefile
修改其中
zliblib=/usr/local/lib
zlibinc=/usr/local/include
参数
make test
make install
install jpeg-6b
support
cd /pub
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure
make
make test
make install
make install-lib
install freetype
2.0.1 support
cd /pub
tar zxvf freetype-2.0.1.tar.gz
cd freetype-2.0.1
make setup
make
make install
install gd
support
cd /pub
tar zxvf gd-1.8.4.tar.gz
cd gd-1.8.4
vi makefile
修改其中
cflags=-o -dhave_libpng -dhave_libjpeg -dhave_libfreetype
libs=-lgd -lpng -lz -ljpeg -lfreetype -lm
includedirs=-i. -i/usr/local/include/freetype2 -i/usr/include/x11
-i/usr/x11r6/include/x11 -i/usr/local/include
make
make install
install target=_blank>php
cd /pub
tar zxvf php-4.2.0.tar.gz
cd php-4.2.0
cflags=-o2 -i/usr/local/ssl/include
./configure --with-apache=../apache_1.3.24
--enable-memory-limit=yes
--with-config-file-path=/usr/local/lib --with-imap --enable-ftp
--with-mysql=/usr/local/mysql
--enable-sockets --enable-debug=no --enable-track-vars
--with-gd=/usr/local
--with-jpeg-dir=/usr/local --with-png-dir=/usr/local
--with-curl=/usr/local/curl
--with-zlib --with-ttf --with-java
make
make install
cp php.ini-dist /usr/local/lib/php.ini
修改 /usr/local/lib/php.ini
install target=_blank>zend optimizer (这步可在最后完成)
cd /pub
tar zxvf zendoptimizer-1[1].2.0-php_4.1.0-linux_glibc21-i386.tar.gz
cd zendoptimizer-1.2.0-php_4.1.0-linux_glibc21-i386
mkdir /usr/local/zend
mkdir /usr/local/zend/lib
./install.sh
install target=_blank>zend cache (用在等于或低于 php 4.0.5版本,要注册码,这步可在最后完成)
cd /pub
tar zxvf zendcache-1[1].1.0b-php_4.0.5-linux_glibc2.1-i386.tar.gz
cd zendcache-1.1.0b-php_4.0.5-linux_glibc2.1-i386
cp data/zendcache.so /usr/local/zend/lib
( cp zend_cache.dat /usr/local/zend ) // to register
license
add the following lines to your php.ini file;
do not add any extra spaces or tabs; must after zend optimizer configuration:
zend_cache.use_cwd=1
zend_cache.memory_consumption=16 ; 16mb
zend_cache.validate_timestamps=1
zend_extension=/usr/local/zend/lib/zendcache.so
install zend
accelerator (用在php 4.0.5以上php 4.2.0以下,要注册码哦,这步可在最后完成)
cd /pub
tar xvf zendaccelerator-2.0.0-php_4.0.5-linux_glibc21-i386.tar
cd zendaccelerator-2.0.0-php_4.0.5-linux_glibc21-i386
./install.sh
install