Chinaunix首页 | 论坛 | 博客
  • 博客访问: 75394
  • 博文数量: 32
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 510
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-09 09:12
文章分类

全部博文(32)

文章存档

2011年(1)

2008年(31)

我的朋友
最近访客

分类: LINUX

2008-10-18 10:35:20

1)安装mysql

tar zxvf mysql-5.0.51a.tar.gz
cd mysql-5.0.51a
vi mysql.sh

##############################
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
./configure \
       "--prefix=/usr/local/mysql" \
       "--localstatedir=/data/mysql/data" \
       "--with-comment=Source" \
       "--with-server-suffix=-LinuxTone" \
       "--with-mysqld-user=mysql" \
       "--without-debug" \
       "--with-big-tables" \
       "--with-charset=gbk" \
       "--with-collation=gbk_chinese_ci" \
       "--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
mkdir -p /data/mysql/data
useradd mysql -d /data/mysql -s /sbin/nologin
/usr/local/mysql/bin/mysql_install_db --user=mysql
cd /usr/local/mysql
chown -R root:mysql .
chown -R mysql /data/mysql/data
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
/etc/rc.d/init.d/mysqld start

cd /usr/local/mysql/bin
for i in *; do ln -s /usr/local/mysql/bin/$i /usr/bin/$i; done


######################

sh mysql.sh

2)安装appache

useradd -d /data/www/;chown /data/www/wwwroot

tar zxvf httpd-2.2.8.tar.gz
cd httpd-2.2.8
./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
cd ..
echo '/usr/local/apache2/bin/apachectl start ' >> /etc/rc.local

3)编译安装PHP

tar zxvf php-5.2.5.tar.gz
cd php-5.2.5
./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" \
        "--with-png-dir" \
        "--with-bz2" \
        "--with-freetype-dir" \
        "--with-iconv-dir" \
        "--with-zlib-dir " \
        "--with-openssl=/usr/local/openssl" \
        "--with-mcrypt=/usr/local/libmcrypt" \
"--with-imap-ssl" \
"--with-imap=/usr/local/imap-2007a" \
        "--enable-soap" \
        "--enable-gd-native-ttf" \
        "--enable-ftp" \
        "--enable-mbstring" \
        "--enable-exif" \
        "--disable-ipv6" \
        "--disable-cgi" \
        "--disable-cli"      
make && make install
mkdir /usr/local/php/etc
cp php.ini-dist /usr/local/php/etc/php.ini
cd ..

4)Xcache的安装.

wget
tar xvf xcache-1.2.2.tar.gz
/usr/local/php/bin/phpize ./configure --enable-xcache --enable-xcache-coverager --with-php-config=/usr/local/php/bin/php-config   --enable-inline-optimization --disable-debug

vi /usr/local/php/etc/php.ini
(将以下内容加入php.ini最后面)
###############
[xcache-common]
zend_extension      = /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/xcache.so

[xcache.admin]
xcache.admin.user   = "admin"
;如何生成md5密码: echo -n "password"| md5sum
xcache.admin.pass   = "035d849226a8a10be1a5e0fec1f0f3ce" #密码为52netseek

[xcache]
; Change xcache.size to tune the size of the opcode cache
xcache.size         = 24M
xcache.shm_scheme   = "mmap"
xcache.count        = 4
xcache.slots        = 8K
xcache.ttl          = 0
xcache.gc_interval = 0

; Change xcache.var_size to adjust the size of variable cache
xcache.var_size     = 8M
xcache.var_count    = 1
xcache.var_slots    = 8K
xcache.var_ttl      = 0
xcache.var_maxttl   = 0
xcache.var_gc_interval =     300
xcache.test         = Off
xcache.readonly_protection = On
xcache.mmap_path    = "/tmp/xcache"
xcache.coredump_directory =   ""
xcache.cacher       = On
xcache.stat         = On
xcache.optimizer    = Off

[xcache.coverager]
xcache.coverager    = On
xcache.coveragedump_directory = ""
#####################

5)安装Zend Optimizer

tar zxvf ZendOptimizer-3.3.0a-linux-glibc21-i386.tar.gz
cd ZendOptimizer-3.3.0a-linux-glibc21-i386
./install.sh
安装Zend Optimizer过程的最后不要选择重启Apache

阅读(831) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~