PHP5.5.34
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*PHP7.0なのね;; [#UX7g8aW]
Ondrej氏に泣いてすがっても、5.6までしかPHPはありませ...
*下準備 [#iCiuySS]
ダウンロードから、[[php-5.5.34.tar.gz (sig) [17,354Kb] ...
/optに展開しましょう。(sudo nautilusなどで)
# apt-get install apache2 apache2-dev
# apt-get install libxslt1-dev libcurl4-openssl-dev pkg-...
# cd /opt/php-5.5.34
# ./configure --enable-cli \
--with-zlib-dir \
--with-freetype-dir \
--enable-mbstring \
--with-libxml-dir=/usr \
--enable-soap \
--enable-calendar \
--with-curl \
--with-mcrypt \
--with-zlib \
--with-gd \
--disable-rpath \
--enable-inline-optimization \
--with-bz2 \
--with-zlib \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-pcntl \
--enable-mbregex \
--with-mhash \
--enable-zip \
--with-pcre-regex \
--with-mysql \
--with-pdo-mysql \
--with-mysqli \
--with-png-dir=/usr \
--enable-gd-native-ttf \
--with-openssl \
--with-fpm-user=nginx \
--with-fpm-group=nginx \
--with-libdir=/lib/x86_64-linux-gnu \
--enable-ftp \
--with-gettext \
--with-gd \
--with-jpeg-dir=/usr/lib/ \
--enable-fpm \
--enable-maintainer-zts \
--with-apxs2=/usr/bin/apxs
*本番 [#lrxY6mt]
# make
# make install
# apt install libtool-bin
# libtool --finish /opt/php-5.5.34/libs
# cp php.ini-development /usr/local/lib/php.ini
*apache2.4の設定 [#u0Xeskv]
# gedit /etc/apache2/mods-available/php5.conf
<FilesMatch ".+\.ph(p[345]?|t|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".+\.phps$">
SetHandler application/x-httpd-php-source
# Deny access to raw php sources by default
# To re-enable it's recommended to enable access to ...
# only in specific virtual host or directory
Require all denied
</FilesMatch>
# Deny access to files without filename (e.g. '.php')
<FilesMatch "^\.ph(p[345]?|t|tml|ps)$">
Require all denied
</FilesMatch>
# Running PHP scripts in user directories is disabled by...
#
# To re-enable PHP in user directories comment the follo...
# (from <IfModule ...> to </IfModule>.) Do NOT set it to...
# prevents .htaccess files from disabling it.
<IfModule mod_userdir.c>
<Directory /home/*/public_html>
php_admin_flag engine Off
</Directory>
</IfModule>
# ln -s /etc/apache2/mods-available/php5.conf /etc/apach...
php5.loadも同様になってることを確認。~
*適用(apacheの再起動) [#FM1vi2Q]
# service apache2 restart
*試験 [#cbEw0Hd]
# gedit /var/www/html/index.html
<?php phpinfo(); ?>
にする。
# mv index.html index.php
ん!もっかいリスタートしたほうがいいかもしれませんが、...
終了行:
*PHP7.0なのね;; [#UX7g8aW]
Ondrej氏に泣いてすがっても、5.6までしかPHPはありませ...
*下準備 [#iCiuySS]
ダウンロードから、[[php-5.5.34.tar.gz (sig) [17,354Kb] ...
/optに展開しましょう。(sudo nautilusなどで)
# apt-get install apache2 apache2-dev
# apt-get install libxslt1-dev libcurl4-openssl-dev pkg-...
# cd /opt/php-5.5.34
# ./configure --enable-cli \
--with-zlib-dir \
--with-freetype-dir \
--enable-mbstring \
--with-libxml-dir=/usr \
--enable-soap \
--enable-calendar \
--with-curl \
--with-mcrypt \
--with-zlib \
--with-gd \
--disable-rpath \
--enable-inline-optimization \
--with-bz2 \
--with-zlib \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-pcntl \
--enable-mbregex \
--with-mhash \
--enable-zip \
--with-pcre-regex \
--with-mysql \
--with-pdo-mysql \
--with-mysqli \
--with-png-dir=/usr \
--enable-gd-native-ttf \
--with-openssl \
--with-fpm-user=nginx \
--with-fpm-group=nginx \
--with-libdir=/lib/x86_64-linux-gnu \
--enable-ftp \
--with-gettext \
--with-gd \
--with-jpeg-dir=/usr/lib/ \
--enable-fpm \
--enable-maintainer-zts \
--with-apxs2=/usr/bin/apxs
*本番 [#lrxY6mt]
# make
# make install
# apt install libtool-bin
# libtool --finish /opt/php-5.5.34/libs
# cp php.ini-development /usr/local/lib/php.ini
*apache2.4の設定 [#u0Xeskv]
# gedit /etc/apache2/mods-available/php5.conf
<FilesMatch ".+\.ph(p[345]?|t|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".+\.phps$">
SetHandler application/x-httpd-php-source
# Deny access to raw php sources by default
# To re-enable it's recommended to enable access to ...
# only in specific virtual host or directory
Require all denied
</FilesMatch>
# Deny access to files without filename (e.g. '.php')
<FilesMatch "^\.ph(p[345]?|t|tml|ps)$">
Require all denied
</FilesMatch>
# Running PHP scripts in user directories is disabled by...
#
# To re-enable PHP in user directories comment the follo...
# (from <IfModule ...> to </IfModule>.) Do NOT set it to...
# prevents .htaccess files from disabling it.
<IfModule mod_userdir.c>
<Directory /home/*/public_html>
php_admin_flag engine Off
</Directory>
</IfModule>
# ln -s /etc/apache2/mods-available/php5.conf /etc/apach...
php5.loadも同様になってることを確認。~
*適用(apacheの再起動) [#FM1vi2Q]
# service apache2 restart
*試験 [#cbEw0Hd]
# gedit /var/www/html/index.html
<?php phpinfo(); ?>
にする。
# mv index.html index.php
ん!もっかいリスタートしたほうがいいかもしれませんが、...
ページ名: