FreeBSD: Difference between revisions

From DWIKI
Line 69: Line 69:
*[http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html Rebuilding world]
*[http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html Rebuilding world]


cd /usr/src
make buildworld
make buildkernel KERNCONF=mykernel
make installkernel
or
  portupgrade -P -f -a
  portupgrade -P -f -a



Revision as of 08:42, 2 March 2009

Documentation

NFS

Ports

Filesystems

Networking


Tips and Tricks

  • man intro
  • man tuning
  • mergemaster
  • man pw
sysinstall
cd /sys/i386/conf ; make LINT


Rescue

Snapshots


Kernel modules

kldload kldstat etc

Hardware info

kenv
pciconf -lv
grep -i cpu /var/run/dmesg.boot
sysctl hw.ncpu

Checking resources

systat -pigs
fstat -f /var
systat -vm
iostat

FAQ

Upgrading

cd /usr/src
make buildworld
make buildkernel KERNCONF=mykernel
make installkernel


or

portupgrade -P -f -a

Courier-imap certificates

check out /usr/local/share/mkimapdcert

crontab: temp file must be edited in place

Happens when you set EDITOR=vim. Fix it by setting :set nobackup and :set nowritebackup in .vimrc

ping: sendto: Permission denied

sysctl:

security.jail.allow_raw_sockets: 0

Timezones

  • adjkerntz
  • tzsetup
  • ntp

Ports

Post install messages

/usr/ports/*/*/pkg-message

exclude from csup

To exclude for example /usr/ports/japanese, put in /var/db/refuse

ports/japanese

(or a refuse file in whatever base you defined in supfile)

config options used for a port

/var/db/ports/*/options

ssh taking a long time

In /etc/ssh/sshd_config

UseDNS no

files installed by ports

/var/db/pkg

Using large ( >2T ) drives

gpt create mfid1

create a 'slice' of 200000 sectors (this will automagically create /dev/mfid1p1

gpt add -s 2000000 mfid1

create one taking up the rest (/dev/mfid1p2)

gpt add mfid1


Migrate users/accounts

http://www.ggis.biz/wiki/index.php/FreeBSD_-_Migrate_Users

After editing /etc/master.passwd run

pwd_mkdb /etc/master.passwd 

(careful with this not entirely tested advice )

truss: cannot open /proc/curproc/mem: No such file or directory

kldload procfs
mount_procfs /dev/procfs /proc

But you're supposed to use sysctl?


Networking

Set default route

route add default 10.0.0.1

Delete default route

route delete default


rm: Operation not permitted

ls -lo
chflags noschg