ホームページ  >  記事  >  バックエンド開発  >  PHPのインストール_PHPチュートリアル

PHPのインストール_PHPチュートリアル

WBOY
WBOYオリジナル
2016-07-13 17:45:04904ブラウズ

アパッチ
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
作る
インストールする
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 起動
chkconfig --httpd を追加します
cp httpd /etc/init.d/httpd
起動に失敗する可能性があります
vi /etc/httpd/conf/httpd.conf PidFile "/var/run/httpd.pid"
キラール httpd
chkconfig --level 2345 httpd
php
tar xf php-5.3.6.tar
cd php-5.3.6
Compile./configure --prefix=/usr/local/php5 --sysconfdir=/etc/php --enable-mbstring --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/ usr/local/mysql

を作る インストールを行う
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 を認識できません
ディレクトリindex.phpを追加します

サービスhttpd開始
cd /usr/local/apache/htdocs
$link=mysql_connect('127.0.0.1','root','');
if ($link)
「成功」をエコーし​​ます
それ以外
「失敗」をエコーし​​ます
?>
この記事は「linux」ブログからのものです

www.bkjia.comtru​​ehttp://www.bkjia.com/PHPjc/478691.html技術記事 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=m...
声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。