CentOS 安装php-tidy 模块扩展

在php环境下有时候需要php-tidy模块的支持,那么如何在centos 或rhel系统下安装php-tidy模块呢?
首先需要使用yum命令安装下面的模块:
php-tidy-这个包含了使用tidy 类库支持php的动态共享库。
linux操作系统

在centos下安装php-tidy

输入下面的命令:
[cc lang=”bash”]
yum install php-tidy
[/cc]
命令输出:
[cc lang=”bash”]
[root@devops Desktop]# yum -y install glances
Loaded plugins: fastestmirror, refresh-packagekit, security, versionlock
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirrors.163.com
* updates: mirrors.163.com
Setting up Install Process
No package glances available.
Error: Nothing to do
[root@devops Desktop]# yum install glances
Loaded plugins: fastestmirror, refresh-packagekit, security, versionlock
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirrors.163.com
* updates: mirrors.163.com
Setting up Install Process
No package glances available.
Error: Nothing to do
[root@devops Desktop]#
[root@devops Desktop]#
[root@devops Desktop]#
[root@devops Desktop]# yum install php-tidy
Loaded plugins: fastestmirror, refresh-packagekit, security, versionlock
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirrors.163.com
* updates: mirrors.163.com
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package php-tidy.x86_64 0:5.3.3-40.el6_6 will be installed
–> Processing Dependency: php-common(x86-64) = 5.3.3-40.el6_6 for package: php-tidy-5.3.3-40.el6_6.x86_64
–> Processing Dependency: libtidy-0.99.so.0()(64bit) for package: php-tidy-5.3.3-40.el6_6.x86_64
–> Running transaction check
—> Package libtidy.x86_64 0:0.99.0-19.20070615.1.el6 will be installed
—> Package php-common.x86_64 0:5.3.3-40.el6_6 will be installed
–> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
php-tidy x86_64 5.3.3-40.el6_6 updates 39 k
Installing for dependencies:
libtidy x86_64 0.99.0-19.20070615.1.el6 base 127 k
php-common x86_64 5.3.3-40.el6_6 updates 527 k
Transaction Summary
================================================================================
Install 3 Package(s)
Total download size: 693 k
Installed size: 3.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): libtidy-0.99.0-19.20070615.1.el6.x86_64.rpm | 127 kB 00:00
(2/3): php-common-5.3.3-40.el6_6.x86_64.rpm | 527 kB 00:01
(3/3): php-tidy-5.3.3-40.el6_6.x86_64.rpm | 39 kB 00:00
——————————————————————————–
Total 108 kB/s | 693 kB 00:06
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-common-5.3.3-40.el6_6.x86_64 1/3
Installing : libtidy-0.99.0-19.20070615.1.el6.x86_64 2/3
Installing : php-tidy-5.3.3-40.el6_6.x86_64 3/3
Verifying : libtidy-0.99.0-19.20070615.1.el6.x86_64 1/3
Verifying : php-tidy-5.3.3-40.el6_6.x86_64 2/3
Verifying : php-common-5.3.3-40.el6_6.x86_64 3/3
Installed:
php-tidy.x86_64 0:5.3.3-40.el6_6
Dependency Installed:
libtidy.x86_64 0:0.99.0-19.20070615.1.el6 php-common.x86_64 0:5.3.3-40.el6_6
Complete!
[/cc]
重启或者重载 web服务器
输入下面的命令:
[cc lang=”bash”]
service httpd restart
[/cc]
验证tidy的配置
输入命令:
[cc lang=”bash”]
php -i | grep -color tidy
[/cc]
命令输出:
[cc lang=”bash”]
PHP Warning: Unknown: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘America/New_York’ for ‘EST/-5.0/no DST’ instead in Unknown on line 0
tidy
Extension Version => 2.0 ($Id: tidy.c 296107 2010-03-12 10:28:59Z jani $)
tidy.clean_output => no value => no value
tidy.default_config => no value => no value
[root@devops Desktop]#
[/cc]

Leave a Reply