「インストール - PHP」の版間の差分

ナビゲーションに移動 検索に移動
90行目: 90行目:
PHPをビルドおよびインストールする。<br>
PHPをビルドおよびインストールする。<br>
  ../configure --prefix=<PHPのインストールディレクトリ> \
  ../configure --prefix=<PHPのインストールディレクトリ> \
               --enable-fpm --enable-phpdbg --enable-phpdbg-debug \
               --enable-bcmath --enable-calendar --enable-cgi --enable-cli --enable-exif ---enable-ftp --enable-fpm --enable-gd --enable-gd-jis-conv \
              --enable-bcmath --enable-calendar --enable-cgi --enable-cli --enable-exif --enable-ftp --enable-intl --enable-mbregex --enable-mbstring \
              --enable-intl --enable-mbregex --enable-mbstring --enable-mysqlnd --enable-opcache --enable-phpdbg --enable-phpdbg-debug --enable-sockets \
              --enable-opcache --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop --enable-soap --enable-zts \
              --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop --enable-soap --enable-zts \
               --with-curl --with-gettext --with-iconv --with-kerberos --with-libxml --with-openssl --with-pic --with-readline --with-sodium \
              --with-apxs2=<Apacheのインストールディレクトリ>/bin/apxs \
              --with-zip --with-zlib --with-unixODBC=shared \
               --with-curl --with-expat -with-freetype --with-gettext --with-gmp --with-iconv --with-imap --with-imap-ssl --with-kerberos --with-libxml \
              --with-openssl --with-pic --with-readline --with-sodium --with-xpm --with-zip --with-zlib --with-unixODBC=shared \
              --with-mysql-sock \
               --with-mysqli=mysqlnd    \  # MySQL拡張モジュールであるmysqliMySQL Native Driverでビルドする
               --with-mysqli=mysqlnd    \  # MySQL拡張モジュールであるmysqliMySQL Native Driverでビルドする
               --with-pdo-mysql=mysqlnd  \  # MySQL拡張モジュールであるPDO MYSQLをMySQL Native Driverでビルドする
               --with-pdo-mysql=mysqlnd  \  # MySQL拡張モジュールであるPDO MYSQLをMySQL Native Driverでビルドする
              --with-pgsql \      # PostgresSQLを使用する場合
              --with-pdo-pgsql \  # PostgresSQLを使用する場合
               --with-config-file-path=<php.iniファイルの配置するパス>  # ユーザが指定する場合
               --with-config-file-path=<php.iniファイルの配置するパス>  # ユーザが指定する場合
   
   
108行目: 112行目:
   
   
  export PATH="/<PHPのインストールディレクトリ>/bin:/<PHPのインストールディレクトリ>/sbin:$PATH"
  export PATH="/<PHPのインストールディレクトリ>/bin:/<PHPのインストールディレクトリ>/sbin:$PATH"
<br>
Apacheの設定ファイルであるhttpd.confファイルを編集して、phpファイルを実行できるように設定する。<br>
vi /<Apacheの設定ファイルがあるディレクトリ>/conf/httpd.conf
<br>
# /<Apacheの設定ファイルがあるディレクトリ>/conf/httpd.confファイル
LoadModule phpX_module modules/libphpX.so
LoadModule php8_module modules/libphp8.so  # 追記
AddType application/x-httpd-php .php      # 追記
<br>
<br>
次に、php.iniファイルを配置する。<br>
次に、php.iniファイルを配置する。<br>

案内メニュー