免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1234 | 回复: 0
打印 上一主题 下一主题

RedHat 9下mysql+apache+php环境的搭建 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-07-15 17:48 |只看该作者 |倒序浏览
前几天把linux删掉重装了,又重新搭建了mysql+apache+php环境,我把安装过程整理成了文档。
    1.1 安装准备
      

            
  • 机器环境:RedHat Linux 9
            
  • 下载mysql安装包:MySQL-server-4.1.12-1.i386.rpm,MySQL-client-4.1.12-1.i386.rpm
            
  • 下载apache安装包:apache_1.3.33.tar.gz
            
  • 下载php安装包:php-4.3.11.tar.gz
            
  • tar zxvf php-4.3.11.tar.gz,将文件解压到/usr/local/src
            
  • tar zxvf apache_1.3.33.tar.gz,将文件解压到/usr/local/src
          

    1.2 安装mysql
      
        
  • 安装mysql服务器端程序:rpm -ivh MySQL-server-4.1.12-1.i386.rpm
            
  • 安装mysql客户端程序:  rpm -ivh MySQL-client-4.1.12-1.i386.rpm
            
  • $mysql,可以看到
             
                Welcome to the MySQL monitor.  Commands end with ; or g.
                Your MySQL connection id is 1 to server version: 4.1.12-standard
                
                Type 'help;' or 'h' for help. Type 'c' to clear the buffer.        
                mysql>
             
            
          
        1.3 安装php
          
            
  • 进入apache的安装文件目录,输入:./configure --prefix=/usr/local/httpd
            
  • 进入php的安装文件目录,输入:./configure --prefix=/usr/local/php --with-mysql --with-apache=../apache_1.3.33
            
  • make && make install
            
  • cp php.ini-dist /usr/local/php/lib/php.ini
            
  • 建立符号链接 ln -s /usr/local/php/bin/php /usr/bin/php
          
        1.4 安装apache
          
            
  • 进入apache的安装文件目录,输入:./configure --prefix=/usr/local/httpd --activate-module=src/modules/php4/libphp4.a --enable-module=so --enable-module=rewrite
            
  • make && make install
            
  • 确保/usr/local/httpd/conf/httpd.conf中有以下内容
             
                DirectoryIndex index.html index.php
                ...
                AddType application/x-httpd-php .php
             
            
            
  • 建立符号链接 ln -s /usr/local/httpd/bin/apachectl /usr/bin/apache
            
  • 重启apache : apache restart
          

    本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/1777/showart_35856.html
  • 您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

    北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
    未成年举报专区
    中国互联网协会会员  联系我们:huangweiwei@itpub.net
    感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP