freebsd/php/apache/mysql/java/tomcat 安装 更改 拷贝 /usr/share/../make.conf 至 /etc/make.conf 在末尾加上 MASTER_SITE_OVERRIDE?=ftp://ftp.cn.freebsd.org/ports/distfiles/${DIST_SUBDIR} freebsd: install all packages distributions pkg_add -r cvsup-without-gui cp /usr/share/examples/cvsup* /root vi ports-supfile vi stable-supfile postgresql 8.4.0 server (configuration after ) # pw add user postgres # mkdir /var/db/pgsql # chown -R postgres /var/db/pgsql # su postgres $ initdb -D /var/db/pgsql/ $ /usr/local/bin/postgres -D /var/db/pgsql $ /usr/local/bin/createuser -s -d -l -P phppgadmin 不需太多配置 conf/下有配置文件 // -s superuser // -d createdb // -l login // -P: set password mysql make WITH_CHARSET=gb2312 WITH_XCHARSET=all WITH_PROC_SCOPE_PTH=yes BUILD_OPTIMIZED=yes BUILD_STATIC=yes install clean phpmyadmin /usr/local/bin/mysql_install_db chown -R mysql /var/db/mysql/ chgrp -R mysql /var/db/mysql/ mysqld_safe --user=mysql --skip-grant-tables --skip-networking & mysql -u root mysql 进入mysql mysql> UPDATE user SET Password=PASSWORD() where USER=’root’; mysql> FLUSH PRIVILEGES; apache vi Makefile --enable-so / --with-apxs2=/usr/local/sbin/apxs php5 cd /usr/ports/lang/php5 make config 选apache支持 make install clean php5-extensions php5-extensions smbftpd ChrootSet DefaultMOde:normal, quota? 改httpd.conf AddType application/x-httpd-php .php AddType application/x-httpd-php-sources .phps ServerName localhost vi /etc/rc.conf 改 host ; mysql_enable="YES" apache22_enable="YES" /进阶 lighttpd 选spawn-fcgi 可以多端口启动 spawn-fcgi -a 127.0.0.1 -p 9000 -u www -g www -C 25 -f /usr/local/bin/php-cgi nginx darwin 以darwinstreamingserver tbz为关键字搜索 pkg_add darwinxxx.tbz 然后按tbz相关文件做 最后 以5.5为例 cp /usr/local/etc/rc.d/streamingadminserver /etc/rc.d/streamingadminserver.sh echo 'streamingadminserver_enable="YES"' >> /etc/rc.conf echo 'streamingadminserver_flag=""' >> /etc/rc.conf