php的安装_PHP教程

WBOY
發布: 2016-07-13 17:45:04
原創
901 人瀏覽過

apache
        tar xf httpd-2.2.19.tar
        cd   httpd-2.2.19  ls
   编译: ./configure --prefix=/usr/loacl/apache  --sysconfdir=/etc/httpd --enable-ssl --enable-modules=most --enable-mods-shared=most  --enable-so
        make
        make install
       弄一个httpd,
       vi /etc/init.d/httpd  apachectl=/usr/local/apache/bin/apachectl
        httpd=/usr/local/apache/bin/httpd
      cd  /etc/httpd  ls
      vi /etc/httpd/conf/httpd.conf
     启动   PATH=$PATH:/usr/local/apache/bin
   
         apachectl start
      chkconfig --add httpd
  cp  httpd   /etc/init.d/httpd
  可能会出现不能启动
   vi /etc/httpd/conf/httpd.conf  PidFile "/var/run/httpd.pid"
   killall httpd
     chkconfig --level 2345 httpd on   
php
    tar xf php-5.3.6.tar
   cd  php-5.3.6
   编译 ./configure --prefix=/usr/local/php5 --sysconfdir=/etc/php --enable-mbstring --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql
    make      
make install 
 cp php.ini-production /etc/php/php.ini
cd   /etc/php
vi  php.ini
cd  php-5.3.6
cp php.ini-production /usr/loacl/ph5/lib/php.ini
此时还不能和apache一起工作
 vi /etc/httpd/conf/httpd.conf  AddType application/x-httpd-php .php    AddType application/x-httpd-php-source .phps
此时还无法识别index.php
     添加directory index.php
          
service httpd start
cd /usr/local/apache/htdocs
$link=mysql_connect('127.0.0.1','root','');
if ($link)
    echo "sucess"
else
     echo "failure"
?>
本文出自 “linux” 博客

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/478691.htmlTechArticleapache tar xf httpd-2.2.19.tar cd httpd-2.2.19 ls 编译: ./configure --prefix=/usr/loacl/apache --sysconfdir=/etc/httpd --enable-ssl --enable-modules=most --enable-mods-shared=m...
相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!