用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由於小弟對php並不熟悉, 所以不在這裏說明php.ini 有什么更好的設定了.
AddType application/x-httpd-php-source .phps #cd /usr/local/etc重启apache
#cp php.ini-recommended php.ini
#/usr/local/etc/rc.d/apache.sh stop3.3 測試php.
#/usr/local/etc/rc.d/apache.sh start
生成test.php,并在裏面加上以下的3行.
#vi /usr/local/www/data/test.php打开浏览器 http://yourweburl/test.php
<?
Phpinfo ();
?>
四. 安裝及設定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'] = '';測試phpMyAdmin
改成
$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
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在重安裝gettext 和gmake之前記住要ports是最新的.
#make deinstall clean && make reinstall clean
#cd ../gmake
#make deinstall clean && make reinstall clean
你也可參考以下方法.
责编:豆豆技术应用