freebsd7.0安装:freebsd7.0 安装记录

  ##最小化安装freebsd7.0

  ##用sys安装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

  [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__db --user=mysql

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

  [root@fb7 /server/mysql]# bin/mysqladmin -u root password ' 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

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

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

  [root@fb7 /usr/src/httpd-2.2.8]# cp /server/http/bin/apachectl /usr/local/etc/rc.d/http.sh

  ##安装gd

  [root@fb7 /usr/src]# pkg_add -r gd

  ##安装libxml2

  [root@fb7 /usr/src]# pkg_add -r libxml2

  ##安装t1lib

  [root@fb7 /home/ximi/src]# pkg_add -r t1lib

  ##安装ImageMagick

  #安装对tf

  [root@fb7 /usr/src]# pkg_add -r tf

  [root@fb7 /usr/src]# fetch http://www.imagemagick.com.cn/download/ImageMagick-6.2.7-6.tar.gz

  [root@fb7 /usr/src]# tar zxvf ImageMagick-6.2.7-6.tar.gz

  [root@fb7 /usr/src]# cd ImageMagick-6.2.7

  [root@fb7 /usr/src/ImageMagick-6.2.7]# ./configure --prefix=/server/ImageMagick

  [root@fb7 /usr/src/ImageMagick-6.2.7]# make

  [root@fb7 /usr/src/ImageMagick-6.2.7]# make

  ##安装memcached

  #安装必须libevent

  [root@fb7 /usr/src]# pkg_add -r libevent

  [root@fb7 /usr/src]# fetch http://www.danga.com/memcached/dist/memcached-1.2.5.tar.gz

  [root@fb7 /usr/src]# tar zxvf memcached-1.2.5.tar.gz

  [root@fb7 /usr/src]# cd memcached-1.2.5

  [root@fb7 /usr/src/memcached-1.2.5]# ./configure --prefix=/server/memcached

  [root@fb7 /usr/src/memcached-1.2.5]# make

  [root@fb7 /usr/src/memcached-1.2.5]# make

  ##安装subversion

  #安装必须berkeley db

  [root@fb7 /usr/src]# pkg_add -r db42

  #安装必须apr-db42

  [root@fb7 /usr/src]# pkg_add -r apr-db42

  [root@fb7 /usr/src]# fetch http://subversion.tigris.org/downloads/subversion-1.4.6.tar.gz

  [root@fb7 /usr/src]# tar zxvf subversion-1.4.6.tar.gz

  [root@fb7 /usr/src]# cd subversion-1.4.6

  [root@fb7 /usr/src/subversion-1.4.6]# ./configure --prefix=/server/svn --with-apxs=/server/http/bin/apxs

  [root@fb7 /usr/src/subversion-1.4.6]# make

  [root@fb7 /usr/src/subversion-1.4.6]# make

  ##安装pdflib php扩展pdf必须

  [root@fb7 /usr/src]# fetch http://www.pdflib.com/binaries/PDFlib/702/PDFlib-Lite-7.0.2p8.tar.gz

  [root@fb7 /usr/src]# tar zxvf PDFlib-Lite-7.0.2p8.tar.gz

  [root@fb7 /usr/src]# fetch http://www.pdflib.com/binaries/PDFlib/702/PDFlib-7.0.2-FreeBSD6.tar.gz

  [root@fb7 /usr/src]# tar zxvf PDFlib-7.0.2-FreeBSD6.tar.gz

  [root@fb7 /usr/src]# cp -r PDFlib-7.0.2-FreeBSD6/bind/c PDFlib-Lite-7.0.2p8/bind/

  ##安装autoconf 2.13创建php configure必须

  [root@fb7 /usr/src/]# pkg_add -r autoconf213

  ##安装php

  [root@fb7 /usr/src]# fetch http://cn.php.net/get/php-5.2.5.tar.gz/from/this/mirror

  [root@fb7 /usr/src]# tar zxvf mirror

  [root@fb7 /usr/src]# cd php-5.2.5/ext/

  [root@fb7 /usr/src/php-5.2.5/ext]# fetch http://pecl.php.net/get/pdflib-2.1.5.tgz

  [root@fb7 /usr/src/php-5.2.5/ext]# tar zxvf pdflib-2.1.5.tgz

  [root@fb7 /usr/src/php-5.2.5/ext]# rm -r pdf

  [root@fb7 /usr/src/php-5.2.5/ext]# mv pdflib-2.1.5 pdf  

  [root@fb7 /usr/src/php-5.2.5/ext]# http://pecl.php.net/get/svn-0.3.tgz

  [root@fb7 /usr/src/php-5.2.5/ext]# fetch http://pecl.php.net/get/svn-0.3.tgz                 

  [root@fb7 /usr/src/php-5.2.5/ext]# tar zxvf svn-0.3.tgz

  [root@fb7 /usr/src/php-5.2.5/ext]# mv svn-0.3 svn

  [root@fb7 /usr/src/php-5.2.5/ext]# fetch http://pecl.php.net/get/memcache-2.2.3.tgz

  [root@fb7 /usr/src/php-5.2.5/ext]# tar zxvf memcache-2.2.3.tgz   

  [root@fb7 /usr/src/php-5.2.5/ext]# mv memcache-2.2.3 memcache

  [root@fb7 /usr/src/php-5.2.5/ext]# fetch http://pecl.php.net/get/imagick-2.1.1.tgz

  [root@fb7 /usr/src/php-5.2.5/ext]# tar zxvf imagick-2.1.1.tgz

  [root@fb7 /usr/src/php-5.2.5/ext]# mv imagick-2.1.1 imagick

  [root@fb7 /usr/src/php-5.2.5/ext]# cd ..

  [root@fb7 /usr/src/php-5.2.5]# mv configure configure.old

  [root@fb7 /usr/src/php-5.2.5]# ./buildconf --force

  [root@fb7 /usr/src/php-5.2.5]# ./configure --prefix=/server/php --with-config-file-path=/server/php --with-apxs2=/server/http/bin/apxs --with-mysql=/server/mysql --with-gd --with-jpeg-dir=/usr/local/bin --with-zlib-dir=/usr/local/bin --with-freetype-dir --with-xpm-dir=/usr/loacl/bin --with-t1lib --with-pdo-mysql=/server/mysql --enable-mb --with-svn=/server/svn --enable-memcache --with-imagick=/server/ImageMagick --with-pdflib=/usr/src/PDFlib-Lite-7.0.2p8/bind/c

Tags:  freebsd安装 freebsd7.0配置ip freebsd7.0 freebsd7.0安装

延伸阅读

最新评论

发表评论