Ubuntu 平台下安装Apache + PHP(RSS + XML + Xslt + GD + cURL + Zlib + png + jpeg+ clibPDF)+ OpenSSl + OpenSSH + MySQL + phpMyAdmin + PostgreSQL + phpPgAdmin + VsFTP + Tomcat(Resin)+ Qmail + WebMail
(http WEB SERVER)
http://www.apache.org
http://apache.justdn.org/httpd/httpd-2.2.3.tar.gz
(java WEB SERVER)
http://tomcat.apache.org/
http://mirror.vmmatrix.net/apache/tomcat/tomcat-5/v5.5.17/bin/apache-tomcat-5.5.17.tar.gz
(apache & tomcat 整合工具)
http://apache.justdn.org/tomcat/tomcat-connectors/jk2/jakarta-tomcat-connectors-jk2-src-current.tar.gz
(php)
http://www.php.net
http://cn.php.net/get/php-4.4.3.tar.gz/from/this/mirror
(为 apache 提供 https 连接服务)
http://www.openssl.org/
http://www.openssl.org/source/openssl-0.9.8b.tar.gz
(提供 FTP 服务)
http://vsftpd.beasts.org/
ftp://vsftpd.beasts.org/users/cevans/vsftpd-2.0.5.tar.gz
(让 php 能够支持 xml、xslt 解析)
http://xmlsoft.org/
ftp://xmlsoft.org/libxml2/libxml2-2.6.26.tar.gz
ftp://xmlsoft.org/libxml2/libxslt-1.1.17.tar.gz
http://easynews.dl.sourceforge.net/sourceforge/expat/expat-2.0.0.tar.gz
http://www.gingerall.org/regdone.html?pkg=http://download-1.gingerall.cz/download/sablot/Sablot-1.0.3.tar.gz
(让 php 支持 cURL 协议,允许你用不同的协议连接和沟通不同的服务器)
http://curl.haxx.se/
http://curl.haxx.se/download/curl-7.15.4.tar.gz
(让 php 支持画图功能)
http://www.boutell.com/gd/
http://www.boutell.com/gd/http/gd-2.0.33.tar.gz
(让 php 支持 freetype,一个流行的字体函数库)
http://www.freetype.org/
http://puzzle.dl.sourceforge.net/sourceforge/freetype/freetype-2.2.1.tar.gz
(让 GD 支持生成 jpeg)
http://www.jpeg.org/
http://www.ijg.org/files/jpegsrc.v6b.tar.gz
(让 GD 支持生成 png)
http://www.libpng.org/
http://surfnet.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.12.tar.bz2
(让 php 提供更多的加密算法)
http://mcrypt.sourceforge.net/
http://ufpr.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.7.tar.gz
(让 php 支持 mhash 哈稀函数库)
http://mhash.sourceforge.net/
http://superb-west.dl.sourceforge.net/sourceforge/mhash/mhash-0.9.7.tar.gz
(让 php 支持 zlib 压缩功能)
http://www.zlib.net/
http://www.zlib.net/zlib-1.2.3.tar.gz
(apache 连接进程限制模块,来限制apache的连接并发数)
http://dominia.org/djao/limitipconn2.html
http://dominia.org/djao/limit/mod_limitipconn-0.22.tar.gz
(用于Apache网站带宽控制,可以根据来源IP,网段来划分带宽,也可以根据网站文件类型来限制带宽)
http://www.ivn.cl/apache/
http://www.ivn.cl/apache/files/source/mod_bw-0.7.tgz
(mod_evasive模块的前身就是mod_dosevasive,防止DDOS攻击)
http://www.zdziarski.com/projects/mod_evasive/
http://www.zdziarski.com/projects/mod_evasive/mod_evasive_1.10.1.tar.gz
(加强apache的安全性,特别是在防sql 注入)
http://www.modsecurity.org/
http://www.modsecurity.org/download/modsecurity-apache_1.9.4.tar.gz
(php 加速器,支持运行 zend 加密的php程序)
http://www.zend.com/
http://downloads.zend.com/optimizer/3.0.1/ZendOptimizer-3.0.1-linux-glibc21-i386.tar.gz
(优化 apache运行,建立MM共享内存库。在这种情况下,它将允许mod_ssl使用一种高效的基于RAM的会话(session)缓存代替基于磁盘的会话缓存。)
http://www.ossp.org/pkg/lib/mm/
ftp://ftp.ossp.org/pkg/lib/mm/mm-1.3.1.tar.gz
(DB SERVER MYSQL )
http://www.mysql.com
(http://dev.mysql.com/downloads/mysql/4.1.html)
http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-max-4.1.21-pc-linux-gnu-i686-glibc23.tar.gz/from/http://mirror.vmmatrix.net/mysql/
(php 语言编写的 mysql web 管理系统)
http://www.phpmyadmin.net/home_page/index.php
http://puzzle.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.8.2.tar.gz
(DB SERVER PGSQL )
http://www.postgresql.org/
(http://www.postgresql.org/ftp/source/)
http://wwwmaster.postgresql.org/download/mirrors-ftp?file=source%2Fv8.1.4%2Fpostgresql-8.1.4.tar.gz
(php 语言编写的 pgsql web 管理系统)
http://phppgadmin.sourceforge.net/index.php
http://jaist.dl.sourceforge.net/sourceforge/phppgadmin/phpPgAdmin-4.0.1.tar.gz
(mail server Qmail)
http://qmail.org/
(ftp://ftp.ntnu.no/pub/unix/mail/qmail/qmail-1.03.tar.gz)
http://www.qmail.org/netqmail-1.05.tar.gz
http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
(WEB mail)
vpopmail
install OS
##### 安装编译环境 #####
sudo apt-get install build-essential
##### 安装服务配置工具 #####
sudo apt-get install rcconf
(系统服务的配置工具,可以不安装)
##### OpenSSH #####
sudo apt-get install openssh
(检测是否已经安装)
ssh -V
(OpenSSH_4.2p1 Debian-7ubuntu3, OpenSSL 0.9.8a 11 Oct 2005)
##### flex(lex) #####
sudo apt-get install flex
(检测是否已经安装)
flex -V
(flex 2.5.31)
##### zlib-devel(很多软件都需要它) #####
sudo apt-get install zlib1g-dev
##### readline-devel(postgresql默认需要它) #####
sudo apt-get install libreadline5-dev
(libreadline5 & libreadline5-common 默认已经安装了)
事先保证你的全部需要安装文件包,
下载保存在 /home/MyDownloads/ 目录下;
其他目录请自行修改。
cd /tmp
for i in `ls /home/MyDownloads/*.gz`;do tar zxvf $i; done;
for i in `ls /home/MyDownloads/*.tar`;do tar zxvf $i; done;
for i in `ls /home/MyDownloads/*.bz2`;do tar jxvf $i; done;
##### OpenSSL #####
cd /tmp/openssl-0.9.8c
./config --prefix=/usr/local/ssl \
--openssldir=/usr/local/ssl \
shared \
zlib
make && sudo make install
sudo ln -s /usr/local/ssl /usr/lib/ssl
##### MySQL #####
(sudo tar zxvf /home/king/Desktop/mysql-max-4.1.21-pc-linux-gnu-i686-glibc23.tar.gz -C /usr/local)
(sudo ln -s /usr/local/mysql-max-4.1.21-pc-linux-gnu-i686-glibc23/ /usr/local/mysql)
sudo mv mysql-max-4.1.21-pc-linux-gnu-i686-glibc23/ /usr/local/mysql
sudo groupadd mysql
sudo useradd -g mysql mysql
cd /usr/local/mysql
sudo scripts/mysql_install_db --user=mysql
sudo chown -R root .
sudo chown -R mysql data
sudo chgrp -R mysql .
sudo cp /usr/local/mysql/support-files/my-medium.cnf /usr/local/mysql/data/my.cnf
sudo support-files/mysql.server start
sudo bin/mysqladmin -u root password 12345678
(这时,你的 mysql 超级用户 root 密码就是 12345678)
#sudo cp support-files/mysql.server /etc/init.d/mysqld
#sudo chkconfig --add mysqld
sudo ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
sudo ln -s /usr/local/mysql/include/mysql /usr/include/mysql
##### PostgreSQL #####
cd /tmp/postgresql-8.1.4
./configure
make
sudo make install
sudo adduser postgres
sudo mkdir /usr/local/pgsql/data
sudo chown postgres /usr/local/pgsql/data
sudo su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test
CREATE USER test ;
ALTER USER test with password '12345678' ;
\q
sudo -u postgres /usr/local/pgsql/bin/psql
ALTER USER "test" CREATEDB CREATEUSER VALID UNTIL 'infinity' ;
\q
##### zlib #####
cd /tmp/zlib-1.2.3
./configure --prefix=/usr/local/zlib
make && sudo make install
##### FreeType #####
cd /tmp/freetype-2.2.1
./configure --prefix=/usr/local/freetype
make && sudo make install
##### LibPNG #####
cd /tmp/libpng-1.2.12
cp scripts/makefile.linux makefile
(./configure --prefix=/usr/local/libpng)
make && sudo make install
##### Jpeg (让GD支持JPEG)#####
cd /tmp/jpeg-6b
sudo mkdir /usr/local/jpeg
sudo mkdir /usr/local/jpeg/bin
sudo mkdir /usr/local/jpeg/lib
sudo mkdir /usr/local/jpeg/include
sudo mkdir /usr/local/jpeg/man
sudo mkdir /usr/local/jpeg/man/man1
./configure --prefix=/usr/local/jpeg --enable-shared --enable-static
make && sudo make install
##### GD Library #####
cd /tmp/gd-2.0.33
./configure --prefix=/usr/local/gd \
--with-jpeg=/usr/local/jpeg \
--with-freetype=/usr/local/freetype \
--with-png \
--with-zlib=/usr/local/zlib
make && sudo make install
##### ClibPDF #####
cd /tmp/ClibPDF-2.02/source
cp Makefile.Linux makefile
make && sudo make install
##### libxml2 #####
cd /tmp/libxml2-2.6.26
./configure --prefix=/usr/local/libxml2 --with-zlib
make && sudo make install
##### libxslt #####
cd /tmp/libxslt-1.1.9
./configure --prefix=/usr/local/libxslt --with-libxml-prefix=/usr/local/libxml2
make && sudo make install
##### curl #####
cd /tmp/curl-7.15.5
sudo mkdir -p /usr/local/curl
./configure --prefix=/usr/local/curl --with-ssl
make && sudo make install
##### libmcrypt (加密扩展--有不少的加密算法)#####
cd /tmp/libmcrypt-2.5.7
./configure --prefix=/usr/local/libmcrypt
make && sudo make install
##### mhash #####
cd /tmp/mhash-0.9.7.1/
./configure --prefix=/usr/local/mhash
make && sudo make install
##### expat #####
cd /tmp/expat-2.0.0
./configure --prefix=/usr/local/expat
make && sudo make install
##### sablot #####
cd /tmp/Sablot-1.0.3
./configure --prefix=/usr/local/sablot --with-expat=/usr/local/expat/
make && sudo make install
**********************************************
现在准备我的网站空间
sudo makedir /home/htdocs
sudo chmod 777 /home/htdocs
vi /home/htdocs/phpinfo.php
<?php
echo "I am KING";
phpinfo();
echo "KING is me";
?>
**********************************************