Freebsd系统中搭建drupal系统的时候,发现php的版本太老,决定进行升级操作。
一、跟新ports
1、安装cvsup
#cd /usr/ports/net/cvsup-without-gui
#make install clean
2、更新ports
#cvsup –L 2 –h cvsup3.tw.freebsd.org /usr/share/examples/cvsup/ports-supfile ; rehash
二、跟新php
暂停apache:
#/usr/local/etc/rc.d/apache22 stop
卸载旧版(配置文件都不会丢失):
#cd /usr/ports/lang/php5
#make deinstall;rehash
重编译新版php:
#make install clean;rehash
查看PHP CLI的版本:
#php -v
升级扩展(似乎扩展没有更新,但也还是重编译了一次):
#cd /usr/ports/lang/php5-extensions
卸载:
#make deinstall;rehash
重编译:
#make install clean;rehash
启动apache:
#/usr/local/etc/rc.d/apache22 start
完成