用ports安裝apache13_modssl+mysql+php+phpmyadmin

http://tech.ddvip.com   2006年04月01日    社区交流

本文详细介绍用ports安裝apache13_modssl+mysql+php+phpmyadmin

  在 /usr/local/etc/apache/httpd.conf 裏加上以下兩句.

  AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
由於小弟對php並不熟悉, 所以不在這裏說明php.ini 有什么更好的設定了. #cd /usr/local/etc
#cp php.ini-recommended php.ini
重启apache

  #/usr/local/etc/rc.d/apache.sh stop
#/usr/local/etc/rc.d/apache.sh start
3.3 測試php.

  生成test.php,并在裏面加上以下的3行.

  #vi /usr/local/www/data/test.php
<?
Phpinfo ();
?>
打开浏览器 http://yourweburl/test.php

  四. 安裝及設定phpMyAdmin.

  用ports 来安装phpmyadmin

  #cd /usr/ports/databases/phpmyadmin
#make install clean
#cd /usr/local/www/data/phpMyAdmin
#cp config.inc.php.sample config.inc.php
#chmod 755 config.inc.php
#vi config.inc.php
更改以下幾行

  $cfg['PmaAbsoluteUri'] = '';
改成
$cfg['PmaAbsoluteUri'] = http://yourweburl/phpMyAdmin/ '';
$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?
改成
$cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed
改成
$cfg['Servers'][$i]['password'] = 'mysql passwd'; // MySQL password (only needed
測試phpMyAdmin

  https://yourweburl/phpMyAdmin/

  後記:

  以下是一些安裝時可能遇到的問題.

  在安裝mod_php4時會出現以下的錯誤信息.

  /usr/libexec/ld-elf.so.1: Shared object "libintl.so.5" not found解決方法:

  原因是gettext 和 gmake 的版本的mod_php4安裝是要求的不一样, 一般是mod_php4 要的版本比較新, 所以出現一些不支持的現象.

  只要用cvsup 更新你的gettext 和gmake就可以了. #cd /usr/ports/devel/gettext
#make deinstall clean && make reinstall clean
#cd ../gmake
#make deinstall clean && make reinstall clean
在重安裝gettext 和gmake之前記住要ports是最新的.

  你也可參考以下方法.

  

  • http://docs.freebsd.org/cgi/getmsg.cgi?fetch=609553+0+archive/2003/freebsd-ports/20031123.freebsd-ports

      

  • http://www.bsdforums.org/forums/showthread.php?threadid=13526
  • 责编:豆豆技术应用

    正在加载评论...