php的安裝_PHP教程

來源:互聯網
上載者:User
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” 部落格

http://www.bkjia.com/PHPjc/478691.htmlwww.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...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.