You can easily specify a port to upgrade using the -o option for both portupgrade and portmaster command. To replace the installed port with a port from a different origin use the syntax as follows:
FreeBSD update php syntax
portupgrade -o {new/port} {old-port}portmaster -o {new port dir in /usr/ports} {installed port}
Find out PHP4 version
First, find out php4 version (this is important as you need provide exact version number):# pkg_info | grep php4Sample output:
php4-4.4.9 PHP Scripting Language (Apache Module and CLI)
How To Upgrade PHP4 To PHP5
To replace / upgrade php4 with php5 using portmaster command, enter:# portmaster -o /usr/ports/lang/php5 php4-4.4.9 to upgrade php5To replace / upgrade php4 with php5 using portupgrade command, enter:
# portupgrade -o lang/php5 php4Sample output:
** Detected a package name change: php4 (lang/php4) -> 'php5' (lang/php5)Once done, you need to upgrade and set new php configuration files which is located at /usr/local/etc/php.ini and /usr/local/etc/php/.
---> 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
ports included 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]
No comments:
Post a Comment