≡ Menu

CentOS / RHEL: Install php-tidy Module / Extension

I am a new CentOS / RHEL / Red Hat / Fedora Linux server user. I need to provide tidy library support using php. How do I install php-tidy on RHEL or CentOS Linux for Apache server?

Tutorial details
DifficultyEasy (rss)
Root privilegesYes
Estimated completion time5m
You need to install the following module using the yum command on RHEL/CentOS/Fedora/Scientific Linux server:

  1. php-tidy - The php-tidy package contains a dynamic shared object that will add support for using the tidy library to PHP.

Install php-tidy module on RHEL/CentOS

Open the Terminal and type the following yum command:
# yum install php-tidy
Sample outputs:

Loaded plugins: auto-update-debuginfo, protectbase, rhnplugin, security
This system is receiving updates from RHN Classic or RHN Satellite.
0 packages excluded due to repository protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-tidy.x86_64 0:5.3.3-27.el6_5 will be installed
--> Processing Dependency: libtidy-0.99.so.0()(64bit) for package: php-tidy-5.3.3-27.el6_5.x86_64
--> Running transaction check
---> Package libtidy.x86_64 0:0.99.0-19.20070615.1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
 Package     Arch      Version                        Repository                        Size
 php-tidy    x86_64    5.3.3-27.el6_5                 rhel-x86_64-server-optional-6     36 k
Installing for dependencies:
 libtidy     x86_64    0.99.0-19.20070615.1.el6       rhel-x86_64-server-6             127 k
Transaction Summary
Install       2 Package(s)
Total download size: 164 k
Installed size: 0
Is this ok [y/N]: y
Downloading Packages:
(1/2): libtidy-0.99.0-19.20070615.1.el6.x86_64.rpm                    | 127 kB     00:00
(2/2): php-tidy-5.3.3-27.el6_5.x86_64.rpm                             |  36 kB     00:00
Total                                                        654 kB/s | 164 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libtidy-0.99.0-19.20070615.1.el6.x86_64                                   1/2
  Installing : php-tidy-5.3.3-27.el6_5.x86_64                                            2/2
  Verifying  : php-tidy-5.3.3-27.el6_5.x86_64                                            1/2
  Verifying  : libtidy-0.99.0-19.20070615.1.el6.x86_64                                   2/2
  php-tidy.x86_64 0:5.3.3-27.el6_5
Dependency Installed:
  libtidy.x86_64 0:0.99.0-19.20070615.1.el6

Restart / reload web-server

Type the following command to restart / reload Apache server:
# service httpd restart

Verify new settings

# php -i | grep -color tidy

Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?

{ 4 comments… add one }

  • bob December 18, 2013, 8:02 am

    Can you please tell me what does this library do? This php-tidy? Is this related to HTML by any chance?
    Thank you!

  • Grig Larson December 18, 2013, 4:52 pm
    • bob December 19, 2013, 9:47 am

      got it. :) thanks.

  • Danny November 5, 2014, 7:55 am

    THis not work at all on centos 6.1

    [root@dedi712 ~]# yum install php-tidy
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: mirror.nl.webzilla.com
    * extras: mirror.nl.webzilla.com
    * updates: centos.mirror1.spango.com
    Setting up Install Process
    No package php-tidy available.
    Error: Nothing to do

    getting stuk

Leave a Comment