Chinaunix首页 | 论坛 | 博客
  • 博客访问: 211274
  • 博文数量: 26
  • 博客积分: 2060
  • 博客等级: 大尉
  • 技术积分: 394
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-02 21:43
文章分类

全部博文(26)

文章存档

2011年(1)

2010年(2)

2009年(23)

我的朋友

分类: 系统运维

2009-04-20 21:19:52

#########################  GD 安装  #########################
#检测rpm包安装情况,如果没有devel包则安装即可
rpm -qa|grep libjpeg-devel
rpm -qa|grep libpng-devel
rpm -qa|grep freetype-devel
rpm -qa|grep Fontconfig-devel
rpm -qa|grep libXpm-devel
tar xzvf gd-2.0.35.tar.gz
cd gd-2.0.35
./configure --prefix=/usr/local/gd/
make
make install

#########################  MySql安装  #########################
cd
groupadd mysql
useradd -g mysql mysql
tar -xzvf mysql-5.0.67-linux-i686.tar.gz
mv mysql-5.0.67-linux-i686 /usr/local/mysql/
cd /usr/local/mysql/
chown -R mysql .
chgrp -R mysql .
scripts/mysql_install_db --user=mysql
chown -R root .
chown -R mysql data
mkdir /var/run/mysqld
touch /var/run/mysqld/mysqld.pid
support-files/mysql.server start
bin/mysqladmin -u root password passwd
进入mysql,开启远程访问
grant all PRIVILEGES on *.* to root@'%' identified by 'passwd';
退出MySQL
support-files/mysql.server stop
ln -s /usr/local/mysql/bin/mysql /usr/local/sbin/mysql
ln -s /usr/local/mysql/support-files/mysql.server /usr/local/sbin/mysqld

####################   Apache 安装     ########################
cd
tar -xzvf httpd-2.2.9.tar.gz
cd httpd-2.2.9
./configure --prefix=/usr/local/httpd/
make
make install
ln -s /usr/local/httpd/bin/apachectl /usr/local/sbin/httpd

#####################    PHP安装配置       ##########################
cd
tar xzvf php-5.2.6.tar.gz
cd php-5.2.6
./configure --prefix=/usr/local/php/ --with-apxs2=/usr/local/httpd/bin/apxs --with-mysql=/usr/local/mysql/ --with-gd=/usr/local/gd/ --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-ttf --with-freetype-dir --enable-gd-native-ttf --enable-module=so
make
make install
cp php.ini-dist /usr/local/php/lib/php.ini
ln -s /usr/local/php/lib/php.ini /usr/local/lib/php.ini

#########################    环境配置    #########################
vi /usr/local/php/lib/php.ini
修改
register_globals=On
:wq
vi /usr/local/httpd/conf/httpd.conf
添加
  LoadModule php5_module        modules/libphp5.so
  #AddModule mod_php5.c
  AddType application/x-httpd-php .php
  AddType application/x-httpd-php-source .phps
修改

    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    #Deny from all
    Allow from all


    DirectoryIndex index.html index.php

:wq
vi /etc/rc.d/rc.local
   添加:
/usr/local/mysql/support-files/mysql.server start
/usr/local/httpd/bin/apachectl start
:wq

#########################  END  ###########################

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