电脑技术学习

freebsd7.0 安装记录

dn001

  ##最小化安装FreeBSD7.0

  ##用sysinstall安装perl5.8.8、bash、ports和设置网络

  ##通过ssh登录

  ##添加用户web、svn、mysql

  [root@fb7 /home/ximi]# su

  [root@fb7 /home/ximi]# cd /usr/src/

  [root@fb7 /usr/src]# ls

  [root@fb7 /usr/src]# mkdir /usr/server

  [root@fb7 /usr/src]# ln -s /usr/server/ /server

  ##安装mysql

  [root@fb7 /usr/src]# fetch http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.51a.tar.gz/from/http://mirror.mysql-partners-jp.biz/

  [root@fb7 /usr/src]# tar zxvf fetch.out

  [root@fb7 /usr/src]# cd mysql-5.0.51a/

  [root@fb7 /usr/src/mysql-5.0.51a]# ./configure --prefix=/server/mysql

  [root@fb7 /usr/src/mysql-5.0.51a]# make

  [root@fb7 /usr/src/mysql-5.0.51a]# make install

  [root@fb7 /usr/src/mysql-5.0.51a]# cd /server/mysql/

  #编辑/etc/my.cnf加入2行

  basedir     = /usr/local/mysql5

  datadir     = /home/mysql/data

  [root@fb7 /server/mysql]# bin/mysql_install_db --user=mysql

  [root@fb7 /server/mysql]# bin/mysqld_safe &

  [root@fb7 /server/mysql]# bin/mysqladmin -u root passWord 'new password'

  [root@fb7 /server/mysql]# cp share/mysql/mysql.server /usr/local/etc/rc.d/mysql.sh

  ##安装apache

  [root@fb7 /usr/src]# ls /server

  [root@fb7 /usr/src]# tar zxvf httpd-2.2.8.tar.gz

  [root@fb7 /usr/src]# cd httpd-2.2.8

  [root@fb7 /usr/src/httpd-2.2.8]# ./configure --prefix=/server/http --enable-so --enable-rewrite --enable-dav

标签: