Chinaunix首页 | 论坛 | 博客
  • 博客访问: 391324
  • 博文数量: 89
  • 博客积分: 3176
  • 博客等级: 中校
  • 技术积分: 1205
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-15 10:08
文章分类

全部博文(89)

文章存档

2011年(17)

2010年(19)

2009年(35)

2008年(18)

分类: LINUX

2010-06-23 15:41:33

# 注: 自己早期的一篇手记

########################
#
#    环境:RHEL4
#
########################

===所需软件===
gd(zlib libpng freetype libjpeg)
mysql
curl
httpd
php
eaccelerator


===安装需求===
rpm -q zlib libpng freetype libjpeg gd


===setup_mysql===
useradd mysql
tar zxvf mysql-5.0.41.tar.gz
cd mysql-5.0.41
./configure  --prefix=/usr/local/mysql \
--with-mysqld-user=mysql \
--with-extra-charsets=all \
--with-big-tables \
--with-unix-socket-path=/usr/local/mysql/var/mysql.sock
make
make install
cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
cp /usr/local/mysql/share/mysql/mysql.server /etc/rc.d/init.d/mysqld

# 在/etc/my.cnf中,注释掉 skip-federated

/usr/local/mysql/bin/mysql_install_db # 产生var目录

chown -R root /usr/local/mysql
chown -R mysql /usr/local/mysql/var
chgrp -R mysql /usr/local/mysql


===curl===
tar jxvf curl-7.16.2.tar.bz2
cd curl-7.16.2/
./configure --prefix=/usr/local/curl
[ln -s /usr/lib64/libidn.so /usr/lib/libidn.so]
make
make install


===gd===
tar zxvf gd-2.0.34.tar.gz
cd gd-2.0.34
./configure --prefix=/usr/local/gd
make
make install


===apr&apr-util===
cd $APACHE_SRC_DIR/srclib/apr
./configure --prefix=/usr/local/apr12/
make clean
make
make install

cd $APACHE_SRC_DIR/srclib/apr-util
./configure --prefix=/usr/local/apr12-util/ --with-apr=/usr/local/apr12/
make clean
make
make install


===httpd===
tar zxvf httpd-2.2.4.tar.gz
cd httpd-2.2.4
./configure --prefix=/usr/local/apache2 --enable-so --with-mpm=worker --enable-mods-shared=all --with-apr=/usr/local/apr12 --with-apr-util=/usr/local/apr12-util
make clean
make
make install

#LoadModule处添加 LoadModule php5_module   modules/libphp5.so
#DirectoryIndex处添加 index.php
#在AddType application处添加
#AddType application/x-httpd-php .php .phtml
#AddType applicatoin/x-httpd-php-source .phps


===php===
tar zxvf php-5.2.3.tar.gz
cd php-5.2.3
./configure \
--prefix=/usr/local/php \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-curl=/usr/local/curl \
--with-gd=/usr/local/gd \
--with-mysql-dir=/usr/local/mysql
--enable-mbstring \
--enable-pcntl

make
make install
[cp php.ini-dist /usr/local/php/lib/php.ini]

#修改 /usr/local/php/lib/php.ini
# extension_dir = "./"
#为extension_dir = "/"


===eaccelerator===
tar jxvf eaccelerator-0.9.5.tar.bz2
cd eaccelerator-0.9.5
rpm -q autoconf automake libtool m4
/usr/local/php/bin/phpize
 ./configure --enable-eaccelerator=shared --with-php-config=/usr/local/php/bin/php-config --with-eaccelerator-shared-memory
make
make install
mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator

cat >> /usr/local/php/lib/php.ini << "EOF"
extension="/usr/local/php/lib/php/extensions/no-debug-zts-20060613/eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
EOF


===开机启动===
echo "/usr/local/mysql/bin/mysqld_safe --user=mysql &" >> /etc/rc.d/rc.local
echo "/usr/local/apache2/bin/apachectl start &" >> /etc/rc.d/rc.local









阅读(586) | 评论(0) | 转发(0) |
0

上一篇:history 时间显示

下一篇:ipaclc IP计数器

给主人留下些什么吧!~~