# chmod /etc/rcd/mysqldsh
设置开机启动MYSQL
# vi /etc/rclocal
if [ f /etc/mycnf ]; then
/etc/rcd/mysqldsh start
fi
安装配置PHP
# pkg_add v phpcoreptgz
运行下面的命令使其生效
# cp /usr/local/share/examples/php/phpinirecommended /var/www/conf/phpini
# /usr/local/sbin/phpxs s
由于OPENBSD上的APACHE采用了CHROOT机制要保证PHP正常工作就要建下面的目录PHP工作目录
# mkdir /var/www/tmp
# chmod /var/www/tmp
下面选择安装几个PHP组件
# pkg_add v phpgdpno_xtgz
# /usr/local/sbin/phpxs a gd
# pkg_add v phpmysqlptgz
# /usr/local/sbin/phpxs a mysql
# pkg_add v phpncursesptgz
# /usr/local/sbin/phpxs a ncurses
# pkg_add v phpimapptgz
# /usr/local/sbin/phpxs a imap
# pkg_add v phpcurlptgz
# /usr/local/sbin/phpxs a curl
# pkg_add v phpdbxptgz
# /usr/local/sbin/phpxs a dbx
# pkg_add v phpldapptgz
# /usr/local/sbin/phpxs a ldap
# pkg_add v phppdfptgz
# /usr/local/sbin/phpxs a pdf
# pkg_add v phpsnmpptgz
# /usr/local/sbin/phpxs a snmp
设置apache支持PHP:
# vi /var/www/conf/httpdconf
DirectoryIndex indexhtml indexphp
AddType application/xhttpdphp php
AddType application/xhttpdphpsource phps
# vi /var/www/conf/phpini
doc_root= /htdocs
register_globals = On
建立测试php页面
# vi /var/www/htdocs/testphp
<?php phpinfo(); ?>
测试一下
# pkill httpd
# /usr/sbin/httpd
在浏览器中输入http://IP/testphp实验一下
[] [] []