freebsd php55,FreeBSD服务器升级PHP4到PHP5的方法

本文详细介绍了如何在FreeBSD系统中使用portupgrade和portmaster工具,通过例子说明了备份旧配置、检查php4版本、升级php4到php5以及更新php-extensions的过程。提醒读者注意可能的安全风险并提供相关链接。
摘要由CSDN通过智能技术生成

在FreeBSD下,可以通过portupgrade或portmaster的-o选项来升级port。

portupgrade -o {new/port} {old-port}

portmaster -o {new port dir in /usr/ports} {installed port}

一、请把原来的配置备份一下。

二、查看下php4的具体版本。

# pkg_info | grep php4

php4-4.4.9 PHP Scripting Language (Apache Module and CLI)

三、升级php4

通过portmaster的话,请输入以下命令:

# portmaster -o /usr/ports/lang/php5 php4-4.4.9 to upgrade php5

或者,你也可以通过portupgrade命令:

# portupgrade -o lang/php5 php4

** Detected a package name change: php4 (lang/php4) -> ‘php5’ (lang/php5)

—> Upgrading ‘php4-4.4.9’ to ‘php5-5.2.9’ (lang/php5)

—> Building ‘/usr/ports/lang/php5’

===> Cleaning for php5-5.2.9

===> Found saved configuration for php5-5.2.8

===> Extracting for php5-5.2.9

=> MD5 Checksum OK for php-5.2.9.tar.bz2.

=> SHA256 Checksum OK for php-5.2.9.tar.bz2.

=> MD5 Checksum OK for suhosin-patch-5.2.9-0.9.7.patch.gz.

=> SHA256 Checksum OK for suhosin-patch-5.2.9-0.9.7.patch.gz.

……

…..

…===> SECURITY REPORT:

This port has installed the following files which may act as network

servers and may therefore pose a remote security risk to the system.

/usr/local/bin/php

/usr/local/bin/php-cgi

If there are vulnerabilities in these programs there may be a security

risk to the system. FreeBSD makes no guarantee about the security of

portsincluded in the Ports Collection. Please type ‘make deinstall’

to deinstall the port if this is a concern.

For more information, and contact details about the security

status of this software, see the following webpage:

http://www.php.net/

===> Cleaning for php5-5.2.9

—> Cleaning out obsolete shared libraries

[Updating the pkgdb

in /var/db/pkg … – 249 packages found (-0 +1) . done]

然后你需要重新配置php.ini,/usr/local/etc/php.ini。

四、还有php-extensions也需要升级。

#portmaster -o /usr/ports/lang/php5-extensions php4-extensions-1.0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值