Оцените этот текст:

---------------------------------------------------------------
Original version of Solaris FAQ is at
http://www.wins.uva.nl/pub/solaris/solaris2/
---------------------------------------------------------------



Solaris man uses a manual page index file called "windex" in place of the old "whatis" file. You can build this
index with

              catman -w -M 

But, in 2.1, this will result in numerous "line too long" messages and a bogus windex file in /usr/share/man, and a
core dump in /usr/openwin/man. (In 2.2, catman works in /usr/share/man, but says "line too long" in
/usr/openwin/man). To add injury to insult, "man" normally won't show you a man page if it can't find the
windex entry, even though the man page exists.

There's a "makewhatis" script in /usr/openwin/man that works better than catman. But watch it - by default it
searches files in /usr/man, not in openwin, and it only looks in some predefined man subdirectories. Try
changing its "for ..." command to "for i in man*", then use it like this: cd /usr/share/man;
/usr/openwin/man/makewhatis . cd /usr/openwin/man; /usr/openwin/man/makewhatis .

Still (!), the openwin windex file is somewhat hosed (try "man answerbook" :-( ). You can always delete the
bogus lines manually... or, you can alias man to "man -F", forcing it to look for the bloody file like you asked.

But wait, there's more! To see the read(2) man page, you can't just type "man 2 read" anymore - it has to be
"man -s 2 read". Or, alias man to this little script:

            #!/bin/sh
            if [ $# -gt 1 -a "$1" -gt "0" ]; then
                    /bin/man -F -s $*
            else
                    /bin/man -F $*
            fi



    2.4) What FTP/WWW sites do I need to know about?

www.sun.com Sun's own WWW site, contains pointers to Sunsites, patches and has lots of info, press releases etc, etc. Solaris transition home page Sun's Solaris 2.x migration support Solaris 2.x binaries Solaris 2.x/SPARC binaries in pkgadd format Solaris 2.x/x86 binaries in pkgadd format SunSites - Sun sponsored sites. Lots of good stuff there. Sun SITE AskERIC at Syracuse University - Syracuse Sun SITE Australia at Australian National University - Canberra Sun SITE Central Europe at RWTH-Aachen - Germany Sun SITE Chile at Universidad de Chile - Santiago Sun SITE Czech Republic at Charles University - Prague Sun SITE Denmark at Aalborg University - Aalborg Sun SITE Digital Library at University of California at Berkeley Sun SITE France at Conservatoire National des Arts-et-Metiers - Paris Sun SITE Hong Kong at University of Science and Tech. - Hong Kong Sun SITE Hungary at Lajos Kossuth University, Debrecen - Hungary Sun SITE Italy at University of Milan - Milan Sun SITE Israel at Hebrew University of Jerusalem - Jerusalem Sun SITE Japan at Science University - Tokyo Sun SITE Korea at Seoul National University - Seoul Sun SITE Mexico at Universidad Nacional Autonoma de Mexico - Mexico Sun SITE Nordic at Kungliga Tekniska Hжgskolan - Stockholm Sun SITE Northern Europe at Imperial College - London Sun SITE People's Republic of China at Tsinghua University - Beijing Sun SITE Poland at Warsaw University - Warsaw Sun SITE Russia at Moscow State University - Moscow Sun SITE Thailand at Assumption University - Bangkok Sun SITE Spain at Consejo Superior de Investigaciones Cientificas, RedIRIS - Madrid Sun SITE Singapore at National University of Singapore - Singapore Sun SITE South Africa at University of the Witwatersrand - Johannesburg Sun SITE USA at University of North Carolina - Chapel Hill Solaris at UMBC - Solaris tips & tricks by Vijay Gill ftp.x.org - the master X11 site ftp.quintus.com:/pub/GNU - GNU binaries ftp.uu.net - UuNet communication archives (mirrors abovementioned GNU binaries in systems/gnu/solaris2.3) OpCom. (opcom.sun.ca) - run by Sun Microsystems' OpCom group - lots of stuff. Here is some of the stuff that's online: pub/AMToolkit.* - the Administration Migration (4.1.x to Solaris 2) Toolkit pub/binaries - binaries/man pages for Solaris 2.0 native binaries. pub/newsletter - issues of the monthly OpCom newsletter. pub/docs - assorted documentation, papers, and other information. - all of the RFCs pub/drivers - information related to device driver writing under under Solaris 2.0 as well as a skeleton SCSI driver. ls-lR.Z - compressed recursive listing of files available on the server. pub/tars - compressed tars. pub/tmp - place for uploading things to the server. pub/R5 - the unadultered MIT x11r5 distribution. pub/x11r5 - port of X11r5 to Solaris 2.0, binaries, libraries and headers. A compressed tar of this tree can be found in tars. prep.ai.mit.edu and the GNU mirrors Joe Shamblin's x86 site at Duke server.berkeley.edu:/pub/x86solaris - x86 stuff ftp.wins.uva.nl pub/solaris - where the Solaris FAQ is kept, including an html version. pub/solaris/auto-install - fully automated auto-install scripts, including an explanation of exactly what a machine needs when booting the installation, automated patch installation and even post-install updates from your install tree, which gives you an easy way to keep all your Solaris machines in sync.

    3.8) How can I have a user without a password?

In addition to removing the password from /etc/shadow, you need to take one of the following steps: Edit /etc/default/login and comment out PASSREQ=YES or change it to PASSREQ=NO. This allows all users to remove their password! The second way is to give a particular user no password with the following entry in /etc/shadow: user::9092:9999:9999::::

    3.35) Where do I get patches from?

Sites not sponsored by Sun, accessible for all: ugle.unit.no:/pub/unix/sun-fixes ftp.luth.se:/pub/unix/sun/all_patches SunSites (carry recommended and security patches): sunsite.unc.edu:/pub/sun-info/sun-patches sunsite.sut.ac.jp:/pub/sun-info/sun-us/sun-patches sunsite.doc.ic.ac.uk:/sun/sunsite-sun-info/sun-patches Sunsolve: sunsolve1.sun.com:/pub/patches http://sunsolve1.sun.com/ These are Sun's own sites, they has the recommended patches up for anonymous ftp, packaged as one huge 2.x_Recommended.tar.Z file and as individual patches. Starting with SunSolve CD 2.1.2 ALL Sun patches are shipped on the SunSolve CD. Contract customers can get all patches by ftp from Sunsolve or via e-mail and query one of the online sunsolve-databases on the Internet.

    3.39) How can I have more than 48 pseudo-ttys?

Edit /etc/system and add the following line: * System V pseudo terminals set pt_cnt = Halt the system and boot -r. You can essentially have as many as you like, but you'll probably run into some other limit somewhere. More than 3000 are supported. In the unlikely event that you run out of BSD-style ptys, you can increase them as well. The maximum there is probably 256 as all programs using BSD ptys need to hardcode all the possible device names and 256 was the maximum previously found in SunOS 4. BSD ttys are awkward to use and all programs I found support SYSV ptys without trouble. * You don't need this. Increasing this value too much usually * just wastes memory. set npty = Halt the system and boot -r.

    3.43) How can I increase the number of file descriptors per process?

In 2.3 in earlier this requires poking the kernel. In Solaris 2.4+, this can be accomplished by adding the following lines to /etc/system: * set hard limit on file descriptors set rlim_fd_max = 4096 * set soft limit on file descriptors set rlim_fd_cur = 1024 Raising the soft limit past 256 may confuse certain applications, especially BCP applications. Raising the limit past 1024 may confuse applications that use select(). Programs using stdio or even library calls that use stdio may break when they have more than 256 files open as that is the stdio limit. Programs using many filedescriptors should try and reserve a number of low numbered file descriptors for use by stdio.

    3.46) How do I change my hostname?

The supported way to change your hostname is: # /usr/sbin/sys-unconfig The system will halt and on subsequent boot will ask for its name and other networking parameters again. You may wish to save a copy of /etc/nsswitch.conf beforehand as that file is overwritten by the configuration process. Note that sys-unconfig is not supported on diskless or dataless workstations. On those, you'll need to edit files by hand. See the sys-unconfig(1M) for a list of the files that need changing.

    4.10) How can I have multiple addresses per interface?

Solaris 2.x provides a feature in ifconfig that allows having more than one IP address per interfaces. Undocumented but existing prior to 2.5, documented in 2.5 and later. Syntax: ifconfig IF:N ip-address up where "IF" is an interface (e.g., le0) and N is a number between 1 and . Removing the pseudo interface and associated address is done with "ifconfig IF:N 0.0.0.0 down". As with physical interfaces, all you need to do is make the appropriate /etc/hostname.IF:X file. The maximum number of virtual interfaces, above, is 255 in Solaris releases prior to 2.6. Solaris 2.6 and Solaris 2.5.1 with the Solaris Internet Server Supplement (SISS) allow you to set this value with ndd, upto a hard maximum of 8192. /usr/sbin/ndd -set /dev/ip ip_addrs_per_if 4000 There's no limit inspired by the code; so if you bring out adb you can increase the maximum even further. 5.15) I messed up /etc/system, now I can't boot. Boot with -as. The kernel will ask you all sorts of questions, including the name of the system file. Use the previous /etc/system file or specify /dev/null.

    5.21) When reading mail on non-Solaris clients of a Solaris mail server, or with

non-Solaris mail readers, some messages get split into multiple messages. Solaris 2.x uses the "Content-Length:" header to tell the MUAs where messages should be split. Unfortunately, no-one else understands this convention. Instead, the old convention, ``split on "From " lines'' is used most of the time. Those mail readers expect extra lines with "From" to be escaped with ">". Workaround: add "E" to the mailerflags of the local mailer. Edit /etc/mail/sendmail.cf on your Solaris machines, add E to F= on the line that reads: Mlocal, P=/bin/mail, F=flsSDFMmnP, S=10, R=20, A=mail -d $u so that it becomes: Mlocal, P=/bin/mail, F=EflsSDFMmnP, S=10, R=20, A=mail -d $u

    6.1) Where is the C compiler or where can I get one?

Where have you been? :-) Sun has dropped their old K&R C compiler, supposedly to create a market for multiple compiler suppliers to provide better performance and features. Here are some of the contenders: 1) SunPro C: SunPro, SMCC, and various distributors sell a new ANSI-standard C compiler on the unbundled (extra cost) SPARCcompiler/SPARCworks CD-ROM. There are some other nice tools there too, like a "make tool" and a visual diff (interactive diff). You have to license and pay per concurrent user. 2) Apogee compilers Apogee sells C, C++, f77 and f90 compilers, mainly for SPARC. These compiler include the KAP preprocessors from Kuck and Associates. 3) Cygnus GCC: Cygnus Support and the Free Software Foundation make the GNU C compiler for Solaris, a free software product. Source code and ready-to-run binaries can be installed from the CDware CD (Volume 4 or 5). Like all GNU software, there are no restrictions on who can use it, how many people can use it at a time, what machines it can be run on, or how many copies you can install, run, give away, or sell. Cygnus sells technical support for these tools, under annual support contracts. The Cygnus distribution includes: gcc (ansi C compiler), gdb (good debugger), byacc (yacc repl), flex (lex repl), gprof, makeinfo, texindex, info, patch, cc (a link to gcc) The Cygnus compiler on uunet is starting to show its age a bit. If you want to compile X11R5, you can get the latest version of GCC in source code, from the usual places (prep.ai.mit.edu or one of the many mirrored copies of it). Build and install that compiler using the Cygnus gcc binaries. Or get tech support from Cygnus; they produce a new version for their customers every three months, and will fix any bug you find. 4) Gcc. Gcc is available from the GNU archives in source form. You need gcc 2.3.3 or later. You should not use GNU as or GNU ld. Make sure you run just-fixinc if you use a binary distribution. Better is to get a binary version and use that to bootstrap gcc from source. GNU software is available from: prep.ai.mit.edu:/pub/gnu gatekeeper.dec.com:/pub/GNU ftp.uu.net:/systems/gnu wuarchive.wustl.edu:/mirrors/gnu nic.funet.fi:/pub/gnu When you install gcc, don't make the mistake of installing GNU binutils or GNU libc, they are not as capable as their counterparts you get with Solaris 2.x. 5) Info on other compiler vendors will be added if you send us some.

Last-modified: Fri, 08 Aug 1997 05:40:05 GMT
Оцените этот текст: