⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 6.t

📁 早期freebsd实现
💻 T
📖 第 1 页 / 共 2 页
字号:
all the makefiles on the system:.IP all 9This entry is the default target, the same as if no target is specified.This target builds the kernel, binary or library, as well as itsassociated manual pages.This target \fBdoes not\fP build the dependency files.Some of the utilities require that a \fImake depend\fP be done beforea \fImake all\fP can succeed..IP dependBuild the include file dependency file, ``.depend'', which isread by.Xr make .See.Xr mkdep (1)for further details..IP installInstall the kernel, binary or library, as well as its associatedmanual pages.See.Xr install (1)for further details..IP cleanRemove the kernel, binary or library, as well as any object filescreated when building it..IP cleandirThe same as clean, except that the dependency files and formattedmanual pages are removed as well..IP objBuild a shadow directory structure in the area referenced by.Pn /usr/objand create a symbolic link in the current source directory toreferenced it, named ``obj''.Once this shadow structure has been created, all the files created by.Xr makewill live in the shadow structure, and.Pn /usr/srcmay be mounted read-only by multiple machines.Doing a \fImake obj\fP in.Pn /usr/srcwill build the shadow directory structure for everything on thesystem except for the contributed, old, and kernel software..PPThe system consists of three major parts:the kernel itself, found in.Pn /usr/src/sys ,the libraries , found in.Pn /usr/src/lib ,and the user programs (the rest of.Pn /usr/src )..PPDeprecated software, found in.Pn /usr/src/old ,often has old style makefiles;some of it does not compile under \*(4B at all..PPContributed software, found in.Pn /usr/src/contrib ,usually does not support the ``cleandir'', ``depend'', or ``obj'' targets..PPThe kernel does not support the ``obj'' shadow structure.All kernels are compiled in subdirectories of.Pn /usr/src/sys/compilewhich is usually abbreviated as.Pn /sys/compile .If you want to mount your source tree read-only,.Pn /usr/src/sys/compilewill have to be on a separate filesystem from.Pn /usr/src .Separation from.Pn /usr/srccan be done by making.Pn /usr/src/sys/compilea symbolic link that references.Pn /usr/obj/sys/compile .If it is a symbolic link, the \fIS\fP variable in the kernelMakefile must be changed from.Pn \&../..to the absolute pathname needed to locate the kernel sources, usually.Pn /usr/src/sys .The symbolic link created by.Xr config (8)for.Pn machinemust also be manually changed to an absolute pathname.Finally, the.Pn /usr/src/sys/libkern/objdirectory must be located in.Pn /usr/obj/sys/libkern ..PPEach of the standard utilities and libraries may be built andinstalled by changing directories into the correct location anddoing:.DS\fB#\fP \fImake\fP\fB#\fP \fImake install\fP.DENote, if system include files have changed between compiles,.Xr makewill not do the correct dependency checks if the dependencyfiles have not been built using the ``depend'' target..PPThe entire library and utility suite for the system may be recompiledfrom scratch by changing directory to.Pn /usr/srcand doing:.DS\fB#\fP \fImake build\fP.DEThis target installs the system include files, cleans the sourcetree, builds and installs the libraries, and builds and installsthe system utilities..PPTo recompile a specific program, first determine where the binaryresides with the.Xr whereis (1)command, then change to the corresponding source directory and buildit with the Makefile in the directory.For instance, to recompile ``passwd'',all one has to do is:.DS\fB#\fP \fIwhereis passwd\fP\fB/usr/bin/passwd\fP\fB#\fP \fIcd /usr/src/usr.bin/passwd\fP\fB#\fP \fImake\fP\fB#\fP \fImake install\fP.DEthis will compile and install the.Xr passwdutility..PPIf you wish to recompile and install all programs into a particulartarget area you can override the default path prefix by doing:.DS\fB#\fP \fImake\fP\fB#\fP \fImake DESTDIR=\fPpathname \fIinstall\fP.DESimilarly, the mode, owner, group, and other characteristics ofthe installed object can be modified by changing other defaultmake variables.See.Xr make (1),.Pn /usr/src/share/mk/bsd.README ,and the ``.mk'' scripts in the.Pn /usr/share/mkdirectory for more information..PPIf you modify the C library or system include files, to change asystem call for example, and want to rebuild and install everything,you have to be a little careful.You must ensure that the include files are installed before anythingis compiled, and that the libraries are installed before the remainderof the source, otherwise the loaded images will not contain the newroutine from the library.If include files have been modified, the following commands shouldbe done first:.DS\fB#\fP \fIcd /usr/src/include\fP\fB#\fP \fImake install\fP.DEThen, if, for example, C library files have been modified, thefollowing commands should be executed:.DS\fB#\fP \fIcd /usr/src/lib/libc\fP\fB#\fP \fImake depend\fP\fB#\fP \fImake\fP\fB#\fP \fImake install\fP\fB#\fP \fIcd /usr/src\fP\fB#\fP \fImake depend\fP\fB#\fP \fImake\fP\fB#\fP \fImake install\fP.DEAlternatively, the \fImake build\fP command described above willaccomplish the same tasks.This takes several hours on a reasonably configured machine..Sh 2 "Making local modifications".PPThe source for locally written commands is normally stored in.Pn /usr/src/local ,and their binaries are kept in.Pn /usr/local/bin .This isolation of local binaries allows.Pn /usr/bin ,and.Pn /binto correspond to the distribution tape (and to the manuals thatpeople can buy).People using local commands should be made aware that they are notin the base manual.Manual pages for local commands should be installed in.Pn /usr/local/man/cat[1-8].The.Xr man (1)command automatically finds manual pages placed in/usr/local/man/cat[1-8] to encourage this practice (see.Xr man.conf (5))..Sh 2 "Accounting".PPUNIX optionally records two kinds of accounting information:connect time accounting and process resource accounting.  The connecttime accounting information is stored in the file.Pn /var/log/wtmp ,which is summarized by the program.Xr ac (8).The process time accounting information is stored in the file.Pn /var/account/acctafter it is enabled by.Xr accton (8),and is analyzed and summarized by the program.Xr sa (8)..PPIf you need to recharge for computing time, you can developprocedures based on the information provided by these commands.A convenient way to do this is to give commands to the clock daemon.Pn /usr/sbin/cronto be executed every day at a specified time.This is done by adding lines to.Pn /etc/crontab.local ;see.Xr cron (8)for details..Sh 2 "Resource control".PPResource control in the current version of UNIX is moreelaborate than in most UNIX systems.  The disk quotafacilities developed at the University of Melbourne havebeen incorporated in the system and allow control over thenumber of files and amount of disk space each user and/or group may useon each filesystem.  In addition, the resources consumedby any single process can be limited by the mechanisms of.Xr setrlimit (2).As distributed, the latter mechanismis voluntary, though sites may choose to modify the loginmechanism to impose limits not covered with disk quotas..PPTo use the disk quota facilities, the system must beconfigured with ``options QUOTA''.  Filesystems may thenbe placed under the quota mechanism by creating a null file.Pn quota.userand/or.Pn quota.groupat the root of the filesystem, running.Xr quotacheck (8),and modifying.Pn /etc/fstabto show that the filesystem is to runwith disk quotas (options userquota and/or groupquota).The.Xr quotaon (8)program may then be run to enable quotas..PPIndividual quotas are applied by using the quota editor.Xr edquota (8).Users may view their quotas (but not those of other users) with the.Xr quota (1)program. The.Xr repquota (8)program may be used to summarize the quotas and currentspace usage on a particular filesystem or filesystems..PPQuotas are enforced with \fIsoft\fP and \fIhard\fP limits.When a user and/or group first reaches a soft limit on a resource, amessage is generated on their terminal.  If the user and/or group fails tolower the resource usage below the soft limitfor longer than the time limit established for that filesystem(default seven days) the system then treats the soft limit as a\fIhard\fP limit and disallows any allocations until enough space isreclaimed to bring the user and/or group back below the soft limit.Hard limits are enforced strictly resulting in errors when a userand/or group tries to create or write a file.  Each time a hard limit isexceeded the system will generate a message on the user's terminal..PPConsult the auxiliary document, ``Disc Quotas in a UNIX Environment'' (SMM:4)and the appropriate manual entries for more information..Sh 2 "Network troubleshooting".PPIf you have anything more than a trivial network configuration,from time to time you are bound to run into problems.  Beforeblaming the software, first check your network connections.  Onnetworks such as the Ethernet aloose cable tap or misplaced power cable can result in severelydeteriorated service.  The.Xr netstat (1)program may be of aid in tracking down hardware malfunctions.In particular, look at the \fB\-i\fP and \fB\-s\fP options in the manual page..PPShould you believe a communication protocol problem exists,consult the protocol specifications and attempt to isolate theproblem in a packet trace.  The SO_DEBUG option may be suppliedbefore establishing a connection on a socket, in which case thesystem will trace all traffic and internal actions (such as timersexpiring) in a circular trace buffer.This buffer may then be printed out with the.Xr trpt (8)program.Most of the servers distributed with the systemaccept a \fB\-d\fP option forcingall sockets to be created with debugging turned on.Consult the appropriate manual pages for more information..Sh 2 "Files that need periodic attention".PPWe conclude the discussion of system operations by listingthe files that require periodic attention or are system specific:.TScenter;lfC l./etc/fstab	how disk partitions are used/etc/disktab	default disk partition sizes/labels/etc/printcap	printer database/etc/gettytab	terminal type definitions/etc/remote	names and phone numbers of remote machines for \fItip\fP(1)/etc/group	group memberships/etc/motd	message of the day/etc/master.passwd	password file; each account has a line/etc/rc.local	local system restart script; runs reboot; starts daemons/etc/inetd.conf	local internet servers/etc/hosts	local host name database/etc/networks	network name database/etc/services	network services database/etc/hosts.equiv	hosts under same administrative control/etc/syslog.conf	error log configuration for \fIsyslogd\fP\|(8)/etc/ttys	enables/disables ports/etc/crontab	commands that are run periodically/etc/crontab.local	local commands that are run periodically/etc/aliases	mail forwarding and distribution groups/var/account/acct	raw process account data/var/log/messages	system error log/var/log/wtmp	login session accounting.TE.pn 2.bp.PX

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -