Thursday, March 9, 2017
FreeBSD statistics
FreeBSD statistics
On this page I provide a list of statistical tools for FreeBSD to monitor your system. There are a lot of them, so if I missed one please mail me (ronald at echteman dot nl).
| fstat | The fstat utility identifies open files. |
| gstat | The gstat utility can be used to monitor I/O transactions of geom(4) devices. |
| iostat | The iostat utility displays kernel I/O statistics on terminal, device and cpu operations. |
| netstat | The netstat command symbolically displays the contents of various network-related data structures. |
| nfsstat | The nfsstat command displays statistics kept about NFS client and server activity. |
| pstat | The pstat utility displays open file entry, swap space utilization, terminal state, and vnode data structures. |
| top | Top displays the top processes on the system and periodically updates this information. |
| systat | The systat utility displays various system statistics in a screen oriented fashion. |
| vmstat | The vmstat utility reports certain kernel statistics kept about process, virtual memory, disk, trap and cpu activity. |
- fstat
The fstat utility identifies open files.USER CMD PID FD MOUNT INUM MODE SZ|DV R/W
ronald fstat 1087 root / 2 drwxr-xr-x 512 r
ronald fstat 1087 wd /usr 824321 drwxr-xr-x 3584 r
ronald fstat 1087 text /usr 1038656 -r-xr-sr-x 14624 r
ronald fstat 1087 0 /dev 126 crw--w---- ttyp1 rw
ronald fstat 1087 1 /dev 126 crw--w---- ttyp1 rw
ronald fstat 1087 2 /dev 126 crw--w---- ttyp1 rw
ronald fstat 1087 3 /dev 15 crw-r----- mem r
ronald fstat 1087 4 /dev 16 crw-r----- kmem r
ronald fstat 1087 5 / 8700 -rw-r--r-- 40960 r
ronald vim 1025 root / 2 drwxr-xr-x 512 r
ronald vim 1025 wd /tmp 2 drwxrwxrwt 512 r
ronald vim 1025 text /usr 329983 -rwxr-xr-x 1266616 r
ronald vim 1025 0 /dev 129 crw--w---- ttyp3 rw
ronald vim 1025 1 /dev 129 crw--w---- ttyp3 rw - gstat
The gstat utility can be used to monitor I/O transactions of geom(4) devices.dT: 0.504 flag_I 500000us sizeof 240 i -1
L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name
1 91 91 964 3.6 0 0 0.0 33.2| ad0
1 91 91 964 3.7 0 0 0.0 33.4| ad0s1
0 0 0 0 0.0 0 0 0.0 0.0| acd0
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1a
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1b
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1c
0 0 0 0 0.0 0 0 0.0 0.0| ad0s1d
1 91 91 964 3.7 0 0 0.0 33.7| ad0s1e
0 0 0 0 0.0 0 0 0.0 0.0| md0 - iostat
The iostat utility displays kernel I/O statistics on terminal, device and cpu operations.tty ad0 fd0 cpu
tin tout KB/t tps MB/s KB/t tps MB/s us ni sy in id
16 567 13.22 17 0.22 0.00 0 0.00 9 0 3 1 86
821 880 64.00 0 0.02 0.00 0 0.00 8 0 3 1 89
844 864 0.00 0 0.00 0.00 0 0.00 7 0 3 1 89
945 965 64.00 0 0.02 0.00 0 0.00 6 0 4 1 89
961 981 64.00 0 0.02 0.00 0 0.00 6 0 3 3 88
961 981 0.00 0 0.00 0.00 0 0.00 6 0 2 1 90
961 981 64.00 0 0.02 0.00 0 0.00 8 0 2 1 89 - netstat
The netstat command symbolically displays the contents of various network-related data structures. There are a number of output formats, depending on the options for the information presented.Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 192.168.0.2.63566 193.69.116.13.http CLOSE_WAIT
tcp4 0 0 192.168.0.2.52783 216.239.41.104.http ESTABLISHED
tcp4 0 0 192.168.0.2.49413 solo.cs.vu.nl.imap ESTABLISHED
tcp4 0 0 192.168.0.2.65519 ronald.echteman..imap ESTABLISHED
tcp4 0 0 192.168.0.2.49324 ronald.echteman..imap ESTABLISHED
tcp4 0 0 192.168.0.2.50677 192.168.0.1.ssh ESTABLISHED
udp4 0 0 localhost.ntp *.*
udp4 0 0 192.168.0.2.ntp *.*
udp4 0 0 localhost.domain *.*
udp4 0 0 192.168.0.2.domain *.*
Active UNIX domain sockets
Address Type Recv-Q Send-Q Inode Conn Refs Nextref Addr
c15fe348 stream 0 0 0 c15fed20 0 0 /tmp/.X11-unix/X0
c15fed20 stream 0 0 0 c15fe348 0 0
c19ed118 stream 0 0 0 c15fd1a4 0 0
c15fd1a4 stream 0 0 0 c19ed118 0 0
c15fe118 stream 0 0 0 c15fe3d4 0 0 - nfsstat
The nfsstat command displays statistics kept about NFS client and server activity.Client Info:
Rpc Counts:
Getattr Setattr Lookup Readlink Read Write Create Remove
0 0 0 0 0 0 0 0
Rename Link Symlink Mkdir Rmdir Readdir RdirPlus Access
0 0 0 0 0 0 0 0
Mknod Fsstat Fsinfo PathConf Commit
0 0 0 0 0
Rpc Info:
TimedOut Invalid X Replies Retries Requests
0 0 0 0 0
Cache Info:
Attr Hits Misses Lkup Hits Misses BioR Hits Misses BioW Hits Misses
0 0 0 0 0 0 0 0
BioRLHits Misses BioD Hits Misses DirE Hits Misses
0 0 0 0 0 0
Server Info:
Getattr Setattr Lookup Readlink Read Write Create Remove
0 0 0 0 0 0 0 0
Rename Link Symlink Mkdir Rmdir Readdir RdirPlus Access
0 0 0 0 0 0 0 0
Mknod Fsstat Fsinfo PathConf Commit
0 0 0 0 0
Server Ret-Failed
0
Server Faults
0
Server Cache Stats:
Inprog Idem Non-idem Misses
0 0 0 0
Server Write Gathering:
WriteOps WriteRPC Opsaved
0 0 0 - pstat
The pstat utility displays open file entry, swap space utilization, terminal state, and vnode data structures.LINE RAW CAN OUT IHIWT ILOWT OHWT LWT COL STATE SESS PGID DISC
ttyv0 0 0 0 7680 6720 2052 256 0 OCc 683 694 term
ttyv1 0 0 0 7680 6720 2052 256 0 OCc 684 711 term
ttyv2 0 0 0 7680 6720 2052 256 7 OCc 685 685 term
ttyv3 0 0 0 7680 6720 2052 256 7 OCc 686 686 term
ttyv4 0 0 0 7680 6720 2052 256 7 OCc 687 687 term
ttyv5 0 0 0 7680 6720 2052 256 7 OCc 688 688 term
ttyv6 0 0 0 7680 6720 2052 256 7 OCc 689 689 term
ttyv7 0 0 0 7680 6720 2052 256 7 OCc 690 690 term
ttyv8 0 0 0 7680 6720 1296 256 2 OCc 0 0 term
0,0 0 0 0 0 0 0 0 0 - 0 0 term
0,0 0 0 0 0 0 0 0 0 - 0 0 term
0,0 0 0 0 0 0 0 0 0 - 0 0 term
0,0 0 0 0 0 0 0 0 0 - 0 0 term
0,0 0 0 0 0 0 0 0 0 - 0 0 term
0,0 0 0 0 0 0 0 0 0 - 0 0 term
0,0 0 0 0 0 0 0 0 0 - 0 0 term
consolectl 0 0 0 7680 6720 1296 256 0 - 0 0 term
ttyp0 0 0 0 7680 6720 2052 256 0 OCc 729 943 term
ttyp1 0 0 76 7680 6720 2052 256 0 OCc 754 1279 term
ttyp2 0 0 0 7680 6720 2052 256 96221 OCc 778 1217 term
ttyp3 0 0 0 7680 6720 2052 256 0 OCc 807 807 term
cuaa0 0 0 0 7680 6720 1296 256 336 OCcXl 0 0 term
ttyp4 0 0 0 7680 6720 2052 256 0 OCc 1210 1216 term - top
Top displays the top processes on the system and periodically updates this information.last pid: 1421; load averages: 0.02, 0.08, 0.08 up 0+01:42:59 11:49:46
61 processes: 1 running, 60 sleeping
CPU states: 5.4% user, 0.0% nice, 1.2% system, 0.0% interrupt, 93.4% idle
Mem: 83M Active, 213M Inact, 62M Wired, 13M Cache, 48M Buf, 824K Free
Swap: 743M Total, 743M Free
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
1216 ronald -8 0 6844K 1048K pcmwr 1:25 2.34% 2.34% mpg123
734 ronald 76 0 51104K 44804K select 2:33 0.00% 0.00% opera
710 ronald 76 -10 17292K 16096K select 2:29 0.00% 0.00% XFree86
777 ronald 76 0 4888K 3280K select 0:46 0.00% 0.00% xterm
723 ronald 76 0 6588K 4236K select 0:14 0.00% 0.00% icewm
1218 root 5 0 1256K 840K ttyin 0:06 0.00% 0.00% tip
806 ronald 76 0 4888K 3344K select 0:05 0.00% 0.00% xterm
753 ronald 76 0 5284K 3712K select 0:03 0.00% 0.00% xterm
521 root 76 0 1588K 1080K select 0:00 0.00% 0.00% ntpd
727 ronald 76 0 4904K 3252K select 0:00 0.00% 0.00% xterm
1410 ronald 76 0 7276K 4652K select 0:00 0.00% 0.00% vim
724 ronald 76 0 2564K 1580K select 0:00 0.00% 0.00% ssh-agent
754 ronald 5 0 2192K 1676K ttyin 0:00 0.00% 0.00% bash
807 ronald 8 0 2196K 1708K wait 0:00 0.00% 0.00% bash
1209 ronald 76 0 4888K 3648K select 0:00 0.00% 0.00% xterm
684 root 8 0 1616K 1164K wait 0:00 0.00% 0.00% login
328 bind 76 0 2760K 2076K select 0:00 0.00% 0.00% named - systat
The systat utility displays various system statistics in a screen oriented fashion.6 users Load 0.08 0.23 0.26 Aug 12 10:47
Mem:KB REAL VIRTUAL VN PAGER SWAP PAGER
Tot Share Tot Share Free in out in out
Act 81112 5180 147268 9244 24120 count
All 376852 6864 2954884 12200 pages
Interrupts
Proc:r p d s w Csw Trp Sys Int Sof Flt cow 386 total
3 56 645 17 721 642 14 57968 wire 250 0: clk
81664 act 1: atkb
1.2%Sys 0.8%Intr 0.8%User 0.0%Nice 97.2%Idl 217284 inact 6: fdc0
| | | | | | | | | | 20720 cache 7: ppc0
= 3400 free 128 8: rtc
daefr 7 11: pcm
Namei Name-cache Dir-cache prcfr 12: psm
Calls hits % hits % react 13: npx
pdwak 1 14: ata
zfod pdpgs 15: ata
Disks ad0 fd0 ofod intrn
KB/t 16.00 0.00 %slo-z 48784 buf
tps 1 0 tfree 1 dirtybuf
MB/s 0.02 0.00 26886 desiredvnodes
% busy 0 0 20241 numvnodes
3786 freevnodes - vmstat
The vmstat utility reports certain kernel statistics kept about process, virtual memory, disk, trap and cpu activity.procs memory page disks faults cpu
r b w avm fre flt re pi po fr sr ad0 fd0 in sy cs us sy id
1 2 0 138200 20520 48 0 0 0 81 41 0 0 809 1780 1151 10 5 86
0 2 0 138200 20520 1 0 0 0 1 0 0 0 633 514 590 1 1 98
0 2 0 138200 20520 0 0 0 0 0 0 0 0 632 469 587 0 1 98
0 2 0 138200 20520 0 0 0 0 0 0 0 0 687 681 716 1 2 97
0 2 0 138200 20520 0 0 0 0 1 0 1 0 673 704 686 1 1 98
2 3 0 139372 20176 79 0 0 0 46 0 3 0 644 1017 654 2 3 95
0 3 0 139432 18364 12 0 0 0 7 0 67 0 701 14122 2141 56 23 20
2 2 0 139868 16748 37 0 0 0 0 0 35 0 667 12963 2603 66 20 13
2 2 0 139920 15648 5 0 0 0 69 0 50 0 682 15063 1930 65 23 12
0 2 0 138200 14104 6 0 0 0 262 0 124 0 759 10485 1937 30 16 55
Available link for download
Saturday, March 4, 2017
FreeBSD ä¸å è£ é ç½ ä¸ä½¿ç¨ ntfs 3g fusefs ntfs
FreeBSD ä¸å è£ é ç½ ä¸ä½¿ç¨ ntfs 3g fusefs ntfs
The ntfs-3g driver is an open source, freely available read/write NTFS
driver, which provides safe and fast handling of the Windows XP, Windows
Server 2003 and Windows 2000 filesystems. Almost the full POSIX filesystem
functionality is supported, the major exceptions are changing the file
ownerships and the access rights.
WWW: http://www.ntfs-3g.org/
Required To Build: sysutils/fusefs-libs, devel/libtool15
Required To Run: sysutils/fusefs-kmod
Required Libraries: sysutils/fusefs-libs, devel/libublio, converters/libiconv
To install the port: cd /usr/ports/sysutils/fusefs-ntfs/ && make install clean
To add the package: pkg_add -r fusefs-ntfs
Configuration Options ===> The following configuration options are available for fusefs-ntfs-1.2506:
LOCK=on (default) "Lock the device when mounting (avoids access)"
UBLIO=on (default) "Enable user space cache for improved speed"
===> Use make config to modify these settingsMaster Sites:
http://www.ntfs-3g.org/
ftp://ftp.freebsd.org/pub/FreeBSD/ports/distfiles/
Usage
If there was no error during installation then the NTFS volume can be mounted in read-write mode for everybody as follows. Unmount the volume if it had already been mounted, replace /dev/sda1 and /mnt/windows, if needed.
mount -t ntfs-3g /dev/sda1 /mnt/windows
Please see the ntfs-3g manual page for more options and examples. You can also make NTFS to be mounted during boot by adding the following line to the end of the /etc/fstab file:
/dev/sda1 /mnt/windows ntfs-3g defaults 0 0
???????1???ntfs-3g?
??# cd /usr/ports/sysutils/fusefs-ntfs
??# make install clean
??2???fuse???
??# ee /etc/rc.conf
??????????
??fusefs_enable="YES"
??????
??# ee /boot/loader.conf
??????????
??fuse_load="YES"
???????
???????????fusefs????fuse??????
??# shutdown -r now
??3???ntfs???
???????USB???????/dev????da0?ntfs????da0s1?????????????????
??# ntfs-3g /dev/da0s1 /mnt/xp
???? ntfs:
# ntfs-3g /dev/hda1 /media/vista -o silent,umask=0,locale=zh_CN.utf8
????????? /etc/fstab:
/dev/hda1 /media/vista ntfs-3g silent,umask=0,locale=zh_CN.utf8 0 0 (Comment this)
??ntfs-3g??ntfs??????????
???????????
locale=zh_CN.UTF-8
?? /etc/rc.conf
defaultrouter="192.168.0.1"
hostname="www.huage.org"
ifconfig_fxp0="inet 192.168.0.3 netmask 255.255.255.0"
keymap="us.iso"
moused_enable="YES"
moused_port="/dev/psm0"
moused_type="auto"
fusefs_enable="YES" # ntfs??????
fsck_y_enable="YES"
sshd_enable="YES"
oss_enable="YES" (?)
dbus_enable="YES" # gnome??
hald_enable="YES" # gnome??
gdm_enable="YES" # ???gnome
/etc/profile
LANG="en_US.UTF-8"; export LANG
LC_CTYPE="zh_CN.UTF-8"; export LC_CTYPE
XMODIFIERS=@im=fcitx; export XMODIFIERS
???
freebsd# mount -t ntfs /dev/ad4s1 /mnt/windows
mount: /dev/ad4s1 : Operation not supported by device
or:
freebsd# mount -t ntfs-3g /dev/ad4s1 /mnt/windows
mount: /dev/ad4s1 : Operation not supported by device
?????????????????
???
??? ntfs-3g /dev/ad4s1 /mnt/windows ??????
The FreeBSD mount command has a known problem. Until it gets fixed, please call ntfs-3g directly (make sure the ntfs-3g binary is ivokable from the $PATH):
> Make sure your dependencies are correct:> $ ls /var/db/pkg|grep fuse> fusefs-kmod-0.3.9.p1 <<<<> fusefs-libs-2.7.0_1> fusefs-sshfs-1.8>
fuse-0.10.0.2_1
fuse-utils-0.10.0.1
fusefs-gnome-vfs-0.1_3
fusefs-kmod-0.3.9.p1.20080208_6
fusefs-libs-2.7.4
fusefs-ntfs-2009.4.4
fusefs-sshfs-2.2
add "fusefs_enable=YES" to rc.conf , install fusefs-sshfs from the ports tree. And the ports system installed
fusefs-kmod.
??????
NTFS-3G? ???????????????? /usr/ports/sysutils/fusefs-ntfsAvailable link for download
FreeBSD Warning was not properly dismounted
FreeBSD Warning was not properly dismounted
Type "fsck -y" this will try to fix the file system you broke by hitting the power button. Once fsck is done type "fastboot". Do not flick the power ok?
Next time you want to turn off your pc try "shutdown -p now" mkay?
Available link for download
Friday, February 17, 2017
FreeBSD Ports
FreeBSD Ports
1?????? tarball?
??????? tarball ???????? make fetch ???
????????? port?? editors/joe ???????
| ??: |
| cd /usr/ports/editors/joe/ make fetch |
???? joe ? tarball ??? /usr/ports/distfiles/ ????
?????????? ports ??????? ports ? tarball??
systuils/portupgrade ???????
| ??: |
| cd /usr/ports/systuils/portupgrade/ make fetch-recursive |
????? ports ? tarball ???????? ports ? tarball???? /usr/ports/distfiles/ ????
??????????? ports ? tarball ???
| ??: |
| cd /usr/ports/ make fetch |
???????? ports ? tarball ??? /usr/ports/distfiles/ ????
????????? ftp ??? ports ? tarball ???
| ??: |
| cd /usr/ports/ftp/ make fetch |
?????? ftp ??? ports ? tarball ??? /usr/ports/distfiles/
????
2???????? tarball????
??????? patch/?? ????????????????
? editors/joe ???????
| ??: |
| cd /usr/ports/editors/joe/ make extract |
?? tarball??? /usr/ports/editors/joe/work/ ????
3???????? tarball ???????? patch?
???? 2 ?????????????????? patch ??? patch ??
????? editors/joe ???????
| ??: |
| cd /usr/ports/editors/joe/ make patch |
?? tarball??? /usr/ports/editors/joe/work/ ??????? patch ?
????? patch?
4????????? port?
??????????????????????? port?
? editors/joe ???????
| ??: |
| cd /usr/ports/editors/joe/ make install |
????????????? joe ????????????????????
???????????????? FAQ 8 ???????????
| ??: |
| cd /usr/ports/editors/joe/ #make clean |
?????????? ports ????????????? ports ?????
????
| ??: |
| cd /usr/ports/ #make clean |
5????????? port?????(package)???
???????????????????????????????????
??????????????????? package ???????
? editors/joe ???????
| ??: |
| cd /usr/ports/editors/joe/ #make package |
????????????? joe ??????????(package)???
package ???? /usr/ports/editors/joe/ ???????????????
?????????
| ??: |
| mkdir -p /usr/ports/packages/All/ |
????? packages ?????????????????????????
??????????????????? ???????????????
? FAQ 8 ???????????
| ??: |
| cd /usr/ports/editors/joe/ make package clean |
6??????? port????????? ports ??????
?? FAQ 5 ?????? port ??????????? ports ??????
??????????? ???????????? port ???????
ports???????? ports ?????????? packages ??? ???
? ports ? packages ????
? sysutils/portupgrade ???????
| ??: |
| cd /usr/ports/sysutils/portupgrade/ make DEPENDS_TARGET=package package |
??????? portupgrade ????? ports ?????????????
7??????????? port ???
???????????????????????????
? editors/joe ????
| ??: |
| cd /var/db/pkg/ pkg_create -b joe-{???} |
?????? port ??????? /var/db/pkg/ ????
8????? ports ?????????????
??? port ??????????????????(work)????????
??????????????????? ??????
? editors/joe ???????
| ??: |
| cd /usr/ports/editors/joe/ make clean |
????????? ports ????????
| ??: |
| cd /usr/ports/ make clean |
????????? ftp ???????????
| ??: |
| cd /usr/ports/ftp/ make clean |
9????? ports ???????????????????? tarball?
? FAQ 8 ???????????????????(work)???????
ports ?????? tarball ??(???? tarball ?????
? /usr/ports/distfiles/)????? tarball ?????
? editors/joe ???????
| ??: |
| cd /usr/ports/editors/joe/ make distclean |
make distclean ?????? make clean ?????????????
tarball ??????M??????????????
????????? ports ??????? tarball ???
| ??: |
| cd /usr/ports/ make distclean |
????????? ftp ?????????? tarball???
| ??: |
| cd /usr/ports/ftp/ make distclean |
10?????? ports ???????/??????
??? ports ??????????/??????
? mail/p5-Mail-SpamAssassin ???????
| ??: |
| cd /usr/ports/mail/p5-Mail-SpamAssassin/ make all-depends-list #????????? make pretty-print-build-depends-list #???????????? make pretty-print-run-depends-list #??????????????? |
11????????? ports?
? editors/joe ???????
| ??: |
| cd /usr/ports/editors/joe/ make deinstall |
???? pkg_delete
| ??: |
| cd /var/db/pkg/ pkg_delete joe-{version} |
?????????????????????????????????
| ??: |
| cd /var/db/pkg/ pkg_delete -f joe-{version} |
??????????????????????
???????????FAQ 43
12??????????? ports?
? sysutils/portupgrade ???????
| ??: |
| cd /usr/ports/sysutils/portupgrade/ make deinstall-depends |
???????????????????????????? FAQ 10 ???
????
???? pkg_delete
| ??: |
| cd /var/db/pkg/ pkg_delete -r portupgrade-{version} |
???????????FAQ 43
| ??: |
| 13???????????? ports? |
??????????????????????? editors/joe ?????
??
| ??: |
| cd /usr/ports/editors/joe/ make deinstall make clean make install ? make reinstall |
14????????? ports?
??????? ports collection ??????? "ldap" ??? ports?
??
| ??: |
| cd /usr/ports/ make search key=ldap |
?????? ftp ??? ports ??????? "ldap" ??? ports???
| ??: |
| cd /usr/ports/ftp/ make search key=ldap |
????????????? key ?? name ?????????? ports ?
??????????????? "ldap"? ??
| ??: |
| cd /usr/ports/ make search name=ldap |
????? ftp ??? ports ????????? "ldap" ??? ports?
??
| ??: |
| cd /usr/ports/ftp/ make search name=ldap |
15????????? ports?
??????????????????????????? port??????
???FAQ 11?FAQ 12?FAQ 13?????? port?????????FAQ 4?
FAQ 5?
? editors/joe ????? FAQ 11 ? FAQ 4 ??????
| ??: |
| cd /var/db/pkg/ pkg_delete joe-{version} cd /usr/ports/editors/joe/ make install |
??
| ??: |
| cd /usr/ports/editors/joe/ make clean make reinstall |
16?????????????????
???????????????
| ??: |
| pkg_info |
17???????????????????????
????? FAQ 16 ?
| ??: |
| pkg_info | grep |
18?????????????????
????? /usr/local/bin/joe ????????????
| ??: |
| pkg_info -W /usr/local/bin/joe |
?????????????????????? FreeBSD ????
19?????????????????
????????????? joe ??????????
| ??: |
| pkg_info -L /var/db/pkg/joe-{version} |
20???????? ports?
?????????????????????????????
???????? CVS ?????????????????????????
???????????????????????????? FreeBSD ports
CVS repository??????? Freshports ??? FreeBSD ? Mailing
FreeBSD cvs ?? FreeBSD ports cvsweb?
?????????????????? CVS tag????? ports ? CVS
tag ??? /usr/share/examples/cvsup/ports-supfile ??????
2002/10/05 ??????
| ??: |
| # vi /usr/share/examples/cvsup/ports-supfile ****************************************** default date=2002.10.05.00.00.00 #? date ???? |
?????? CVSup ???????? CVSup (make update)???? ports
collections ??????????????? ???????? ports
collections ?????????
?????????? ports ???????????????????
lang/perl5.8 ????????? lang ???????
| ??: |
| # vi /usr/share/examples/cvsup/ports-supfile ****************************************** #ports-all #? ports-all ???? ports-lang #???? |
????? CVSup??????????????????? ports?
??????
21????? ports Mk?
Mk (/usr/ports/Mk/) ??? ports ????????????? ports
collections ?????? Mk ???????? ?????? Mk ?????
| ??: |
| cd /usr/src/ make update cd /usr/src/share/mk make install |
22??????? ports ??? sed -i ????
?? BSD style ? sed ???? BSD ????? sed ???? ports ???
????? sed ???????????? ????????? sed_inplace
(textproc/sed_inplace)????????????? ports?
| ??: |
| cd /usr/ports/???/???/ make -DUSE_REINPLACE install |
23???????????? ports?
ports collection ????????????? ports collections ????
???????????????????? ???????????????
?????
| ??: |
| pkg_version -c |
24????? ports system ??? ports ?????????
??? ports collections ??????????????? Makefile ???
???? sysutils/portupgrade ???
???? /usr/ports/sysutils/portupgrade/Makefile ????
???????????????????????
?? sysutils/portupgrade ??? NOPORTDOCS???
| ??: |
| cd /usr/ports/sysutils/portupgrade/ make -DNOPORTDOCS install # make NOPORTDOCS=yes install ?? |
????? ports ???? NOPORTDOCS ?????????????
?????????? ports ?????????????????????
ports ????????????????? ??????????????
??
| ??: |
| cd /usr/ports/sysutils/portupgrade/ grep defined Makefile |
???????????????????????????????????
??????????????????
25????????? ports ????
? FAQ 24 ?????? ports collections ???????????????
??????????? ????? ports collections ?????????
???????????? ftp/pure-ftpd ??????? inetd ?????
???????? ports collections ?????????????? ???
?????
| ??: |
| cd /usr/ports/ftp/pure-ftpd/ make CONFIGURE_ARGS+="--without-inetd" install |
26????? ports ??????
?? ports collecions ???????? (/usr/local/)?????????
???????????????????? ? editors/joe ?????
| ??: |
| cd /usr/ports/editors/joe/ make PREFIX=/usr install |
?? joe ???????? /usr ?????????? /usr/local ????
29????? packages?
?? FreeBSD ? packages ?? .tgz ??????????? packages ??
?? pkg_add?????? joe ? tgz?
| ??: |
| pkg_add joe-{version}.tgz |
30??????? packages?
???? packages ????? packages ????????????????
? packages ??????? ???????? packages ?????????
???? packages ??????????????????????????
??????? packages ????????????? joe ? tgz?
| ??: |
| pkg_add -f joe-{version}.tgz |
31????? packages ??? packages ???????
???? packages ????? packages ????????????????
? packages ??????? ?? packages ??? packages ???????
????????? portupgrade ????? packages?
| ??: |
| pkg_info -r portupgrade-{version}.tgz |
32??????? packages?
??????????? PACKAGEROOT???
setenv PACKAGEROOT ftp://ftp.cn.freebsd.org #?? PACKAGEROOT ? ftp.cn.freebsd.org ??
???????? PACKAGESITE????????? packages ???????
?????????????????
? ftp.cn.freebsd.org i386 ? current pakcages ???
setenv PACKAGESITE ftp://ftp.cn.freebsd.org/pub/FreeBSD/ports/i386/packages-current/Latest/
???????????????????????
????? packages ????? portupgrade ?????
| ??: |
| pkg_add -r portupgrade |
??????? ftp.cn.freebsd.org ????? portupgrade ??? packages ????
33????? INDEX ????
4.x ? INDEX ?? /usr/ports/INDEX?5.x ?? /usr/ports/INDEX-5?
INDEX ??? ports ????????????????????????
ports ???????????? INDEX??? ??????????
| ??: |
| cd /usr/ports/ make index |
34????? INDEX HTML?
FreeBSD ???????????? ports collection????? lynx, w3m,
links ??????????????????? ports collection ????
??
| ??: |
| cd /usr/ports/ make readmes |
??????????????????????????????? /usr/ports/ftp/ ?????
| ??: |
| cd /usr/ports/ftp/ make readme |
????? /usr/ports/ftp/ ?????????????????????
?? ????????????????? README.html ????
35??????? ports ?? CVSup?
? ports ????????????????? CVSup ??????????
????????
| ??: |
| # vi /usr/sup/refuse ****************************************** ports/french ports/german ports/hebrew ports/hungarian ports/japanese |
?????????????????
?????????? ports ??????????????????????
????
| ??: |
| # vi /usr/sup/refuse ****************************************** ports/lang/perl5.8 |
?? ports/lang/perl5.8 ?? ports ??? CVSup ???
?????????????
| ??: |
| # vi /usr/sup/refuse ****************************************** ports/lang/perl* ports/po* |
36????? CVSup ?? ports collections?
??? gslin ? ? CVSup ????? source tree ?? ports tree?
Available link for download
Wednesday, February 1, 2017
FreeBSD compiz
FreeBSD compiz
Configuring xorg.conf for desktop effects
Before you install and run Compiz Fusion, you need to add a few settings to /etc/X11/xorg.conf:Add the following section to enable composite effects:
Section "Extensions"
Option "Composite" "Enable"
EndSection
Locate the Screen section which should look similar to the one below:Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
...
and add the following two lines (after Monitor will do):DefaultDepth 24
Option "AddARGBGLXVisuals" "True"
Locate the Subsection that refers to the screen resolution that you wish to use. For example, if you wish to use 1280x1024, locate the section that follows. If the desired resolution does not appear in any subsection, you may add the relevant entry by hand:SubSection "Display"
Viewport 0 0
Modes "1280x1024"
EndSubSection
A color depth of 24 bits is needed for desktop composition, change the above subsection to:SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024"
EndSubSection
Finally, confirm that the glx and extmod modules are loaded in the Module section:Section "Module"
Load "extmod"
Load "glx"
...
Installing and configuring Compiz Fusion
Installing Compiz Fusion is as simple as any other port:# cd /usr/ports/x11-wm/compiz-fusionMake sure to select the EXTRA plugins and the EMERALD window decorator from the options dialog that appears. If you are using GNOME, or already have support for gconf in your system, you may also wish to select gconf support. In this way, your effect settings will be integrated with the other desktop settings, and will be viewable via gconf-editor. Compiz Fusion can however save its settings to flat files, if such an integration is not wanted. In this case, a .compizconfig directory will be created inside your home directory.
# make install clean
When the installation is finished, start your graphic desktop and at a terminal, enter the following commands (as a normal user):
% compiz --replace --sm-disable --ignore-desktop-hints ccp &Your screen will flicker for a few seconds, as your window manager (e.g. Metacity if you are using GNOME) is replaced by Compiz Fusion. Emerald takes care of the window decorations (i.e. close, minimize, maximize buttons, title bars and so on).
% emerald --replace &
You may convert this to a trivial script and have it run at startup automatically (e.g. by adding to Sessions in a GNOME desktop):
#! /bin/shSave this in your home directory as, for example, start-compiz and make it executable:
compiz --replace --sm-disable --ignore-desktop-hints ccp &
emerald --replace &
% chmod +x ~/start-compizThen use the GUI to add it to Startup Programs (located in System, Preferences, Sessions on a GNOME desktop).
To actually select all the desired effects and their settings, execute (again as a normal user) the Compiz Config Settings Manager:
% ccsm
Note: In GNOME, this can also be found in the System, Preferences menu.
Note: If you installed the x11/nvidia-xconfig port, you should be able to perform most of the above settings by entering the following commands (as root):# nvidia-xconfig --add-argb-glx-visualsYou may wish to run nvidia-xconfig -A | more to see a list of all the options offered by the above program.
# nvidia-xconfig --composite
# nvidia-xconfig --depth=24
Available link for download
Thursday, January 19, 2017
FreeBSD make install – Accept default config
FreeBSD make install – Accept default config
Using FreeBSD ports means compiling software by executing make install clean. This is great since it automatically fetches the dependencies then compile them.
To select default Configuration i know 3 options that you can make use :
1.
For csh-based Shell:
# setenv BATCH yes
OR for sh-based Shell:
# export BATCH=yes
2.
# make -DBATCH install clean
3.
# make config-recursive
usually to get all of the options displayed for you to choose upfront. I say usually because not all ports support it, but most do.
Having BATCH Variable also should work for portupgrade:
For csh-based Shell:
# setenv BATCH yes
OR for sh-based Shell:
# export BATCH=yes
Available link for download
Saturday, November 26, 2016
FreeBSD Simple Info
FreeBSD Simple Info
1. ????.cshrc??
???????.cshrc??.
#csh .cshrc file
alias h history 25
alias j jobs -l
alias la ls -a
alias lf ls -FA
alias ll ls -lA
alias su su -m
setenv EDITOR vi
setenv EXINIT set autoindent
setenv PAGER more
set path = (~/bin /bin /usr/{bin,games} /usr/local/bin /usr/X11R6/bin)
if ($?prompt) then
# An interactive shell -- set some stuff up
set filec
set history = 1000
set ignoreeof
set mail = (/var/mail/$USER)
set mch = `hostname -s`
set prompt = "${mch:q}: {!} "
umask 2
endif
path??????shell????????????. ??????????
?????????????????. ?????????????.
???????????????????. ???????????. ??
??????????path????, ??????????????????
?.
?????????????, ??????????"./" . ??, ??
/usr/local/www/cgi-bin/?????????????. ???getdata.pl,
???getdata.pl, ?????????HTML??, ???????????
?, getdata.pl: Command not found. ??????path???????"."
??. ?????????????:
./getdata.pl
?????????HTML. ?????????, ????????????
?????.
?? TCSH ???
???????, tcsh?csh??????????????????????.
?????????tcsh????.cshrc?????:
#tcsh .tcshrc file
alias h history 25
alias j jobs -l
alias la ls -a
alias lf ls -FA
alias ll ls -lF
#alias su su -m -- bad for suing to root..
setenv EDITOR vim
setenv PAGER less
set path = ( ~/bin /usr/local/bin /bin /usr/{bin,games} /usr/sbin /sbin /usr/local/samba/bin /usr/X11R6/bin /usr/local/java/bin .)
setenv IRCNICK ringzero
setenv IRCSERVER irc2.magic.ca
setenv NNTPSERVER news.sentex.ca
if ($?prompt) then
# An interactive shell -- set some stuff up
set filec
set fignore = .o # ignore object files for filec
set showmatch # for programming
set history = 100
set savehist = 75 # tcsh version of history..
set ignoreeof
set mail = (/var/mail/$USER)
set prompt="vinyl:{%h}%~ %% " # tcsh version of above!
set watch = (1 gabor any mike any adrian any pwardrop any)
umask 2
endif
???????????setenv??. ??????, ???????????
???irc??????????. ??????????set fignore = .o , ?
??file completion(set filec)(???: ??tcsh????,??????file
completion ????bash????????,??????,???????)??
???".o"???. ??????C?????????, ??????????
".c"?????".o"??. set showmatch ? tcsh ??????file completion
??. ??????, ?????! set prompt ?????shell??????
??????. ???????????????. ???????:
mark:{123}~ % cd /usr/src
mark:{124}/usr/src %
?????????home??. ??????????tsch?csh???, ???
????,??????man tcsh! ????shells???(??tcsh?"watch"??)
??man page?. ?????????????????!
??:
????????.cshrc??, ????source .cshrc????
??????!
2. ??????????(Virtual Terminals)
(???: ?????????Virtual Terminals???????,
???????Pseudo terminals???????)
????????????????????????. ?????????
????, ??????????. ????????4?????, ???3?
??.?ALT?F2?F3(F1???????)????????????????.
??????????????, ???????????????????.
?ALT?F1???????.
????????, ????????????/dev??. ????MAKEDEV
??. MAKEDEV???shell??, ?????sh shell???????. ????
???:
cd /dev
sh MAKEDEV vty 16
??:
(???????MAKEDEV, ?????????)
????16??????. ?????ALT+F????. (???: ??F???12?)
???????????????/etc/ttys???????. ??/etc/?????
?vi???/etc/ttys??.
cd /etc
vi ttys
#
# $Id: ttys,v 1.2 1998/09/02 01:34:57 brian Exp $
# @(#)ttys 5.1 (Berkeley) 4/17/89
#
# name gettytype status comments
#
# This entry needed for asking password when init goes to single-user mode
# If you want to be asked for password, change "secure" to "insecure" here
console noneunknown off secure
#
ttyv0 "/usr/libexec/getty Pc" cons25 on secure
# Virtual terminals
ttyv1 "/usr/libexec/getty Pc" cons25 on secure
ttyv2 "/usr/libexec/getty Pc" cons25 on secure
#ttyv3 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure
ttyv3 "/usr/libexec/getty Pc" cons25 on secure
ttyv4 "/usr/libexec/getty Pc" cons25 on secure
ttyv5 "/usr/libexec/getty Pc" cons25 on secure
ttyv6 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure
# Serial terminals
# The dialup keyword identifies dialin lines to login, fingerd etc.
ttyd0 "/usr/libexec/getty std.9600" dialup off secure
ttyd1 "/usr/libexec/getty std.9600" dialup off secure
ttyd2 "/usr/libexec/getty std.9600" dialup off secure
ttyd3 "/usr/libexec/getty std.9600" dialup off secure
# Pseudo terminals
ttyp0 none network secure
ttyp1 none network secure
ttyp2 none network secure
ttyp3 none network
(???: ???????, ?????/etc/ttys?????)
?????X window, ??????????????. ?????,
ttyv4 ????.
?????Virtual Terminals???????. ??????16???
?????, ??????16?????????. ?????/etc/ttys
?????16???????????; ?????4?. ???????
????????:
ttyv2 "/usr/libexec/getty Pc" cons25 on secure
?????????yy???j???????12p???????12?.??
???ttyv2?12???, ????????????. ?4??,???5,6,
7,8,9,a,b,c,d,e,f.
??????/etc/ttys?????ttyv1 - ttyvf??????.
?vi??????????????,??????????????r??
?????????,???j?????????????.
??????ZZ??vi. ?????init??. ?????????:
kill -HUP 1
????????????????.
3. ??????
??????????. ????????, ?????????.(??,
??????????????). ??????????.
??????FreeBSD,FreeBSD???????????????. ????
???"-c"??reboot. ?????????visual config????????
??. ????????????????????????IDE??????
???,?????SCSI??????????????SCSI???. ????
??????*??*?????, ???visual config????????. ?
????????????????????.
????????????, ?????????dmesg. ????????
??.
/usr/> dmesg | more
??????SCSI???, ????????SCSI BIOS?????????
SCSI termination.
??????????, ?????FreeBSD?????.
******************************************************************
???????????????????????. ??????????
????????????????DOS FAT????. ??????, ???
??????????sd1, ??????????SCSI???(?SCSI ID 1).
???????FAT??:
dd if=/dev/zero of=/dev/rsd1 count=100
???????????"disk label". ???????????FreeBSD?
??:
disklabel -Brw sd1 auto
*?rsd1?sd1?????????,???????????????????.
????????????, ?FreeBSD????????. ??????????
??fdisk.
??????FreeBSD???????????, ????? disklabel ???
??????????, ???????disklabel???????????.??
???????????????, ??.
?????IDE??disklabel:
disklabel -e wd0
# /dev/rwd0c:
type: ESDI
disk: wd0s1
label:
flags:
bytes/sector: 512
sectors/track: 51
tracks/cylinder: 13
sectors/cylinder: 663
cylinders: 722
sectors/unit: 479298
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 0
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 65536 0 4.2BSD 0 0 0 # (Cyl. 0 - 98*)
b: 85936 65536 swap # (Cyl. 98*- 228*)
c: 479298 0 unused 0 0 # (Cyl. 0 - 722*)
e: 61440 151472 4.2BSD 0 0 0 # (Cyl. 228*- 321*)
f: 266386 212912 4.2BSD 0 0 0 # (Cyl. 321*- 722*)
?????????,????????. ?????????,???????
???????????????????(cylinders)?. size ???????
?. offset ?????????????. ?? a ???0??. ??????
??????????????????. ??????????, tracks/cylinder
(???????)??sectors/cylinder(???????)??????????
???.(???*???*???=????) ??offset????, ??????
???????offset.(Size+Offset=?????Offset)
fstype????????????????. FreeBSD??????????
4.2BSD. swap????????????. FAT?DOS?????????.??a
???????,????????????.
?? b ???????. ????offset 0??. ???????????
?. ?? e ???offset 0 ???????????, ??????????
?? e ???.
?? c ?????. ????c??????????.
????newfs?????????????. ???????????, ??
?disklabel ?????c??.
newfs /dev/rsd1c
c????????? - ????????????????????????.
??????????, ???????????newfs???????,???
???.
??,???mount???. ??????????mkdir???"mount point"
/d2 .
mount /dev/sd1c /d2
????, ???????????:
#vinyl % df -k
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/sd0a 31775 13530 15703 46% /
/dev/sd0s1f 1913091 1086207 673837 62% /usr
/dev/sd0s1e 29727 12663 14686 46% /var
procfs 4 4 0 100% /proc
/dev/sd1c 4108717 616594 3163426 16% /d2
?????/etc/fstab????????????????????mount.
???????????mount. ????????????fstab??,??
????.
?????man page???: fstab mount disklabel dmesg dd ? newfs
4. ????????
4.1 ???????????
4.2 ??????
4.3 (??)??daemon & NFS??
4.4 ????????
4.5 ??????(NIS)??
4.6 ??????
4.7 ???????
4.8 ??????
4.9 Allow local configuration override at the very end here
??:
?????????????????. ??????????
4.1 ???????????
swapfile="NO"
# ?????????,??????????????.
# Set to name of swapfile if aux swapfile desired.
apm_enable="NO"
??????APM(??????)??YES
pccard_enable="NO"
???PCCARD??????YES.
pccard_mem="DEFAULT"
??ccard_enable=YES, ????????.
pccard_ifconfig="NO"
???pccard?????(?? NO).
local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d"
??????.?????,FreeBSD???????,????????
??.???Windows??"??"???.local_startup???????
????????????.???????,???????.????
?????,?????????.???/etc/rc.local???????
????.
4.2. ??????
??????:
hostname="myname.my.domain"
???????. ?????Internet?????????.????
???????DNS??.
nisdomainname="NO"
?? NIS ? ???? NIS (?? NO).
firewall="NO"
????? (?? /etc/rc.firewall) ?? NO.
tcp_extensions="YES"
# ?? RFC1323 & RFC1544 ?? (?? NO).
network_interfaces="lo0"
??????????????.?????????.lo0
???(loopback)?????"localhost".??,??ed0
(NE2000)?fxp0(Intel Ether Express)?????.
ifconfig_lo0="inet 127.0.0.1"
???????????????.
ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff"
??lo0?localhost??????.
4.3. (??)??daemon & NFS??:
syslogd_enable="YES"
Syslog ???????.??????????/var/log/.??
/etc/syslog.conf???.
syslogd_flags=""
# syslogd ????? (?????).
inetd_enable="YES"
??????????. ??????????telnet??????
?. ???/etc/inetd.conf???. ??????????, ???
?????????????, ??: finger, telnet,rlogin, ftp,
pop3 ??...
inetd_flags=""
# inetd ???.
named_enable="NO"
??????Internet????, ???, BIND. ?????????
DNS?????????.??? /etc/namedb/named.boot???, ??
?????????. ????????DNS servers.
named_flags="-b /etc/namedb/named.boot"
??????named?????.
kerberos_server_enable="NO"
# ????kerberos????? (?? NO).
# Run a kerberos master server(or NO).
rwhod_enable="NO"
# ?? rwho daemon (?? NO).
amd_enable="NO"
# ?$amd_flags??amd??. (?? NO).
amd_flags="-a /net -c 1800 -k i386 -d my.domain -l syslog /host /etc/amd.map"
??
nfs_client_enable="NO"
# ??????? NFS ??? (?? NO).
nfs_client_flags="-n 4"
# nfsiod ??? (?????).
nfs_server_enable="NO"
# ??????? NFS ??? (?? NO).
nfs_server_flags="-u -t 4"
# nfsd ??? (?????).
weak_mountd_authentication="NO"
# ?? PCNFSD / ?? non-root nfsd (?? NO).
nfs_reserved_port_only="NO"
# ?????????NFS (?? NO).
rpc_lockd_enable="NO"
# ?? NFS rpc.lockd (*broken!*) ?? nfs_server.
rpc_statd_enable="YES"
# ?? NFS rpc.statd ?? nfs_server (or NO).
portmap_enable="YES"
# ?? portmapper ?? (?? NO).
portmap_flags=""
# portmap ???(?????).
xtend_enable="NO"
# ?? X-10 ????? daemon.
xtend_flags=""
# xtend ???(?????).
4.4. ????????:
timed_enable="NO"
???? daemon (?? NO).
timed_flags=""
timed ???(?????).
ntpdate_enable="NO"
??ntpdate ????? (or NO).
ntpdate_flags=""
ntpdate ???(?????).
xntpd_enable="NO"
?? xntpd ?????? (?? NO).
xntpd_flags=""
xntpd ???(?????).
tickadj_enable="NO"
?? tickadj (?? NO).
tickadj_flags="-Aq"
tickadj ???(?????).
4.5. ??????(NIS)??:
nis_client_enable="NO"
?????NIS??? (?? NO).
nis_client_flags=""
ypbind ??? (?????).
nis_ypset_enable="NO"
??????ypset (?? NO).
nis_ypset_flags=""
ypset ???(?????).
nis_server_enable="NO"
????NIS??? (?? NO).
nis_server_flags=""
ypserv ???(?????).
nis_ypxfrd_enable="NO"
?????rpc.ypxfrd(?? NO).
nis_ypxfrd_flags=""
rpc.ypxfrd ???(?????).
nis_yppasswdd_enable="NO"
?????rpc.yppasswdd(?? NO).
nis_yppasswdd_flags=""
rpc.yppasswdd ???(?????).
4.6. ??????:
defaultrouter="NO"
??????????.?????Internet?????IP??.??
???????,????ping?????????.????IP??
?10.1.1.3,?????255.255.255.0,?????10.1.1.2???
??10.1.2.2,???????????.
static_routes=""
???????????????????????????.
gateway_enable="NO"
???????????????YES.??????????????
???????,??,ipnat?????????????YES.
router_enable="YES"
??? YES ???????daemon.
router="routed"
?????,????daemon???.
router_flags="-q"
??daemon???.
mrouted_enable="NO"
? multicast routing (?? /etc/mrouted.conf).
ipxgateway_enable="NO"
?? YES ??? IPX ??.
ipxrouted_enable="NO"
?? YES ??? IPX ?? daemon.
ipxrouted_flags=""
IPX ?? daemon???.
arpproxy_all=""
?????????? ARP_PROXY_ALL. ??????????.
4.7. ???????
keymap="NO"
/usr/share/syscons/keymaps/* ??keymap (?? NO).
keyrate="NO"
??????: slow, normal, fast (?? NO).
keybell="NO"
bell to duration.pitch or normal or visual (or NO).
keychange="NO"
??????? (?? NO).
cursor="NO"
???? {normal|blink|destructive} (?? NO).
scrnmap="NO"
/usr/share/syscons/scrnmaps/* ??????(?? NO).
font8x16="NO"
/usr/share/syscons/fonts/* ??8x16??(?? NO).
font8x14="NO"
/usr/share/syscons/fonts/* ??8x16??(?? NO).
font8x8="NO"
/usr/share/syscons/fonts/* ??8x8??(?? NO).
blanktime="NO"
blank time (in seconds) or "NO" to turn it off.
saver="NO"
????: blank/daemon/green/snake/star/NO. ????X???
????????.
moused_type="NO"
rc.conf( ?man page ?????????.
moused_port="/dev/cuaa0"
???????? (??,mousetype ???).
moused_flags=""
moused ?????.
4.8. ??????
cron_enable="YES"
???????daemon. Cron ???????? "daemon". ??????
??????????: /etc/daily /etc/weekly ? /etc/montly.
????????????????
lpd_enable="YES"
??????? daemon. ???????????. ???/etc/printcap
??.
lpd_flags=""
lpd ???(?????).
sendmail_enable="YES"
?? sendmail daemon (?? NO). ????????e-mail???????
?????daemon. ???/etc/sendmail.cf???.
sendmail_flags="-bd -q30m"
-bd is pretty mandatory.
savecore_enable="NO"
??crash???????? (?? NO).
dumpdev="NO"
Device name to crashdump to (if enabled).
check_quotas="NO"
?????? (?? NO).
accounting_enable="NO"
?????? (?? NO).
ibcs2_enable="NO"
?????Ibcs2 (SCO) ??? (?? NO).
linux_enable="NO"
?????Linux ??? (or NO). ????Linux?????.
rand_irqs="NO"
Stir the entropy pool (like "5 11" or NO).
4.9. Allow local configuration override at the very end here
if [ -f /etc/rc.conf.local ]; then
. /etc/rc.conf.local
fi
5. ???????
?FreeBSD???/???????.FreeBSD?????"packages",??????
??????????????????????????. ??????CD, ??
??#1??,??????(???packages???..), ???"/stand/sysinstall"
??,?Post Configuration,????Packages. ???????????packages
??????????.
??,???ftp?ftp.freebsd.org?????package????? -
ftp://ftp.freebsd.org/pub/FreeBSD/packages-stable ????????.???
?????package,??? .tgz??.??????untar/???. ?????
"pkg_add".
??: ??????? spaz-1.32.tgz ?package
1. su to root (?????root ??? packages)
2. pkg_add spaz-1.32.tgz
????!????package????????????. ????csh?tcsh,??
?rehash????shell???????? bin ??...
??package?????/var/db/pkg??? - ?? cd ???????????
????????????packages. ?????????package,???
pkg_delete??????: pkg_delete spaz-1.32.tgz (?/var/db/pkb??)
FreeBSD?ports????????, ??port????????????????
???. ????ports????"???",?????.??????Internet??,
?????ports tree(???FreeBSD?????????)?? cd ?/usr/ports
???.
?????/usr/ports/net/spaz?????port:
1. su root
2. cd /usr/ports/net/spaz
3. make
??:
??make???????port!
4. make install (?????make????,?????????????
??? bin/lib ??,??????)
5. make clean (???????????????????????)
????,?/var/db/pkg???pkg_delete??????ports.
6. ????Linux???
Linux?????????FreeBSD?????Linux??????.??????
???.??????????????:
* ??????
* ????????????(lkm)
???????, ??????ports collection???Linux?.
cd /usr/ports/emulators/linux_lib
make install
??????Linux????/usr/compat. ??????/usr/bin/linux,??
??Linux????????????????.
??????lkm???Linux???, ?????????/etc/rc.conf???
????.
linux_enable="YES" # Linux emulation loaded at startup (or NO).
????????Linux???. ???????????????Linux???,
???? linux.(??root??)
????lkm,?????????????????,??????
options COMPAT_LINUX
Linux?????????.???????rc.conf??.
Available link for download