安迪老大

菩提本无树,明镜亦非台,本来无一物,何处惹尘埃 。

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

安装ports,并更新
setenv ""
pkg_add -r cvsup-without-gui
rehash
cd /usr/share/examples/cvsup
ee ports-supfile
         host=cvsup2.cn.freebsd.org
cvsup -g -L 2 ports-supfile
cd /usr/ports
ls
安装mysql
cd /usr/ports/databases/mysql51-server/
make WITH_CHARSET=gbk WITH_XCHARSET=all WITH_PROC_SCOPE_PTH=yes BUILD_OPTIMIZED=yes BUILD_STATIC=yes SKIP_DNS_CHECK=yes WITHOUT_INNODB=yes install clean
rehash
ee /etc/rc.conf
         mysql_enable="YES"
rehash
cd /usr/local/etc/
ls
cd rc.d/
ls
./mysql-server start
netstat -an
mysql
show databases;
exit;
安装apache22
cd /usr/ports/www/apache22
ls
make WITH_MPM=worker WITHOUT_IPV6=yes WITH_THREADS=yes WITHOUT_SSL=yes install clean
cd /usr/local/etc/apache22/
ls
cp httpd.conf httpd.conf.bak
ee httpd.conf
         ServerAdmin 
         ServerName   www.stuhack.com:80
         Options Indexes FollowSymLinks ==>Options FollowSymLinks
         DirectoryIndex index.html ==> DirectoryIndex index.html index.php
         AddType application/x-http-php .php
         AddType application/x-http-php-source .phps
ee /etc/rc.conf
         apache22_enable="YES"
cd /usr/local/etc/rc.d/
./apache22 start
netstat -na
安装php
cd /usr/ports/lang/php5/
make WITH_APACHE22=yes install clean
ee /usr/local/etc/apache22/httpd.conf
rehash
cd /usr/local/etc/rc.d/
./apache22 restart
cd /usr/local/www/apache22/data/
ee index.php
         <?php
         phpinfo();
         ?>
cd /usr/local/etc
cp php.ini-dist php.ini
ee php.ini
         safe_mode=On
         #default_charset="iso-8859-1" ==>default_charset="GB2312"
cd /usr/local/etc/rc.d/
./apache22 restart

posted on 2016-05-03 17:17  安迪老大  阅读(91)  评论(0)    收藏  举报