LAMP

来源:互联网 发布:x20第四代人工智能 编辑:程序博客网 时间:2024/05/16 09:29


####################### APACHE ##########################################################
APACHE 
. 相关资料
    http://httpd.apache.org/
    http://httpd.apache.org/download.cgi#apache24
. 是否安装
    apachectl  -v 
. 安装
    download httpd-2.4.4.tar.bz2
    tar -jxf httpd-2.4.4.tar.bz2  
    
    su - root
    mkdir -p /usr/local/apache
    ./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/
    make
    make install
    
. 问题
    ./configure 时 APR not found. Please read the documentation.
    需要先后安装 apr 和 apr-util包
    
    apr-1.4.6.tar.gz        
    tar -zxvf apr-1.4.6.tar.gz
    ./configure --prefix=/usr/local/apr
    make
    make install
        
    tar -zxvf apr-util-1.5.1.tar.gz
    ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
    make
    make install
    
    error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
    pcre-8.21.tar.bz2
    tar -jxf  pcre-8.21.tar.bz2
    ./configure
    make
    make install
    
. 启动以及测试
    http://httpd.apache.org/docs/2.2/
    
    apachectl -k start
    apachectl -k stop
    apachectl -k restart
    
    配置文件 /usr/local/apache/conf
    默认的文件目录 /usr/local/apache/htdocs
    
.卸载系统默认的httpd
    rpm -e httpd --nodeps
    
    
    /usr/local/apache2/bin/httpd -f /路径1/httpd.conf -k start
 
    /usr/local/apache2/bin/httpd  -f /路径2/httpd.conf -k start
    这样就可以将不同的配置文件httpd.conf传入.从而启动多个httpd(apache)进程了.


    
    


####################### PHP ##########################################################
. 相关资料
    http://php.net/downloads.php


. 查看版本
    php -v
    
. 查看执行的结果    
    php hello.php    
    
. 卸载默认PHP
    rpm -e php --nodeps
    rpm -e php-ldap
    rpm -e php-common
    rpm -e php-cli
    安装
    tar -jxvf php-5.4.13.tar.bz2
    
    ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql
    cp php.ini-development /usr/local/php/php.ini 
.apache 配置    
    
    LoadModule php5_module modules/libphp5.so     
    
    <IfModule php5_module>  
      AddType application/x-httpd-php .php .phtml .php3  
      AddType application/x-httpd-php-source .phps  
    </IfModule>  




####################### MYSQL ##########################################################


grant all on *.* to qingtian@localhost;
0 0
原创粉丝点击