大漠驼铃

置身浩瀚的沙漠,方向最为重要,希望此blog能向大漠驼铃一样,给我方向和指引。
Java,Php,Shell,Python,服务器运维,大数据,SEO, 网站开发、运维,云服务技术支持,IM服务供应商, FreeSwitch搭建,技术支持等. 技术讨论QQ群:428622099
随笔 - 238, 文章 - 3, 评论 - 117, 引用 - 0
数据加载中……

Linux 下配置 apache+mysql+php

1所需软件
 httpd-2.2.11.tar.gz
 mysql-5.0.18.tar.gz  
 php-5.2.9.tar.gz 
apr-1.3.3.tar.gz
apr-util-1.3.4.tar.gz
libxml   google搜索一下吧
2安装

2.1安装apache
安装apr
#cd srclib/apr
#./configure --prefix=/usr/local/apr
#make
#make install

再安装apr-util
#cd srclib/apr-util
#./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
#make
#make install

做完这些准备工作后,开始apache的安装

./configure --prefix=/usr/local/server/apache2.2  --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/bin

make

make install

2.2安装mysql

     shell> groupadd mysql
     shell> useradd -g mysql mysql
     shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
     shell> cd mysql-VERSION
     shell> ./configure --prefix=/usr/local/mysql
     shell> make
     shell> make install
     shell> cp support-files/my-medium.cnf /etc/my.cnf
     shell> cd /usr/local/mysql
     shell> bin/mysql_install_db --user=mysql
     shell> chown -R root  .
     shell> chown -R mysql var
     shell> chgrp -R mysql .
     shell> bin/mysqld_safe --user=mysql &


这样安装的mysql不知道gb2312,gbk变量
./configure --prefix=/usr/local/mysql
--with--charset=gb2312 "
--with-extra-charsets=" gb2312 gbk big5 utf8""

make

make install

2.3 安装 php


可能需要先安装libxml
#tar -zxvf libxml2-2.6.26.tar.gz
#./configure --prefix=/usr/local/libxml
#make
#make install
进入php的解压目录
./configure --prefix=/usr/local/server/php5 --with-apxs2=/usr/local/apache2.2/bin/apxs --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/lcoal/mysql  --with-libxml-dir=/usr/local/libxml


好了,基本上完工了,还有一些小小的配置技巧稍后再写吧




posted on 2009-04-12 17:18 草原上的骆驼 阅读(155) 评论(0)  编辑  收藏 所属分类: Linux


只有注册用户登录后才能发表评论。


网站导航: