You cannot see this page without javascript.

PHP-7.2.0

APM 조회 수 3161 추천 수 0 2017.12.12 17:18:40

PHP-7.2.0

Introduction to PHP

PHP is the PHP Hypertext Preprocessor. Primarily used in dynamic web sites, it allows for programming code to be directly embedded into the HTML markup. It is also useful as a general purpose scripting language.

This package is known to build and work properly using an LFS-8.1 platform.

Package Information

  • Download (HTTP): http://www.php.net/distributions/php-7.2.0.tar.xz

  • Download MD5 sum: ef8d4764f16d5f066e9893fe91887a31

  • Download size: 11 MB

  • Estimated disk space required: 502 MB (with tests, add 108 MB for documentation)

  • Estimated build time: 1.1 SBU (with parallelism=4; add 2.8 SBU for tests)

Additional Downloads

PHP Dependencies

Recommended

Optional System Utilities and Libraries

Aspell-0.60.6.1, enchant-2.1.3, libxslt-1.1.32, an MTA (that provides a sendmail command), PCRE-8.41, Pth-2.0.7, Dmalloc, Net-SNMP, OSSP mm, re2c, and XMLRPC-EPI

Optional Graphics Utilities and Libraries

FreeType-2.8.1, libexif-0.6.21, libjpeg-turbo-1.5.2, libpng-1.6.32, LibTIFF-4.0.9, X Window System, FDF Toolkit, GD, and t1lib

Optional Web Utilities

cURL-7.57.0, tidy-html5-5.4.0, Caudium, Hyperwave, mnoGoSearch, Roxen WebServer, and WDDX

Optional Data Management Utilities and Libraries

Berkeley DB-6.2.32 (Note that PHP does not officially support versions above 5.3), MariaDB-10.2.11 or MySQL, OpenLDAP-2.4.45, PostgreSQL-10.1, SQLite-3.21.0, unixODBC-2.3.4, Adabas, Birdstep, cdb, DBMaker, Empress, FrontBase, Mini SQL, Monetra, and QDBM

PHP also provides support for many commercial database tools such as Oracle, SAP and ODBC Router.

Optional Security/Encryption Utilities and Libraries

OpenSSL-1.1.0g, Cyrus SASL-2.1.26, MIT Kerberos V5-1.15.2, libmcrypt, and mhash

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/php

Installation of PHP

You can use PHP for server-side scripting, command-line scripting or client-side GUI applications. This book provides instructions for setting up PHP for server-side scripting as it is the most common form.

[Note]

Note

PHP has many more configure options that will enable support for various things. You can use ./configure --help to see a full list of the available options. Also, use of the PHP web site is highly recommended, as their online docs are very good. An example of a configure command that utilizes many of the most common dependencies can be found at http://anduin.linuxfromscratch.org/BLFS/files/php_configure.txt.

If, for whatever reason, you don't have libxml2-2.9.7 installed, you need to add --disable-libxml to the configure command in the instructions below. Note that this will prevent the pear command from being built.

Install PHP by running the following commands:

./configure --prefix=/usr                \
            --sysconfdir=/etc            \
            --localstatedir=/var         \
            --datadir=/usr/share/php     \
            --mandir=/usr/share/man      \
            --enable-fpm                 \
            --with-fpm-user=apache       \
            --with-fpm-group=apache      \
            --with-config-file-path=/etc \
            --with-zlib                  \
            --enable-bcmath              \
            --with-bz2                   \
            --enable-calendar            \
            --enable-dba=shared          \
            --with-gdbm                  \
            --with-gmp                   \
            --enable-ftp                 \
            --with-gettext               \
            --enable-mbstring            \
            --with-readline              &&
make

To test the results, issue: make test. A few tests may fail, in which case you are asked whether you want to send the report to the PHP developers. If you want to automate the test, you may prefix the command with yes "n" | .

Now, as the root user:

make install                                     &&
install -v -m644 php.ini-production /etc/php.ini &&

install -v -m755 -d /usr/share/doc/php-7.2.0 &&
install -v -m644    CODING_STANDARDS EXTENSIONS INSTALL NEWS README* UPGRADING* php.gif \
                    /usr/share/doc/php-7.2.0 &&
ln -v -sfn          /usr/lib/php/doc/Archive_Tar/docs/Archive_Tar.txt \
                    /usr/share/doc/php-7.2.0 &&
ln -v -sfn          /usr/lib/php/doc/Structures_Graph/docs \
                    /usr/share/doc/php-7.2.0

The default configuration files for the fastCGI process manager are installed only if they do not already exist on the system. If this is the first installation, they should be renamed, as the root user:

if [ -f /etc/php-fpm.conf.default ]; then
  mv -v /etc/php-fpm.conf{.default,} &&
  mv -v /etc/php-fpm.d/www.conf{.default,}
fi

The pre-built HTML documentation is packaged in two forms: a tarball containing many individual files, useful for quick loading into your browser, and one large individual file, which is useful for using the search utility of your browser. If you downloaded either, or both, of the documentation files, issue the following commands as the root user to install them (note these instructions assume English docs, modify the tarball names below if necessary).

For the “Single HTML” file:

install -v -m644 ../php_manual_en.html.gz \
    /usr/share/doc/php-7.2.0 &&
gunzip -v /usr/share/doc/php-7.2.0/php_manual_en.html.gz

For the “Many HTML files” tarball:

tar -xvf ../php_manual_en.tar.gz \
    -C /usr/share/doc/php-7.2.0 --no-same-owner

Command Explanations

--datadir=/usr/share/php: This works around a bug in the build machinery, which installs some data to a wrong location.

--enable-fpm: This parameter allows building the fastCGI Process Manager.

--with-config-file-path=/etc: This parameter makes PHP look for the php.ini configuration file in /etc.

--with-zlib: This parameter adds support for Zlib compression.

--enable-bcmath: Enables bc style precision math functions.

--with-bz2: Adds support for Bzip2 compression functions.

--enable-calendar: This parameter provides support for calendar conversion.

--enable-dba=shared: This parameter enables support for database (dbm-style) abstraction layer functions.

--enable-ftp: This parameter enables FTP functions.

--with-gettext: Enables functions that use Gettext text translation.

--enable-mbstring: This parameter enables multibyte string support.

--with-readline: This parameter enables command line Readline support.

--disable-libxml: This option allows building PHP without libxml2 installed.

--with-apxs2: Instead of building the fastCGI process manager, it is possible to build an apache module. This has some performance penalty for heavy loaded servers, but may be easier to set up. This switch is incompatible with the --enable-fpm and --with-fpm-... switches.

--with-mysqli=shared: This option includes MySQLi support.

--with-mysql-sock=/run/mysqld/mysqld.sock: Location of the MySQL unix socket pointer.

--with-pdo-mysql=shared: This option includes PDO: MySQL support.

--with-tidy=shared: This option includes tidy library support.

Configuring PHP

Config Files

/etc/php.ini, /etc/pear.conf, /etc/php-fpm.conf, and /etc/php-fpm.d/www.conf

Configuration Information

The file used as the default /etc/php.ini configuration file is recommended by the PHP development team. This file modifies the default behavior of PHP. If no /etc/php.ini is used, all configuration settings fall to the defaults. You should review the comments in this file and ensure the changes are acceptable in your particular environment.

The fastCGI process manager uses the configuration file /etc/php-fpm.conf. The default file shipped with PHP includes all the /etc/php-fpm.d/*.conf in turn. There is a shipped /etc/php-fpm.d/www.conf file, that contains the parameters related to the interaction with the Apache Web server.

You may have noticed the following from the output of the make install command:

You may want to add: /usr/lib/php to your php.ini include_path

If desired, add the entry using the following command as the root user:

sed -i 's@php/includes"@&\ninclude_path = ".:/usr/lib/php"@' \
    /etc/php.ini

To enable fastCGI support in the Apache web server, two LoadModule directives must be added to the httpd.conf file. They are commented out, so just issue the following command as root user:

sed -i -e '/proxy_module/s/^#//'      \
       -e '/proxy_fcgi_module/s/^#//' \
       /etc/httpd/httpd.conf

Those modules accept various ProxyPass directives. One possibility is (as the root user):

echo \
'ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/srv/www/$1' >> \
/etc/httpd/httpd.conf

Additionally, it may be useful to add an entry for index.php to the DirectoryIndex directive of the httpd.conf file. Lastly, adding a line to setup the .phps extension to show highlighted PHP source may be desirable:

AddType application/x-httpd-php-source .phps

You'll need to restart the Apache web server after making any modifications to the httpd.conf file.

Boot Script

To automatically start the php-fpm daemon when the system is rebooted, install the /etc/rc.d/init.d/php bootscript from the blfs-bootscripts-20170731 package as the root user:

make install-php

Contents

Installed Programs: pear, peardev, pecl, phar (symlink), phar.phar, php, php-cgi, php-config, php-fpm, phpdbg, and phpize
Installed Libraries: dba.{so,a} and opcache.{so,a} in /usr/lib/php/extensions/no-debug-non-zts-20151012
Installed Directories: /etc/php-fpm.d, /usr/{include,lib,share}/php and /usr/share/doc/php-7.2.0

Short Descriptions

php

is a command line interface that enables you to parse and execute PHP code.

pear

is the PHP Extension and Application Repository (PEAR) package manager.

php-fpm

is the fastCGI process manager for PHP.

phpdbg

is the interactive PHP debugger.

Last updated on 2017-12-01 13:47:21 -0600

 

 

 

 

 

 

add pkg list

 

re2c

엮인글 :
List of Articles
번호 제목 글쓴이 날짜 조회 수
369 APM mariadb download origin address LynX 2019-06-19 2016
368 APM What one can and should optimize LynX 2019-06-03 1433
367 CentOS mariadb install LynX 2019-05-31 1192
366 CentOS init mode change LynX 2019-05-30 1303
365 APM ext zip install LynX 2019-02-19 1637
364 APM ext ImageMagick install LynX 2019-02-19 538
363 3D Printer Pronterface(PrintRun) install file LynX 2018-09-13 758
362 CentOS Grub UUID change LynX 2018-08-08 889
361 Linux letsencrypt wildcard LynX 2018-07-26 802
360 Printer cura usb connection LynX 2018-07-06 673
359 CentOS cli 무선랜 LynX 2018-06-07 459
358 APM 윈도우에 APM 페키지 설치 file LynX 2018-05-04 640
357 APM MySQLTuner 설치 LynX 2018-04-27 551
356 CentOS CentOS7 커널 업데이트 LynX 2018-04-23 711
355 HTML Tag CSS 여러가지 모양 만들기 LynX 2018-02-08 780
354 Linux wkhtmltopdf wkhtmltoimage install LynX 2018-01-31 607
353 APM LZ4_LIBS Not Found (CentOS7, MariaDB 10.1.29) LynX 2018-01-03 508
352 APM mysql ./configure LynX 2017-12-15 812
» APM PHP-7.2.0 LynX 2017-12-12 3161
350 Linux libiconv LynX 2017-12-08 562

XE Login