Annotation of 42BSD/ingres/doc/other/howto_setup.nr, revision 1.1

1.1     ! root        1: .ds HE 'HOW TO SET UP INGRES''PAGE %'
        !             2: .so nmacs
        !             3: .ce
        !             4: Instructions for setting up INGRES from tape.
        !             5: .ce
        !             6: (VAX UNIX*)
        !             7: 
        !             8: .ce
        !             9: (January 26, 1981)
        !            10: 
        !            11: This set of instructions will help you
        !            12: read INGRES version 7 in from tape and get it running on
        !            13: your system.
        !            14: If you are running any version of UNIX
        !            15: other than VM/UNIX release four,
        !            16: read this entire document
        !            17: before doing anything!,
        !            18: paying particular attention to section 5.3.
        !            19: 
        !            20: *UNIX is a trademark of Bell Laboratories.
        !            21: 
        !            22: .sh 1
        !            23: Installing INGRES for the first time.
        !            24: .PS
        !            25: If you already have an INGRES system,
        !            26: go directly to part 1.3.
        !            27: .dn
        !            28: Creating a UNIX user called "ingres".
        !            29: .PS
        !            30: The first thing you should do is to create a user named "ingres"
        !            31: on your system
        !            32: and log in as that user.
        !            33: The files you read in from 
        !            34: tape will be owned by "ingres",
        !            35: an actual user on your system.
        !            36: INGRES locates files in the system by
        !            37: looking in the /etc/passwd file for the
        !            38: user "ingres".
        !            39: INGRES will
        !            40: .ul
        !            41: not work
        !            42: unless you create this user.
        !            43: .sh
        !            44: Creating parent directory for the INGRES system.
        !            45: .PS
        !            46: The parent directory of the INGRES system at Berkeley is "/mnt/ingres".
        !            47: It is possible to run INGRES in a parent directory
        !            48: of your own choosing,
        !            49: which must be the parent directory of
        !            50: the user "ingres" as specified in /etc/passwd.
        !            51: For the purpose of this document the
        !            52: parent directory will be denoted by "...".
        !            53: .sh
        !            54: Extracting INGRES from the tape.
        !            55: .PS
        !            56: You are now ready to read the tape into your
        !            57: system using tar.
        !            58: You should be in the home directory for INGRES
        !            59: and logged in as INGRES.
        !            60: Type the command:
        !            61: 
        !            62:        tar xf /dev/rmt0
        !            63: 
        !            64: The system is now fully extracted from the tape
        !            65: and the tape can be unloaded if desired.
        !            66: .sh
        !            67: User oriented programs
        !            68: .PS
        !            69: In .../bin there is a collection of programs.
        !            70: Several programs
        !            71: are type-I commands associated with INGRES and which should be moved or
        !            72: linked into /usr/bin.
        !            73: The other programs are executed only by other
        !            74: INGRES programs and must be left in .../bin.
        !            75: After moving the files verify that they
        !            76: are still owned by "ingres",
        !            77: and are in the correct modes.
        !            78: Move only the files listed below.
        !            79: Leave the other files where they are!
        !            80: 
        !            81: .in 18
        !            82: .ti -10
        !            83: copydb, creatdb, destroydb, equel, helpr,
        !            84: .ti -10
        !            85: ingres, printr, purge, restore, sysmod
        !            86: .br
        !            87: (see INGRES reference manual for an
        !            88: explanation of these commands.
        !            89: 
        !            90: .ti -10
        !            91: demodb    creates a new database with a name given as an argument
        !            92: and loads it with sample data relations such as might be used by
        !            93: a department store for employee and sales records.
        !            94: The INGRES tutorial uses the relations
        !            95: in the demo database for its examples.
        !            96: 
        !            97: .in -10
        !            98: It is imperative that each of these programs be in
        !            99: the correct mode.
        !           100: A sample "ls -l" is given below.
        !           101: Verify that your file modes agree with the listing.
        !           102: 
        !           103: .in +10
        !           104: .nf
        !           105: -rwx--x--x 1 ingres    . . .   copydb
        !           106: -rws--x--x 1 ingres    . . .   creatdb
        !           107: -rwxr-xr-x 1 ingres    . . .   demodb
        !           108: -rws--x--x 1 ingres    . . .   destroydb
        !           109: -rwx--x--x 1 ingres    . . .   equel
        !           110: -rws--x--x 1 ingres    . . .   helpr
        !           111: -rws--x--x 1 ingres    . . .   ingres
        !           112: -rws--x--x 1 ingres    . . .   printr
        !           113: -rws--x--x 1 ingres    . . .   purge
        !           114: -rws--x--x 1 ingres    . . .   restore
        !           115: .fi
        !           116: 
        !           117: .sh
        !           118: EQUEL run time library.
        !           119: .PS
        !           120: The EQUEL run time library should be
        !           121: moved to "/lib/libq.a"
        !           122: or "/usr/lib/libq.a". The library
        !           123: is needed for compiling user EQUEL
        !           124: programs. It is not necessary for
        !           125: compiling INGRES itself.
        !           126: It is
        !           127: preferable although not essential
        !           128: that the owner of the library remain "ingres".
        !           129: To move the library:
        !           130: 
        !           131: .nf
        !           132:        cp .../bin/libq.a  /usr/lib/libq.a
        !           133: .fi
        !           134: 
        !           135: Refer to the INGRES Reference Manual for
        !           136: information about how to use EQUEL and
        !           137: the EQUEL library.
        !           138: There is a tutorial on using EQUEL in
        !           139: ".../doc/other/equeltut.q" and there is a
        !           140: small sample program in ".../doc/other/equeldemo.q".
        !           141: .sh
        !           142: Install concurrency device in kernel
        !           143: .PS
        !           144: If you want to use concurrency control,
        !           145: you will have to install the INGRES concurrency device
        !           146: in the kernel.
        !           147: This requires adding a device driver,
        !           148: an entry in /dev,
        !           149: and a one line change to the exit system call.
        !           150: You should read the document
        !           151: "Instructions for Installing the INGRES
        !           152: Concurrency Device in UNIX"
        !           153: before proceeding.
        !           154: .sh 1
        !           155: General Information about INGRES.
        !           156: .dn
        !           157: Some comments on the INGRES directories
        !           158: .PS
        !           159: The directories (in ...) necessary
        !           160: for a minimal running system are:
        !           161: 
        !           162: .nf
        !           163: bin            the binary programs comprising INGRES
        !           164: files          files used by various parts of INGRES
        !           165: data/base/     user-created databases
        !           166: demo           used by the "demodb" command
        !           167: .fi
        !           168: 
        !           169: Several additional directories are also created. If space limitations
        !           170: are a problem on your system you may want to delete some or all
        !           171: of the material here.
        !           172: If you need to,
        !           173: delete the files but be sure to keep
        !           174: the directories.
        !           175: The additional directories are:
        !           176: 
        !           177: .nf
        !           178: doc            documentation
        !           179: lib            object file libraries
        !           180: source         system source code
        !           181: .fi
        !           182: .sh
        !           183: Support for separated I & D space.
        !           184: .PS
        !           185: On a PDP-11,
        !           186: you MUST have separated I & D space and floating point hardware
        !           187: for INGRES to run under version 7.
        !           188: INGRES will NOT run on an 11/40 or similar machine
        !           189: under version 7 of UNIX.
        !           190: .sh 1
        !           191: Getting started using INGRES.
        !           192: .dn
        !           193: The Users File.
        !           194: .PS
        !           195: In order to use INGRES a user must be entered into
        !           196: the "users" file.
        !           197: The users file contains information
        !           198: regarding the status and permissions of each
        !           199: user.
        !           200: This file resembles the /etc/passwd file,
        !           201: and includes the user's name, the user
        !           202: code (used inside INGRES to identify a user),
        !           203: the UNIX id of the user, some status bits,
        !           204: and some other fields.
        !           205: These are described in detail in the document
        !           206: users(files).
        !           207: 
        !           208: The users file can be initialized by running
        !           209: the "usersetup" program.
        !           210: This program installs all
        !           211: users in the /etc/passwd file as valid
        !           212: INGRES users.
        !           213: The user code is assigned sequentially
        !           214: from "aa".
        !           215: The status field is initialized to 000000
        !           216: for all normal users and
        !           217: 177777 for the user "ingres".
        !           218: 
        !           219: To setup the users file in /mnt/ingres execute:
        !           220: 
        !           221:        .../bin/usersetup
        !           222: 
        !           223: Once created the users file can be edited using "ed" to do
        !           224: the following things:
        !           225: 
        !           226: .in +8
        !           227: - completely remove all users not authorized to execute INGRES.
        !           228: 
        !           229: - restrict a user from using a particular database.
        !           230: 
        !           231: - set the other status bits for appropriate users.
        !           232: .in -8
        !           233: 
        !           234: As UNIX users are added or deleted, the users
        !           235: file must be updated appropriately.
        !           236: The usersetup program can be executed only once.
        !           237: A diagnostic is issued if it is executed a second time.
        !           238: .sh
        !           239: Creating a Sample Data Base
        !           240: .PS
        !           241: The "demodb" command provided can be used to construct the sample
        !           242: database on
        !           243: which the examples in the tutorial (located on-line in 
        !           244: ".../doc/other/tutorial") are based.
        !           245: In order to execute this command
        !           246: you must be entered into the users
        !           247: file and have permission to create a database.
        !           248: To create the sample
        !           249: database and assign it the name "demo"
        !           250: type the command:
        !           251: 
        !           252: .nf
        !           253:        demodb demo
        !           254: .fi
        !           255: 
        !           256: In order to use INGRES
        !           257: with this database you need 
        !           258: merely type
        !           259: 
        !           260: .nf
        !           261:        ingres demo
        !           262: .fi
        !           263: 
        !           264: and you will be ready to follow the terminal session described in 
        !           265: the tutorial or to formulate your own queries.
        !           266: 
        !           267: To create your own copy of the same sample database
        !           268: use some unique database name.
        !           269: 
        !           270: .nf
        !           271:        demodb mydemo
        !           272: .fi
        !           273: 
        !           274: .sh
        !           275: Creating Other Data Bases.
        !           276: .PS
        !           277: You will no doubt wish to create other databases of your own and
        !           278: for this you will need to use "creatdb".
        !           279: In order
        !           280: to use this command you must be authorized in the users file.
        !           281: .sh
        !           282: Concurrency Control.
        !           283: .PS
        !           284: INGRES is designed to run with either no
        !           285: concurrency control or with full
        !           286: concurrency control.
        !           287: INGRES locks portions of a database by using
        !           288: a user level process called /etc/lockd.
        !           289: Initially you can use INGRES without this
        !           290: special device.
        !           291: If you want concurrency control
        !           292: (if more than one person will be using
        !           293: INGRES on the same database at the
        !           294: same time, you MUST have it) then
        !           295: print a copy of the instructions on
        !           296: how to install the concurrency device:
        !           297: 
        !           298: .ti +8
        !           299: nroff .../doc/other/lockdev.nr
        !           300: 
        !           301: .sh 1
        !           302: Hints and suggestions.
        !           303: .PS
        !           304: .dn
        !           305: Unix Protection Problems.
        !           306: .PS
        !           307: If you encounter problems in creating directories or reading in files
        !           308: from the tape
        !           309: check the protection status of the parent directories involved to make sure
        !           310: that permission to write new files exists.
        !           311: 
        !           312: The following summarizes the proper modes for each directory.
        !           313: All directories are owned by INGRES except the
        !           314: individual databases.
        !           315: (The modes in parentheses represent the mode to be used
        !           316: if you wish to restrict access maximally.)
        !           317: .nf
        !           318: 
        !           319:        bin             755
        !           320:        data            700
        !           321:        data/base       777
        !           322:        demo            755
        !           323:        doc             755
        !           324:        files           755
        !           325:        geoquel and all its subdirectories      755
        !           326:        lib             755
        !           327:        source and all its subdirectories       755 (700)
        !           328:        any database    777 (typically owned by the dba)
        !           329: .fi
        !           330: 
        !           331: The programs in .../bin should be in the following modes:
        !           332: 
        !           333: .nf
        !           334:        -rwsr----- 1 ingres     . . .   ksort
        !           335:        -rwxr-x--x 1 ingres     . . .   monitor
        !           336:        -rwsr----- 1 ingres     . . .   vaxingres
        !           337: .fi
        !           338: 
        !           339: You may need to
        !           340: become super-user to add files
        !           341: in "/usr/bin".
        !           342: .sh
        !           343: Making Certain Programs "Sticky".
        !           344: .PS
        !           345: The INGRES program to sort relations is
        !           346: frequently executed
        !           347: during an INGRES session.
        !           348: Performance can be improved if it is
        !           349: made "sticky".
        !           350: If you have sufficient space on your
        !           351: swapping device,
        !           352: it is advantageous to make the following
        !           353: program "sticky".
        !           354: This can be done by changing its mode
        !           355: to 5700.
        !           356: 
        !           357:        chmod 5740 .../bin/ksort
        !           358: 
        !           359: .sh
        !           360: Upper Case Only Terminals
        !           361: .PS
        !           362: Remember if you are using an upper-case-only terminal you will have
        !           363: to use a double backslash "\\\\" with all terminal monitor commands in order to
        !           364: override the interpretation of "\\" as an escape character.
        !           365: For example on an upper and lower case terminal you would type:
        !           366: 
        !           367: .nf
        !           368:        help parts
        !           369:        \\g
        !           370: .fi
        !           371: 
        !           372: while on an upper case only terminal you would type:
        !           373: 
        !           374: .nf
        !           375:        HELP PARTS
        !           376:        \\\\G
        !           377: .fi
        !           378: 
        !           379: .sh 1
        !           380: Source code and system regeneration
        !           381: .dn
        !           382: Log on as user "ingres".
        !           383: .PS
        !           384: When doing any system work always log on as "ingres".
        !           385: .sh
        !           386: Recompilation.
        !           387: .PS
        !           388: All source code for the system is located in ".../source"
        !           389: and various sub-directories therein. Each subdirectory is
        !           390: named for a functional component or sub-component of the system.
        !           391: Makefiles for regenerating the various portions of the system
        !           392: from source are located in the associated directory.
        !           393: To regenerate a particular module (e.g. parser) say:
        !           394: 
        !           395: .nf
        !           396:        chdir .../source/parser
        !           397:        make
        !           398: .fi
        !           399: 
        !           400: The entire system can be recompiled and installed
        !           401: in /usr/bin
        !           402: using the command:
        !           403: 
        !           404: .nf
        !           405:        chdir .../source/conf
        !           406:        make allinstall sysinstall
        !           407: .fi
        !           408: 
        !           409: When recompiling for the first time it is strongly
        !           410: advised that you use a hard copy terminal or
        !           411: save the output in some other manner.
        !           412: 
        !           413: Libraries of object code are maintained
        !           414: in .../lib.
        !           415: 
        !           416: You may find that your C compiler cannot compile INGRES.
        !           417: If this is true, you will have to increase the size of
        !           418: the symbol table in cpp.
        !           419: 
        !           420: .sh
        !           421: Compilation Flags and Funny Flavored UNIXes.
        !           422: .PS
        !           423: If you are running any system
        !           424: other than VM/UNIX release 4 (4BSD),
        !           425: you may have to recompile the INGRES system
        !           426: before it is usable.
        !           427: Examine the file .../source/unix.h closely
        !           428: for correspondence with your version of reality.
        !           429: Major problems include representation of user and group id's
        !           430: and structures returned by various system calls.
        !           431: 
        !           432: Four compile flags in unix.h define the type of user id's
        !           433: used on your system.
        !           434: For a vanilla version six system
        !           435: with 8-bit user id's and 8-bit group id's,
        !           436: set the xV6_UNIX compilation flag.
        !           437: For a Berkeley version six system
        !           438: with a single 16-bit user id
        !           439: (and no group id),
        !           440: set the xB_UNIX flag.
        !           441: For a vanilla version seven system,
        !           442: chocolate version six system,
        !           443: or VM/UNIX system,
        !           444: with 16-bit user id's and 16-bit group id's
        !           445: set xV7_UNIX.
        !           446: Also, define either
        !           447: VAX
        !           448: or
        !           449: PDP11
        !           450: depending on whether you are on a PDP-11 or a VAX.
        !           451: 
        !           452: A large set of flags
        !           453: in ingres.h
        !           454: control compilation of trace information
        !           455: and timing estimates.
        !           456: Flags of the form "x?TM"
        !           457: (where "?" is a letter as described below)
        !           458: turn on timing information.
        !           459: THESE SHOULD ALWAYS BE LEFT OFF,
        !           460: since the system you receive on the distribution tape
        !           461: does not include everything necessary to
        !           462: successfully use these flags.
        !           463: Flags of the form "x?TR1", "x?TR2", and "x?TR3"
        !           464: are trace compilation flags.
        !           465: Compiling these in does not automatically
        !           466: make trace information print,
        !           467: but only makes it available.
        !           468: These flags must be properly nested;
        !           469: for example, if xMTR2 is set,
        !           470: xMTR1 must also be set
        !           471: (but xMTR3 is optional).
        !           472: The letter codes for these flags are as follows:
        !           473: 
        !           474: .nf
        !           475: .in +5
        !           476: A      Access Methods
        !           477: M      Terminal Monitor
        !           478: P      Parser
        !           479: Q      Qrymod
        !           480: D      Decomposition
        !           481: O      One Variable Query Processor
        !           482: Z      Data Base Utilities
        !           483: E      Equel
        !           484: S      Scanner
        !           485: T      Standalone Routines
        !           486: .fi
        !           487: .in -5
        !           488: 
        !           489: A flag named DISTRIB is used in some places
        !           490: in the code.
        !           491: This is used in the yet-to-be-born
        !           492: Distributed INGRES system,
        !           493: and should always be left off.
        !           494: 
        !           495: Touching any other defined constants
        !           496: should be considered extremely dangerous
        !           497: and is done strictly at your own risk.
        !           498: 
        !           499: .sh 1
        !           500: Documentation.
        !           501: .dn
        !           502: Tutorial on INGRES.
        !           503: .PS
        !           504: A tutorial on using INGRES can be found in
        !           505: ".../doc/other/tutorial.nr". A copy of the document
        !           506: can be produced by:
        !           507: 
        !           508: .nf
        !           509:        nroff .../doc/other/tutorial.nr
        !           510: .fi
        !           511: 
        !           512: The tutorial guides the reader through
        !           513: examples of using QUEL the INGRES database
        !           514: language. A basic familiarity with UNIX is
        !           515: assumed.
        !           516: .sh
        !           517: Reference Manual.
        !           518: .PS
        !           519: The reference manual consists of a number of files - 
        !           520: one for each command or feature in INGRES. The reference
        !           521: manual can be retrieved by using the
        !           522: help command
        !           523: (see help(quel)).
        !           524: A complete copy of the manual can be
        !           525: printed on the line printer by:
        !           526: 
        !           527:        chdir .../doc
        !           528:        make ref
        !           529: 
        !           530: The complete manual is about 80 pages.
        !           531: 
        !           532: .sh
        !           533: Maintenance Manual.
        !           534: .PS
        !           535: A guide to using INGRES has been written and is called
        !           536: "Creating and Maintaining
        !           537: a Database Using INGRES".
        !           538: It includes information about
        !           539: creating databases, storage structures,
        !           540: recovery, copy, indices and
        !           541: other useful information.
        !           542: A copy of the manual can be produced by:
        !           543: 
        !           544: .nf
        !           545:        nroff .../doc/other/maintain.nr
        !           546: .fi
        !           547: 
        !           548: .sh
        !           549: Design of INGRES
        !           550: .PS
        !           551: A draft of the report "The Design and Implementation
        !           552: of INGRES" by Stonebraker, Kreps and Held can be
        !           553: found in ".../doc/other/design.roff". It can be printed
        !           554: by:
        !           555: 
        !           556: .nf
        !           557:        roff .../doc/other/design.roff
        !           558: .fi
        !           559: 
        !           560: The report gives a
        !           561: fairly detailed description of the structure
        !           562: and capabilities of the entire system as
        !           563: it existed over three years ago, in January 1976.
        !           564: .ul
        !           565: It is out of date in many areas.
        !           566: It gives implementation details and
        !           567: algorithms of important system modules.
        !           568: 
        !           569: .sh
        !           570: Internal Documentation.
        !           571: .PS
        !           572: We currently do not provide,
        !           573: nor have we written any
        !           574: internal documentation beyond what
        !           575: is mentioned in the "Design and Implementation"
        !           576: paper.
        !           577: 
        !           578: This document itself can be reproduced
        !           579: by doing:
        !           580: 
        !           581: .nf
        !           582:        nroff .../doc/other/howto_setup.nr
        !           583: .fi
        !           584: 
        !           585: .sh 1
        !           586: Consulting
        !           587: .PS
        !           588: The INGRES project is not set up to supply
        !           589: regular consulting.
        !           590: If you do have problems,
        !           591: please reread these instructions carefully;
        !           592: over two thirds of the "bug reports" we receive
        !           593: can be answered by re-reading the documentation.
        !           594: For non-technical questions
        !           595: (e.g., regarding availability of the system
        !           596: or documentation)
        !           597: please call the project secretary
        !           598: at (415) 642-2344.
        !           599: I can also be reached through this number.
        !           600: 
        !           601: 
        !           602: .in 10
        !           603: .nf
        !           604: Eric Allman
        !           605: Electronics Research Laboratory
        !           606: University of California
        !           607: Berkeley, California  94720
        !           608: .fi
        !           609: .in 0

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.