Added GD library support for PHP installed in RPM mode in Linux [original]

Source: Internet
Author: User
Tags snmp
Recently, I encountered a server with a Fedora Core 5.0 Linux operating system. The originally installed Apache 2.0 and PHP 5.1.2 do not support the GD library, the verification code images and statistical charts generated by the GD library on the PHP webpage cannot be displayed. I tried to install the PHP-gd-5.1.2-5.i386.rpm package on this basis or not. So I thought of how to uninstall all the RPM packages that have been installed with PHP and then reinstall PHP. So I tried to solve the problem.
  
1. Create a temporary Directory PHP under the/var directory, and set Fedora Core 5.0 2nd ~ Copy the RPM files starting with "PHP-" to the/var/PHP Directory in the five RPM directories of the CD;
  
2. Execute the following command (in red) on the terminal ):
1. Check which RPM packages are installed for PHP:
[Root @ SMIs ~] # Rpm-Qa | grep PHP
PHP-pear-1.4.6-2
PHP-5.1.2-5
PHP-gd-5.1.2-5
PHP-ldap-5.1.2-5
  
2. Uninstall the RPM packages listed after you view them with the preceding commands:
[Root @ SMIs ~] # Rpm-e PHP-pear-1.4.6-2 PHP-5.1.2-5 PHP-gd-5.1.2-5 PHP-ldap-5.1.2-5
  
3. Go to the/var/PHP Directory:
[Root @ SMIs ~] # Cd/var/PHP
  
4. List Files in the/var/PHP Directory:
[Root @ SMIs PHP] # ls
PHP-5.1.2-5.i386.rpm PHP-ncurses-5.1.2-5.i386.rpm
PHP-bcmath-5.1.2-5.i386.rpm PHP-odbc-5.1.2-5.i386.rpm
PHP-dba-5.1.2-5.i386.rpm PHP-pdo-5.1.2-5.i386.rpm
PHP-devel-5.1.2-5.i386.rpm PHP-pear-1.4.6-2.noarch.rpm
PHP-gd-5.1.2-5.i386.rpm PHP-pgsql-5.1.2-5.i386.rpm
PHP-imap-5.1.2-5.i386.rpm PHP-snmp-5.1.2-5.i386.rpm
PHP-ldap-5.1.2-5.i386.rpm PHP-soap-5.1.2-5.i386.rpm
PHP-mbstring-5.1.2-5.i386.rpm PHP-xml-5.1.2-5.i386.rpm
PHP-mysql-5.1.2-5.i386.rpm PHP-xmlrpc-5.1.2-5.i386.rpm
  
5. Install the RPM package of the required components:
[Root @ SMIs PHP] # rpm-IVH PHP-5.1.2-5.i386.rpm PHP-ncurses-5.1.2-5.i386.rpm PHP-bcmath-5.1.2-5.i386.rpm PHP-odbc-5.1.2-5.i386.rpm PHP-dba-5.1.2-5.i386.rpm PHP-pdo-5.1.2-5.i386.rpm PHP-devel-5.1.2-5.i386.rpm PHP-pear-1.4.6-2.noarch.rpm PHP-gd-5.1.2-5.i386.rpm PHP-pgsql-5.1.2-5.i386.rpm PHP-snmp-5.1.2-5.i386.rpm PHP-ldap-5.1.2-5.i386.rpm PHP-soap-5.1.2-5.i386.rpm PHP-mbstring-5.1.2-5.i386.rpm PHP-xml-5.1.2-5.i386.rpm
Warning: PHP-5.1.2-5.i386.rpm: Header V3 DSA Signature: nokey, key ID 4f2a6fd2
Preparing... ######################################## ### [100%]
1: PHP ####################################### #### [6%]
2: php-PDO ##################################### ###### [12%]
3: php-ncurses ##################################### ###### [18%]
4: php-bcmath ##################################### ###### [24%]
5: php-odbc ##################################### ###### [29%]
6: php-DBA ##################################### ###### [35%]
7: php-devel ##################################### ###### [41%]
8: php-pear ##################################### ###### [47%]
9: php-Gd ##################################### ###### [53%]
10: php-pgsql ##################################### ###### [59%]
11: php-SNMP ##################################### ###### [65%]
12: php-LDAP ##################################### ###### [71%]
13: php-soap ##################################### ###### [76%]
14: php-mbstring ##################################### ###### [82%]
15: php-XML ##################################### ###### [88%]
16: php-mysql ##################################### ###### [94%]
17: php-XMLRPC ##################################### ###### [100%]
  
6. Restart the apache service:
[Root @ SMIs PHP] # service httpd restart
Stop httpd: [OK]
Start httpd: [OK]
  
7. Complete.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.