CentOS/RHEL:安装php-tidy模块/扩展

时间:2020-01-09 10:34:16  来源:igfitidea点击:

问题:
如何在用于Apache服务器的RHEL或CentOS Linux上安装php-tidy?

解决方法:
您需要在RHEL/CentOS/Fedora/Scientific Linux服务器上使用yum命令安装以下模块:

  • php-tidy php-tidy软件包包含一个动态共享对象,它将为在PHP中使用tidy库增加支持。

在RHEL/CentOS上安装php-tidy模块

打开终端并输入以下yum命令:

# yum install php-tidy

输出示例:

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
=============================================================================================
Installing:
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 
 
Installed:
  php-tidy.x86_64 0:5.3.3-27.el6_5                                                           
 
Dependency Installed:
  libtidy.x86_64 0:0.99.0-19.20070615.1.el6                                                  
 
Complete!

重新启动/重新加载Web服务器

键入以下命令以重新启动/重新加载Apache服务器:

# service httpd restart

验证新设置

# php -i | grep -color tidy