PHP 5.0 インストール手順

概要

本手順書は下記環境に沿ったインストール手順である。

PHP : php 5.1.6
OS : Redhat Enterprise Linux ESv4 (x86 32bit)
インストール先 : /usr/local/php

ソースの取得

開発元のサイトよりインストール元を取得する。

http://jp.php.net/

インストール

ソースを取得し展開する

cd /usr/local/src
wget http://jp.php.net/get/php-5.1.6.tar.gz/from/this/mirror
tar xfvz php-5.1.6.tar.gz
cd php-5.1.6

configureを行う。
各種ライブラリの指定とMySQLサポートを追加した設定。

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --enable-mbstring --enable-mbregex --enable-zend-multibyte --with-gd --enable-gd-native-ttf --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --disable-libxml --disable-xml --without-pear --with-zlib --with-openssl --with-mysql=/usr/local/mysql

コンパイルとインストールを行う。

make
make install

設定ファイル作成

ソースphp.iniを所定位置に配置する。

cd /usr/local/src/php-5.1.6
cp php.ini-dist /usr/local/lib

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS