If not included as part of the initial Linux installation, install the following PHP RPM packages and any dependencies listed by yum:
Additionally the following PEAR (PHP Extension and Application Repository) modules must be installed. A few will already be installed via RPM, some will need updating/installing via pear:
To install & upgrade required PEAR modules, use the following procedure:
[root@demo ~]# pear list Installed packages, channel pear.php.net: ========================================= Package Version State Archive_Tar 1.3.1 stable Console_Getopt 1.2 stable PEAR 1.4.9 stable XML_RPC 1.5.0 stable
[root@demo ~]# pear list-upgrades WARNING: channel "pear.php.net" has updated its protocols, use "channel-update pear.php.net" to update pear.php.net Available Upgrades (stable): ========================================= Channel Package Local Remote Size pear.php.net Archive_Tar 1.3.1 (stable) 1.3.11 (stable) 18.1kB pear.php.net Console_Getopt 1.2 (stable) 1.3.1 (stable) 4.4kB pear.php.net PEAR 1.4.9 (stable) 1.9.4 (stable) 290kB pear.php.net XML_RPC 1.5.0 (stable) 1.5.5 (stable) 32kB
[root@demo ~]# pear channel-update pear.php.net Retrieving channel.xml from remote server Update of Channel "pear.php.net" succeeded
[root@demo ~]# pear upgrade --force pear warning: pear/PEAR dependency package "pear/Console_Getopt" downloaded version 1.3.1 is not the recommended version 1.2.3 warning: pear/Archive_Tar requires PEAR Installer (version >= 1.5.4), installed version is 1.4.9 warning: pear/Console_Getopt requires PEAR Installer (version >= 1.8.0), installed version is 1.4.9 downloading PEAR-1.9.4.tgz ... Starting to download PEAR-1.9.4.tgz (296,332 bytes) .............................................................done: 296,332 bytes downloading Archive_Tar-1.3.11.tgz ... Starting to download Archive_Tar-1.3.11.tgz (18,537 bytes) ...done: 18,537 bytes downloading Structures_Graph-1.0.4.tgz ... Starting to download Structures_Graph-1.0.4.tgz (30,318 bytes) ...done: 30,318 bytes downloading Console_Getopt-1.3.1.tgz ... Starting to download Console_Getopt-1.3.1.tgz (4,471 bytes) ...done: 4,471 bytes downloading XML_Util-1.2.1.tgz ... Starting to download XML_Util-1.2.1.tgz (17,729 bytes) ...done: 17,729 bytes upgrade ok: channel://pear.php.net/XML_Util-1.2.1 upgrade ok: channel://pear.php.net/Console_Getopt-1.3.1 upgrade ok: channel://pear.php.net/Structures_Graph-1.0.4 upgrade ok: channel://pear.php.net/Archive_Tar-1.3.11 upgrade ok: channel://pear.php.net/PEAR-1.9.4 PEAR: Optional feature webinstaller available (PEAR's web-based installer) PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer) PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer) To install use "pear install pear/PEAR#featurename"
[root@demo ~]# pear upgrade-all Will upgrade channel://pear.php.net/xml_rpc WARNING: "pear/XML_RPC" is deprecated in favor of "pear/XML_RPC2" downloading XML_RPC-1.5.5.tgz ... Starting to download XML_RPC-1.5.5.tgz (31,862 bytes) .........done: 31,862 bytes upgrade-all ok: channel://pear.php.net/XML_RPC-1.5.5
[root@demo ~]# pear install HTML_Common HTML_QuickForm HTTP HTTP_Download HTTP_Header WARNING: "pear/HTML_Common" is deprecated in favor of "pear/HTML_Common2" WARNING: "pear/HTML_QuickForm" is deprecated in favor of "pear/HTML_QuickForm2" WARNING: "pear/HTTP" is deprecated in favor of "pear/HTTP2" Did not download optional dependencies: pear/Archive_Zip, pear/MIME_Type, use --alldeps to download automatically pear/HTTP_Download can optionally use package "pear/Archive_Zip" pear/HTTP_Download can optionally use package "pear/MIME_Type" pear/HTTP_Download can optionally use PHP extension "pgsql" downloading HTML_Common-1.2.5.tgz ... Starting to download HTML_Common-1.2.5.tgz (4,585 bytes) .....done: 4,585 bytes downloading HTML_QuickForm-3.2.13.tgz ... Starting to download HTML_QuickForm-3.2.13.tgz (103,483 bytes) ...done: 103,483 bytes downloading HTTP-1.4.1.tgz ... Starting to download HTTP-1.4.1.tgz (8,635 bytes) ...done: 8,635 bytes downloading HTTP_Download-1.1.4.tgz ... Starting to download HTTP_Download-1.1.4.tgz (14,571 bytes) ...done: 14,571 bytes downloading HTTP_Header-1.2.1.tgz ... Starting to download HTTP_Header-1.2.1.tgz (10,682 bytes) ...done: 10,682 bytes install ok: channel://pear.php.net/HTML_Common-1.2.5 install ok: channel://pear.php.net/HTTP-1.4.1 install ok: channel://pear.php.net/HTML_QuickForm-3.2.13 install ok: channel://pear.php.net/HTTP_Header-1.2.1 install ok: channel://pear.php.net/HTTP_Download-1.1.4
[root@demo ~]# pear list Installed packages, channel pear.php.net: ========================================= Package Version State Archive_Tar 1.3.11 stable Console_Getopt 1.3.1 stable HTML_Common 1.2.5 stable HTML_QuickForm 3.2.13 stable HTTP 1.4.1 stable HTTP_Download 1.1.4 stable HTTP_Header 1.2.1 stable PEAR 1.9.4 stable Structures_Graph 1.0.4 stable XML_RPC 1.5.5 stable XML_Util 1.2.1 stable
Increase PHP's maximum execution time by changing the following value in '/etc/php.ini':
;;;;;;;;;;;;;;;;;;; ; Resource Limits ; ;;;;;;;;;;;;;;;;;;; max_execution_time = 60 ; Maximum execution time of each script, in seconds
The following are optional, but recommended, steps to help improve the security of your ReadingRecord server.
Disable PHP's 'expose_php' setting. Although the comment indicates it is not a security threat, it may be possible for an attacker to probe for weaknesses in PHP by knowing the installed version. Plus if your library is routinely subject to security audits you will often get dinged for leaving this enabled.
; Decides whether PHP may expose the fact that it is installed on the server ; (e.g. by adding its signature to the Web server header). It is no security ; threat in any way, but it makes it possible to determine whether you use PHP ; on your server or not. expose_php = Off
Previous: Install & Configure MySQL | Next: Install & Configure phpMyAdmin