| 先根据安装过程做个简单流程表,以后慢慢补充完善 1 最小化安装系统 2 装完系统后不要退出,选configure->port**->src->ALL #安装所有源代码,方便编译内核,如果是用make kernel KERNCONF = XXX的话 3 重新启动进入系统,永远的第一件事:passwd,修改密码
下面正式开始BSD路程 4 密码修改后安装cvsup,因为我嫌用光盘装麻烦: pkg_add -r cvsup-without-gui 5 升级系统和ports cp /usr/src/share/examples/cvsup/standard-supfile ports-supfile /tmp 修改2个文件,将里面的host:改成host:cvsup.freebsdchina.org,然后进行安装 cd /tmp cvsup -g -L2 standard-supifle;cvsup -g -L2 ports-supfile #分号;代表执行完第一条命令后继续执行第二条,我懒,放一起了,出去逛 更新完后先别急,先升级系统编译内核,至于编译内核,论坛里多了,我就不多说了
cd /boot cp -R kernel kernel.old #备份旧内核,以防万一 make -j4 buildworld #-j4用4条线程一起build,快,我懒的等 make buildkernel xxxx make installkernel xxx 进入单用户模式或者直接 make installworld 如果make world有错,请看Freebsd Handbook,有详细操作介绍 安装mysql cd /usr/ports/databases/mysql41-server/ 修改makefile文件,在Makefile里CONFIGURE_TARGET那行前面的空行加上两行优化选项: BUILD_OPTIMIZED=yes BUILD_STATIC= yes 然后就可以安装了,很简单 make install clean 程序会自动下载缺少的ports #cp /usr/local/share/mysql/my-medium.cnf /etc/my.cnf #WEB基本设置 #chown -R mysql /var/db/mysql #权限,不然启动不了mysql的 #/usr/local/bin/mysql_install_db --user=root #安装默认数据 # /usr/local/etc/rc.d/mysql-server.sh start #启动mysql 现在看看mysql可以了没 #mysql 如果出现这样的字母,就代表你成功了 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 to server version: 4.1.14-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> 输入quit退出吧。 #mysqladmin -u root password 'xxxxx' #修改默认密码,一定要改,XXX里添入你的密码 一切都搞定,加入rc.conf,让系统启动时自动开启服务,在/etc/rc.conf最后加入这么一句 mysql_enable="YES" 安装Apache2 #cd /usr/ports/www/apache2 #make install #freebsd就是这么可爱 安装fastcgi cd ../mod_fastcgi make WITH_APACHE2=yes install clean 安装php cd ../mod_php4 make install clean
调试httpd.conf文件 |