| FreeBSD Basic howto |
| Written by Administrator | |
| Wednesday, 19 December 2007 | |
Very basic FreeBSD HowtoСontents1) System time adjustment Step-by-step algorithm1) System time adjustmentFirst, check your time zone & system time. tzsetup ⇒ United States ⇒ Eastern time To set ntpd ntpdate -B <ntp server addy> Next step, edit your crontab: crontab -u root -e Add line like that: */10 * * * * /usr/sbin/ntpdate -B IP_address >/dev/null Take a note to “B” parameter in in ntpdate.
2) Check your /etc/hosts:127.0.0.1 localhost.localdomain localhost _IP_Address_ your-hostname.your-domain your-hostname As a rule, this procedure is done by DC and you don’t need to do it again. Simply check it. 3) Edit your /etc/make.confsample config of make.conf (FreeBSD 6.2) # Compile options #
“Compile Options” are required only to increase system performance. Also, you must correct CPU type with yours. After editing your /etc/make.conf, you must comment lines for nis support in /etc/nsswitch.conf. Your /etc/nsswitch.conf would look like: group: compat #group_compat: nis hosts: files dns networks: files passwd: compat #passwd_compat: nis shells: files 4) Update your ports tree.I prefer portsnap utility by Colin Persival instead of cvsup: portsnap fetch && portsnap extract
5) Update your sources.Install cvsup-without-gui using ports (I) or package (II): (I) cd /usr/ports/net/cvsup-without-gui && make install clean (II) pkg_add -vr cvsup-without-gui Touch /usr/local/etc/cvsup.src and edit it like that: cvsup.src --- cvsup.src example src-all --- Next step, add to /etc/make.conf lines like shown in example make.conf ---- For sources updating, do: cd /usr/src && make update Add to cron jobs using crontab -u root -e: ### Update Src, Ports 12 0 * * 2 cd /usr/src && make update 22 0 * * 2 cd /usr/ports && make fetchindex
14) Rebuild kernel & base systemCopy GENERIC kernel config no Yourkernel: cp /sys/i386/conf/GENERIC /sys/i386/conf/Yourkernel Also, you may create your kernel config using these instructions: Edit your kernel config file. comment the lines your system don't need The good kernel config to add options PANIC_REBOOT_WAIT_TIME=16 Clear your /usr/obj/* : rm -rf /usr/obj* Compile Yourkernel: make buildkernel KERNCONF=Yourkernel Compile base system: make buildworld Next, install kernel & world: make installkernel KERNCONF=Yourkernel mergemaster -p make installworld mergemaster Reboot system: shutdown -r +3 It is better give +3 minutes if somebody works on server in this time. |
|
| Last Updated ( Tuesday, 04 March 2008 ) |