Freebsd杂

www# setenv "ftp://cvsup2.cn.freebsd.org"
www# pkg_add -r cvsup-without-gui
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.2-release/Latest/cvsup-without-gui.tbz... Done.

www# rehash
www# cd /usr/share/examples/cvsup/

www# ee ports-supfile

*default host=cvsup2.cn.freebsd.org

www# cvsup -g -L 2 ports-supfile

ftp://ftp2.tsinghua.edu.cn/mirror/FreeBSD/

# cd /usr/ports/www/lighttpd
# make
# make install
# make clean
# cd /usr/ports/databases/mysql50-server/
make WITH_CHARSET=utf8  WITH_XCHARSET=gbk WITH_XCHARSET=gb2312 WITH_PROC_SCOPE_PTH=yes BULD_OPTIMIZED=yes BULID_STATIC=yes SKIP_DNS_CHECK=yes WITHOUT_INNODB=YES
make install
# cd /usr/ports/databases/mysql50-script/
make
make install
# cd /usr/ports/lang/php5
# make
# make install
# make clean
cd /usr/ports/lang/php5-extensions

        Next you must install PHP5 extensions such as GB, mysql support
        and so on. At least select following extensions from menu:
        ctype: The ctype shared extension for php
        curl: The curl shared extension for php
        dom: The dom shared extension for php
        gd: The gd shared extension for php
        imap: The imap shared extension for php
        mbstring: The mbstring shared extension for php
        mcrypt: The mcrypt shared extension for php
        mysql: The mysql shared extension for php
        mysqli: The mysqli shared extension for php
        pcre: The pcre shared extension for php
        posix: The posix shared extension for php
        session: The session shared extension for php
        simplexml: The simplexml shared extension for php
        xml: The xml shared extension for php
        xmlreader: The xmlreader shared extension for php
        xmlwriter: The xmlwriter shared extension for php
        zlib: The zlib shared extension for php
        Type the following command:

# vi /etc/rc.conf
    Append following two lines:
    mysql_enable="YES"
    lighttpd_enable="YES"

cd /usr/ports/ports-mgmt/portupgrade
make
make install

vi /etc/protsnap.conf
cvsup3.freebsdchina.org
portsnap.tw.FreeBSD.org

portsnap fetch
portsnap extract
portsnap update

systat -vm

cd /usr/src
# make buildworld
# make buildkernel KERNCONF=MYBSD

www# /usr/sbin/config GENERIC
ERROR: version of config(8) does not match kernel!
config version = 600003, version required = 600004

Make sure that /usr/src/usr.sbin/config is in sync
with your /usr/src/sys and install a new config binary
before trying this again.

If running the new config fails check your config
file against the GENERIC or LINT config files for
changes in config syntax, or option/device naming
conventions

cd /usr/src/usr.sbin/config
make depend all install

# cd /usr/src/sys/i386/conf
# /usr/sbin/config GENERIC
/libexec/ld-elf.so.1: Shared object "libsbuf.so.4" not found, required by "config"
www# ldconfig -m /usr/libexec/

www# ldconfig -m /usr/libexec/
www# cd /usr/src/sys/i386/conf
www# /usr/sbin/config GENERIC
/libexec/ld-elf.so.1: Shared object "libsbuf.so.4" not found, required by "config"
www# find / -name libsbuf.so.4
/usr/obj/usr/src/tmp/lib/libsbuf.so.4
/usr/obj/usr/src/lib/libsbuf/libsbuf.so.4
www# ldconfig -m /usr/obj/usr/src/lib/libsbuf/

www# /usr/sbin/config GENERIC
/libexec/ld-elf.so.1: Shared object "libc.so.7" not found, required by "config"

www# /usr/sbin/config GENERIC
Kernel build directory is ../compile/GENERIC
Don’t forget to do make cleandepend && make depend”
www# cd ../compile/GENERIC
www# make depend
cc -c -O -pipe -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I../../.. -I../../../contrib/altq -I../../../contrib/ipfilter -I../../../contrib/pf -I../../../dev/ath -I../../../contrib/ngatm -I../../../dev/twa -I../../../gnu/fs/xfs/FreeBSD -I../../../gnu/fs/xfs/FreeBSD/support -I../../../gnu/fs/xfs -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -finline-limit=8000 –param inline-unit-growth=100 –param large-function-growth=1000 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -ffreestanding ../../../i386/i386/genassym.c
cc1: error: unrecognized command line option "-Wno-pointer-sign"
*** Error code 1

Stop in /usr/src/sys/i386/compile/GENERIC.

cd /usr/src/
make buildworld
make buildkernel KERNCONF=SYXIN2

root#>cd /usr/ports
#可能需要更新一下ports tree
#更新命令如下cvsup -g -L 2 -h cvsup.tw.freebsd.org /usr/share/examples/cvsup/ports-supfile
#此过程的时间稍长,你可以去吃顿饭或是去打会游戏。
#找到ImageMagick的路径
root#>make search name=ImageMagick
Port:   ImageMagick-5.5.7.11_1
Path:   /usr/ports/graphics/ImageMagick
Info:   Image processing tools
Maint:  [email protected]
B-deps: XFree86-libraries-4.3.0_6 expat-1.95.6_1 fontconfig-2.2.90_3 freetype2-2.1.5_1 gettext-0.12.1 ghostscript-gnu-7.07_4 gmake-3.80_1 hdf-4.1r5 imake-4.3.0_1 jasper-1.700.2 jbigkit-1.5 jpeg-6b_1 lcms-1.09,1 libfpx-1.2.0.9 libiconv-1.9.1_3 libmpeg2-0.3.1_1 libtool-1.3.5_1 libwmf-0.2.8 libxml2-2.6.2_1 perl-5.6.1_15 pkgconfig-0.15.0 png-1.2.5_2 python-2.3.2_3 tiff-3.6.0
R-deps: XFree86-libraries-4.3.0_6 expat-1.95.6_1 fontconfig-2.2.90_3 freetype2-2.1.5_1 ghostscript-gnu-7.07_4 hdf-4.1r5 imake-4.3.0_1 jasper-1.700.2 jbigkit-1.5 jpeg-6b_1 lcms-1.09,1 libfpx-1.2.0.9 libiconv-1.9.1_3 libmpeg2-0.3.1_1 libwmf-0.2.8 libxml2-2.6.2_1 perl-5.6.1_15 pkgconfig-0.15.0 png-1.2.5_2 python-2.3.2_3 tiff-3.6.0
WWW:    http://www.ImageMagick.org/
#开始安装ImageMagick
root#>cd /usr/ports/graphics/ImageMagick
root#>make install

1 thought on “Freebsd杂

Leave a Reply

Your email address will not be published. Required fields are marked *