»¹¼ÇµÃÉÏÒ»´Î¿´µ½¹ØÓÚFreeBSD 5ÓÅ»¯µÄÎÄÕÂÊÇ1ÄêÇ°£¬Ò²ÊÇÎÒ¸Õ¸ÕÆð²½Ñ§UNIXµÄʱºò¡£Ê±¼ä·ÉÊ»£¬ÔÚÕâÒ»ÄêÀïÎÒѧµ½Á˺ܶàFreeBSDºÍUNIXµÄ֪ʶ£¬ÎÒ¶ÔFreeBSDÈçºÎÐÔÄÜ×î´ó»¯¸üÊǸÐÐËȤ¡£Èç½ñFreeBSDÒѾÌæ´úÁËÎÒµÄWindows2000£¬³ÉΪÎÒµçÄÔÀïΨһ¸öOS¡£¾ÑéÃØóŲ»¸Ò¶ÀÏí£¬ÔÚ´ËÔ¸¸úËùÓÐFreeBSD·¢ÉÕÓÑÇд裬ÈçÓв»µ±Ö®´¦£¬»¶ÓÖ¸³öÅúÆÀ¡£
?±¾ÎļÙÉè¶ÁÕßÒѾÔĶÁ¹ýFreeBSD°²×°Êֲᡣ
?ÔĶÁ±¾ÎÄʱ£¬ÇëÎñ±Ø²Î¿¼°²×°ÓÅ»¯ÎÄÕ¡£
?±¾ÎÄ×ñÑGPLÐÒé¡£
?±¾ÎÄ×ñÑBSDLÐÒé¡£
?»¶ÓÆäËû×÷Õß½áºÏ±¾ÎÄÄÚÈÝд³ö¸÷ÖÖFreeBSDÓÅ»¯ÎÄÕ¡£
Ò»¡¢°²×°(sysinstall)
1¡¢DistributionÖУ¬½öÑ¡Ôñminimalºó£¬Ñ¡ÔñCustomization¡£Ìí¼Óman£¬³öÏÖÎÊÌâʱ¿ÉÒԲ鿴ÃüÁî²ÎÊý£»Ìí¼Ósrc£¬Ö®ºócvsup¿ÉÒÔ¼Ó¿ìËٶȣ¬²»±Ø¶ÁÈ¡Öظ´µÄÎļþ¡£
2¡¢UsersÖУ¬Ìí¼ÓÓû§ºó£¬°ÑÓû§Â·¾¶ÖеÄ/home/abc¸ÄΪ/usr/abc¡£ÒòΪ/usrµÄÈÝÁ¿´ó¡£»òÕß»¹¿ÉÒÔͨ¹ýÔö´ó/homeµÄÈÝÁ¿£¬²»¹ý±È½ÏÂé·³¡£
È»ºó£¬Òª°Ñshell¸ÄΪcsh£¬ÎªÁËʹÓ÷½±ã£¨Ò²ÎªÁ˱¾ÎĵÚÆß²¿·ÖµÄÉèÖã©¡£
×¢Ò⣺ҪÆÁ±Îij¸öbooleanÑ¡Ï²¢²»ÊDZê¼Çno»òfalse£¡¶øÊÇÕûÐÐɾµô£¡
1¡¢±àÒëÆ÷Ñ¡Ïî
CPUTYPE=athlon-xp
CFLAGS+= -mfpmath=sse -mmmx -msse -m3dnow -maccumulate-outgoing-args
-minline-all-stringops
##
²»½¨ÒéʹÓÃO2¡¢O3¡¢OsµÄÓÅ»¯£¬ÒòΪ²»ÊÇÈ«²¿Ó¦ÓóÌÐò¿ÉÒÔÎȶ¨¹¤×÷ÓÚO2¡¢O3¡¢Os¡£¿öÇÒ×î¶à½ö»ñµÃ7%µÄ¶îÍâÐÔÄÜ¡£
## CFLAGSµÄĬÈÏΪ"-O1 -pipe"£¬²»ÐèÒª¸²¸Ç£¬ËùÒÔʹÓÃ+=¡£
## ²»½¨ÒéʹÓÃ-f...ϵÁÐÓÅ»¯£¬ÒòΪ²»ÊÇÈ«²¿Ó¦ÓóÌÐò¿ÉÒÔ¶Ô´ËÎȶ¨¹¤×÷¡£
## -mfpmath=sse:
PentiumIII¼æÈݵÄCPU¿ÉÒÔ´ò¿ª-mfpmath=sseÀ´´úÌ洫ͳi387µÄ¸¡µãÔËË㣬¼Ó¿ìËٶȡ£²ÎÔÄCPU²úÆ·ÊÖ²áÀ´È·¶¨CPUÊÇ·ñº¬ÓÐSSE¹¦ÄÜ¡£
## -mfpmath=pni: Pentium4
Prescott¼æÈݵÄCPU¿ÉÒÔ´ò¿ª-mfpmath=pniÀ´´úÌ洫ͳi387µÄ¸¡µãÔËË㣬¼Ó¿ìËٶȡ£²ÎÔÄCPU²úÆ·ÊÖ²áÀ´È·¶¨CPUÊÇ·ñº¬ÓÐPNI¹¦ÄÜ¡£
## -mmmx:
´ò¿ªmmxÖ¸ÁîÀ´Ôö¼Ó´úÂëÐÔÄÜ¡£²ÎÔÄCPU²úÆ·ÊÖ²áÀ´È·¶¨CPUÊÇ·ñº¬ÓÐMMX¹¦ÄÜ¡£ÊÊÓÃÓÚPentiumMMX¼æÈÝCPU¡£
## -msse:
´ò¿ªsseÖ¸ÁîÀ´Ôö¼Ó´úÂëÐÔÄÜ¡£²ÎÔÄCPU²úÆ·ÊÖ²áÀ´È·¶¨CPUÊÇ·ñº¬ÓÐSSE¹¦ÄÜ¡£ÊÊÓÃÓÚPentiumIII¼æÈÝCPU¡£
## -msse2:
´ò¿ªsse2Ö¸ÁîÀ´Ôö¼Ó´úÂëÐÔÄÜ¡£²ÎÔÄCPU²úÆ·ÊÖ²áÀ´È·¶¨CPUÊÇ·ñº¬ÓÐSSE2¹¦ÄÜ¡£ÊÊÓÃÓÚPentium4¼æÈÝCPU¡£
## -mpni:
´ò¿ªpniÖ¸ÁîÀ´Ôö¼Ó´úÂëÐÔÄÜ¡£²ÎÔÄCPU²úÆ·ÊÖ²áÀ´È·¶¨CPUÊÇ·ñº¬ÓÐPNI¹¦ÄÜ¡£ÊÊÓÃÓÚPentium4
Prescott¼æÈÝCPU¡£
## -m3dnow:
´ò¿ª3DNow!Ö¸ÁîÀ´Ôö¼Ó´úÂëÐÔÄÜ¡£²ÎÔÄCPU²úÆ·ÊÖ²áÀ´È·¶¨CPUÊÇ·ñº¬ÓÐ3DNow!¹¦ÄÜ¡£ÊÊÓÃÓÚK6¡¢Athlon¼æÈÝCPU¡£
## -maccumulate-outgoing-args -minline-all-stringops
ͨ¹ý¼õÉÙijЩ¶¯×÷À´ÊµÏÖ¼ÓËÙ£¬¾×÷ÕßʵÑ飬±È½ÏÎȶ¨¡£
CXXFLAGS+= -fmemoize-lookups -fsave-memoized
2¡¢ÏµÍ³±àÒëÑ¡Ïî
KERNCONF=(FILENAME)
## ÄÚºËÅäÖÃÎļþÃû£¬½«(FILENAME)¸ü¸ÄΪ×Ô¼ºµÄÄÚºËÎļþÃû¡£
NOINET6=true
## ¾¡Á¿²»Ê¹ÓÃÓÃIPV6ÐÒé¡£
NOATM=true
## ¾¡Á¿²»Ê¹ÓÃATM£¬±¾Ñ¡Ïî½öÊÊÓÃÓÚ·ÇADSLÓû§¡£
NO_SENDMAIL=true
## ¾¡Á¿²»Ê¹ÓÃSENDMAIL¡£
NOGAMES=true
## ²»°²×°ËùÓÐÓÎÏ·
NO_I4B=true
## ¾¡Á¿²»Ê¹ÓÃISDN For BSD¡£
NO_IPFILTER=true
## ¾¡Á¿²»Ê¹ÓÃIP Filter¡£
BATCH=yes
## °²¾²±àÒ룬±àÒëʱÌø¹ýËùÓÐÌáÎÊ¡£ÊÊÓÃÓÚijЩ¸ôÒ¹Ò»´ÎÐÔ±àÒë³ÌÐòµÄÓû§¡£
3¡¢X-Window±àÒëÑ¡Ïî
XFREE86_VERSION=4
## ¾¡Á¿Ê¹ÓÃ4.3°æ±¾µÄX-Window
WITH_SETUID_LUIT=yes
## ²»Ê¹Óñ¾ÏîµÄ»°,ÔËÐÐxterm»á³öÏÖluit´íÎóµÄÎÊÌâ.
WITH_GTK2=yes
## ¾¡Á¿Ê¹ÓÃGTK2ΪgtkÓ¦ÓóÌÐòµÄÔËÐпâ
USE_MMX_ASM=yes
## ±àÒëXfree86ʱ,¾¡Á¿Ê¹ÓÃMMX´úÂë,½öÊÊÓÃÓÚPentiumMMX¼æÈÝCPU.
USE_3DNOW_ASM=yes
## ±àÒëXfree86ʱ,¾¡Á¿Ê¹ÓÃ3DNOW´úÂë,½öÊÊÓÃÓÚK6¡¢Athlon¼æÈÝCPU.
WITHOUT_KDE_MENUS=yes
## ʹÓÃGNOMEʱ£¬²»Ìí¼ÓKDE³ÌÐòÔڲ˵¥ÉÏ¡£
qianshoux ÓÚ 2006-12-07 09:59:39·¢±í:
Æß¡¢»·¾³ÉèÖÃ(.cshrc)
alias ls ls -GF
## ²ÊÉ«»¯ls
setenv EDITOR ee
## ĬÈϱà¼Æ÷Ϊee
setenv PAGER less
## ĬÈÏ·ÖÒ³Æ÷Ϊless£¬±ÈmoreÒª·½±ã¡£
set nobeep
set prompt = '%n@%/%# '
set filec
set autolist
##
Õ⼸ÐÐÉèÖÃÎÒÏȲ»½âÊÍ£¬²»¹ýÎÒÏàÐÅÄã¿Ï¶¨Ï²»¶£¬×Ô¼ºÈ¥Ñо¿ÄÇÊÇʲô°É¡£ÌرðÊÇ×îºóÒ»ÐС£
°Ë¡¢±àÒëµÄ»º´æ(ccache)
CCACHEÊÇΪ³ÌÐò±àÒëÌṩ»º´æ£¬Í¨¹ý¼õÉÙÖظ´´úÂë±àÒë´ÎÊý£¬¼Ó¿ì±àÒëʱ¼ä¡£
°²×°¹ý³Ì£º
su
cd /usr/ports/devel/ccache/
make install clean
cd /usr/
mkdir ccache
cd /usr/sbin
ln -s /usr/local/bin/ccache gcc
ln -s /usr/local/bin/ccache cc
ln -s /usr/local/bin/ccache c++
ln -s /usr/local/bin/ccache g++
ln -s /usr/local/bin/ccache cpp
echo "setenv CCACHE_DIR /usr/ccache" >> /root/.cshrc
rehash
exit
×îºó¿ÉÒÔͨ¹ýÔËÐÐccache -sÀ´¹Û¿´µ±Ç°±àÒë×´¿ö¡£
ºÃÁË£¬ÏÖÔھͿÉÒÔcvsupϵͳ´úÂëºÍports treeÁË¡£»¹²»¸Ï¿ì¿ªÊ¼±àÒëÄãµÄFreeBSD 5£¿
qianshoux ÓÚ 2006-12-07 09:59:17·¢±í:
autoboot_delay="2"
## ÉèÖÃÆô¶¯µÈ´ýʱ¼äΪ2Ãë¡£
hw.ata.atapi_dma=1
## ´ò¿ªATA33ÒÔÉϽӿڵÄÓ²Å̵ÄDMA´«Ê䣬¼Ó¿ì´æÈ¡Ëٶȡ£
kern.ipc.maxsockets="16384"
## Ôö´óÏ̼߳äÌ×½ÓÊýÁ¿
net.inet.tcp.tcbhashsize="2048"
## Ôö´óTCP¿ØÖÆ¿éÊýÁ¿
beastie_disable="YES"
## ¹Ø±ÕС¶ñħͼÏñÆô¶¯²Ëµ¥
background_dhclient="YES"
## ²»µÈ´ýDHCPÖ´ÐÐÍê±Ï£¬¼Ó¿ìÆô¶¯Ëٶȡ£
keyrate="fast"
## ×î´ó»¯¼üÅÌËÙÂÊ
sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
## ¹Ø±ÕSENDMAIL
clear_tmp_enable="YES"
## °´Ê±Çå³ý/var/tmpÎļþ
tcp_extensions="YES"
## À©Õ¹TCP
## ²»ÔÊÐíÓû§¿´µ½ËùÓÐϵͳ½ø³Ì
kern.ipc.maxsockbuf=8388608
## Ïß³ÌÌ×½Ó×Ö»º³åÇø
kern.ipc.shm_use_phys=1
## ½öΪÏß³ÌÌṩÎïÀíÄÚ´æÖ§³Ö£¬ÐèÒª256Õ×ÒÔÉÏÄÚ´æ¡£
kern.ipc.shmmax=67108864
## Ï߳̿ÉʹÓõÄ×î´ó¹²ÏíÄÚ´æ
kern.ipc.shmall=32768
## ×î´óÏß³ÌÊýÁ¿
## ³ÌÐò±ÀÀ£Ê±²»¼Ç¼
net.local.stream.recvspace=65536
## ±¾µØÊý¾ÝÁ÷½ÓÊպͷ¢ËÍ¿Õ¼ä
net.local.dgram.maxdgram=16384
## ±¾µØÊý¾Ý°ü×î´óÊýÁ¿
net.local.dgram.recvspace=65536
## ±¾µØÊý¾Ý°ü½ÓÊÕ¿Õ¼ä
net.inet.tcp.rfc1644=1
net.inet.tcp.rfc3042=1
net.inet.tcp.rfc3390=1
## ijЩ¼Ó¿ìÍøÂçÐÔÄܵÄÐÒ飬Çë²Î¿¼RFCÎÄÕ¡£
net.inet.tcp.mssdflt=1460
## Êý¾Ý°üÊý¾Ý¶Î´óС£¬ADSLΪ1452¡£
net.inet.tcp.recvspace=1048576
## ÍøÂçÊý¾Ý½ÓÊպͷ¢ËÍ¿Õ¼ä
net.inet.tcp.inflight_enable=1
## ΪÍøÂçÊý¾ÝÁ¬½ÓʱÌṩ»º³å
net.inet.tcp.minmss=1460
## Êý¾Ý°üÊý¾Ý¶Î×îСֵ£¬ADSLΪ1452¡£
net.inet.raw.maxdgram=65536
## ±¾µØÊý¾Ý×î´óÊýÁ¿
net.inet.raw.recvspace=65536
## ±¾µØÊý¾ÝÁ÷½ÓÊÕ¿Õ¼ä
qianshoux ÓÚ 2006-12-07 09:58:55·¢±í:
4¡¢¶àýÌå±àÂëÑ¡Ïî
WITH_CDPARANOIA=yes
WITH_AALIB=yes
WITH_ESOUND=yes
WITH_FAAD=yes
WITH_FLAC=yes
WITH_FREETYPE=yes
WITH_GDKPIXBUF=yes
WITH_GSM=yes
WITH_HERMES=yes
WITH_JPEG=yes
WITH_LADSPA=yes
WITH_LAME=yes
WITH_LIBA52=yes
WITH_LIBAUDIOFILE=yes
WITH_LIBCACA=yes
WITH_LIBFAME=yes
WITH_LIBMIKMOD=yes
WITH_LIBMPEG2=yes
WITH_LIBMUSICBRAINZ=yes
WITH_LIBSHOUT=yes
WITH_LIBSIDPLAY=yes
WITH_LIBSNDFILE=yes
WITH_LIBTHEORA=yes
WITH_MAD=yes
WITH_NAS=yes
WITH_PANGO=yes
WITH_PNG=yes
WITH_SDL=yes
WITH_SMOOTHWAVE=yes
WITH_SPEEX=yes
WITH_SWFDEC=yes
WITH_VORBIS=yes
WITH_VORBISIDEC=yes
WITH_XINE=yes
WITH_XVID=yes
## ÒÔÉÏËùÓжàýÌåÑ¡Ïî½öÔÚÓ¦ÓóÌÐòÖ§³Öʱ´ò¿ª¡£
4¡¢Ó¦ÓóÌÐò±àÒëÑ¡Ïî
WANT_HUGE_STACK_SIZE=yes
## ΪPython´úÂëµÄÓ¦ÓóÌÐòÌṩ¾Þ´óµÄStack¡£
WITH_GDM=yes
## ΪijЩ´°¿Ú¹ÜÀíÆ÷ÌṩGDMÁ´½Ó¡£
WITHOUT_MAILNEWS=yes
## È¡ÏûMozillaµÄÓʼþÐÂÎŹ¦ÄÜ£¬¼Ó¿ì±àÒëʱ¼ä¡£
WITHOUT_COMPOSER=yes
## È¡ÏûMozillaµÄÍøÒ³±à¼¹¦ÄÜ£¬¼Ó¿ì±àÒëʱ¼ä¡£
WITHOUT_LDAP=yes
## È¡ÏûMozillaµÄLDAP¹¦ÄÜ£¬¼Ó¿ì±àÒëʱ¼ä¡£
WITHOUT_CHATZILLA=yes
## È¡ÏûMozillaµÄIRCÁÄÌ칦ÄÜ£¬¼Ó¿ì±àÒëʱ¼ä¡£
WITHOUT_XMLTERM=yes
## È¡ÏûMozillaµÄXMLÖն˹¦ÄÜ£¬¼Ó¿ì±àÒëʱ¼ä¡£
#WITH_RTC=yes
## ΪijЩӦÓóÌÐòÌṩʵʱʱÖÓÖ§³Ö£¬µ«¿ÉÄÜ»áÔì³ÉijЩ¶àýÌå³ÌÐò²»Îȶ¨¡£
WITH_GLX=yes
## ΪijЩӦÓóÌÐòÌṩGLX¼ÓËÙ»æͼ֧³Ö¡£
WITH_TTF_BYTECODE_ENABLED=yes
## ΪijЩӦÓóÌÐòÌṩ˫×Ö½ÚÖ§³Ö¡£
WITH_OPTIMIZED_CFLAGS=yes
WITH_OPTIMIZED_CXXFLAGS=yes
WITH_OPTIMIZE=yes
## ¾¡Á¿Ê¹Óøü¸ß¼¶±àÒëÓÅ»¯
Èý¡¢ÄÚºËÓÅ»¯(make kernel)
options PQ_HUGECACHE
## Ϊ1024k¶þ¼¶»º´æµÄCPUÌṩ֧³Ö
options PQ_LARGECACHE
## Ϊ512k¶þ¼¶»º´æµÄCPUÌṩ֧³Ö
options PQ_MEDIUMCACHE
## Ϊ256k¶þ¼¶»º´æµÄCPUÌṩ֧³Ö
options PQ_SMALLCACHE
## Ϊ128k¶þ¼¶»º´æµÄCPUÌṩ֧³Ö
options CPU_ATHLON_SSE_HACK
options CPU_ENABLE_SSE
## ΪAthlonϵÁÐCPUÌṩSSEÖ§³Ö
options CPU_SUSP_HLT
## ´ò¿ªCPU¿ÕÏнÚÄÜ¡£
options CPU_UPGRADE_HW_CACHE
options CPU_WT_ALLOC
options NO_MEMORY_HOLE
## AMDϵÁÐCPUÓÅ»¯
##
ijЩÏÔ¿¨¿ÉÒÔ´ò¿ªDRMÖ§³ÖÀ´¼Ó¿ìÏÔʾËٶȣ¬Çë²Î¿¼/usr/src/sys/conf/NOTESºÍ/usr/src/sys/i386/conf/NOTES£¬±¾ÎÄÊ¡ÂÔ¡£