目前正在测试基于centos的定制系统结合LAMP+zend支持的源码编译脚本
现在将脚本放上
yum -y 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
(1) GD2
cd /usr/local/src
wget
http://www.libgd.org/releases/oldreleases/gd-2.0.34.tar.gztar xzvf gd-2.0.34.tar.gz
cd gd-2.0.34
./configure --prefix=/usr/local/gd2
make
make install
(2) LibXML2
cd /usr/local/src
wget
http://www.imagemagick.org/download/delegates/libxml2-2.6.29.tar.gztar xzvf libxml2-2.6.29.tar.gz
cd libxml2-2.6.29
./configure --prefix=/usr/local/libxml2
make
make install
(3) LibMcrypt
cd /usr/local/src
wget
http://ftp.devil-linux.org/pub/devel/sources/1.2/libmcrypt-2.5.8.tar.bz2tar xjvf libmcrypt-2.5.8.tar.bz2
cd libmcrypt-2.5.8
./configure --prefix=/usr/local/libmcrypt
make
make install
(4) Apache 日志截断程序
cd /usr/local/src
wget
http://cronolog.org/download/cronolog-1.6.2.tar.gztar xzvf cronolog-1.6.2.tar.gz
cd cronolog-1.6.2
./configure --prefix=/usr/local/cronolog
make
make install
8.升级OpenSSL和OpenSSH
cd /usr/local/src
wget
http://www.openssl.org/source/openssl-0.9.8e.tar.gzwget
http://mirror.mcs.anl.gov/openssh/portable/openssh-4.6p1.tar.gztar xzvf openssl-0.9.8e.tar.gz
cd openssl-0.9.8e
./config --prefix=/usr/local/openssl
make
make test
make install
cd /usr/local/src
tar xzvf openssh-4.6p1.tar.gz
cd openssh-4.6p1
./configure --prefix=/usr --with-pam --with-zlib --sysconfdir=/etc/ssh --with-ssl-dir=/usr/local/openssl --with-md5-passwords
make
make install
三、编译安装L.A.M.P环境
1. 下载软件
cd /usr/local/src
wget
http://archive.apache.org/dist/httpd/httpd-2.2.4.tar.bz2wget
http://mirror.provenscaling.com/mysql/community/source/5.0/mysql-5.0.27.tar.gzwget
http://museum.php.net/php5/php-5.2.3.tar.bz2wget
http://files.directadmin.com/services/customapache/ZendOptimizer-3.3.0-linux-glibc21-i386.tar.gz2. 编译安装MySQL
tar xzvf mysql-5.0.27.tar.gz
cd mysql-5.0.27
./configure --prefix=/usr/local/mysql --localstatedir=/var/lib/mysql --with-comment=Source --with-server-suffix=-Comsenz --with-mysqld-user=mysql --without-debug --with-big-tables --with-charset=utf8 --with-collation=utf8 --with-extra-charsets=all --with-pthread --enable-static --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --without-isam --without-innodb --without-ndb-debug
./configure --prefix=/usr/local/mysql --localstatedir=/var/lib/mysql --with-comment=Source --with-server-suffix=-Comsenz --with-mysqld-user=mysql --without-debug --with-big-tables --with-charset=utf8 --with-extra-charsets=all --with-pthread --enable-static --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --without-isam --without-innodb --without-ndb-debug
make
make install
useradd mysql
cd /usr/local/mysql
bin/mysql_install_db --user=mysql
chown -R root:mysql .
chown -R mysql /var/lib/mysql
cp share/mysql/my-huge.cnf /etc/my.cnf
cp share/mysql/mysql.server /etc/rc.d/init.d/mysqld
chmod 755 /etc/rc.d/init.d/mysqld
chkconfig --add mysqld
chkconfig --level 3 mysqld on
/etc/rc.d/init.d/mysqld start
bin/mysqladmin -u root password '1234'
3. 编译安装Apache
cd /usr/local/src
tar xjvf httpd-2.2.4.tar.bz2
cd httpd-2.2.4
./configure --prefix=/usr/local/apache2 --with-included-apr --enable-so --enable-deflate=shared --enable-expires=shared --enable-rewrite=shared --enable-static-support --disable-userdir
make
make install
echo '/usr/local/apache2/bin/apachectl start ' >> /etc/rc.local
4. 编译安装PHP
cd /usr/local/src
tar xjvf php-5.2.3.tar.bz2
cd php-5.2.3
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-libxml-dir=/usr/local/libxml2 --with-gd=/usr/local/gd2 --with-jpeg-dir=/usr --with-png-dir=/usr --with-bz2 --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-openssl=/usr/local/openssl --with-mcrypt=/usr/local/libmcrypt --enable-soap --enable-gd-native-ttf --enable-memory-limit --enable-ftp --enable-mbstring --enable-exif --disable-ipv6 --disable-cgi --disable-cli
make
make install
mkdir -p /usr/local/php/etc
cp php.ini-dist /usr/local/php/etc/php.ini
5. 安装Zend Optimizer
cd /usr/local/src
tar -xvf ZendOptimizer-3.3.0-linux-glibc21-i386.tar.gz
cd ZendOptimizer-3.3.0-linux-glibc21-i386
./install.sh
安装Zend Optimizer过程的最后不要选择重启Apache。
wget
http://download2.comsenz.com/UCenter/1.5.0/UCenter_1.5.0_SC_UTF8.zipcd /usr/local/src
unzip UCenter_1.5.0_SC_UTF8.zip -d ucenter
cd ucenter
mv upload /usr/local/apache2/htdocs/uc
cd /usr/local/apache2/htdocs/uc
chmod -R 777 data/
cd /usr/local/src/
wget
http://download2.comsenz.com/UCenter_Home/1.5/UCenter_Home_1.5_SC_UTF8.zipunzip UCenter_Home_1.5_SC_UTF8.zip -d ucenter_home
cd ucenter_home
mv upload/ /usr/local/apache2/htdocs/uchome
cd /usr/local/apache2/htdocs/uchome
mv config.new.php config.php
chmod 777 config.php
chmod -R 777 ./attachment/
chmod -R 777 ./data/
chmod -R 777 ./uc_client/data/
cd /usr/local/src/
wget
http://download2.comsenz.com/Discuz/7.0.0/Discuz_7.0.0_SC_UTF8.zipunzip Discuz_7.0.0_SC_UTF8.zip -d discuz
cd discuz/
mv upload/ /usr/local/apache2/htdocs/bbs
cd /usr/local/apache2/htdocs/bbs/
chmod -R 777 ./config.inc.php
chmod -R 777 ./attachments
chmod -R 777 ./forumdata
chmod -R 777 ./forumdata/cache
chmod -R 777 ./forumdata/templates
chmod -R 777 ./forumdata/threadcaches
chmod -R 777 ./forumdata/logs
chmod -R 777 ./uc_client/data/cache
cd /usr/local/src/
wget
http://download2.comsenz.com/SupeSite/7.0/SupeSite7.0_SC_UTF8.zipunzip SupeSite7.0_SC_UTF8.zip -d supesite
cd supesite/
mv upload/ /usr/local/apache2/htdocs/space
cd /usr/local/apache2/htdocs/space
mv config.new.php config.php
chmod 777 config.php
chmod -R 777 ./attachments/
chmod -R 777 ./cache/
chmod -R 777 ./channel/
chmod -R 777 ./html/
chmod -R 777 ./log/
chmod -R 777 ./styles/
chmod -R 777 ./model/
chmod -R 777 ./data/
chmod -R 777 ./uc_client/data/
先确认以下目录或文件属性为 (777) 可写模式。
chmod -R 777 attachment
chmod -R 777 data
chmod -R 777 attachment/cn_img
chmod -R 777 data/bbscache
chmod -R 777 attachment/photo
chmod -R 777 data/groupdb
chmod -R 777 attachment/thumb
chmod -R 777 data/guestcache
chmod -R 777 attachment/upload
chmod -R 777 data/style
chmod -R 777 attachment/mini
chmod -R 777 data/tmp
chmod -R 777 htm_data
chmod -R 777 data/tplcache
必要的可以到
http://www.linuxha.cn/html/webcluster/2009/0601/239.html这里参考