|
|
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: (October 3, 1984) ! 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. ! 143: .PS ! 144: If you want to use concurrency control, ! 145: you will have to install the INGRES concurrency program ! 146: into /etc, add the command to /etc/rc, and add the ! 147: definition to /etc/services. ! 148: You should read the document ! 149: "Instructions for Installing the INGRES ! 150: Concurrency Device in UNIX" ! 151: before proceeding. ! 152: .sh 1 ! 153: General Information about INGRES. ! 154: .dn ! 155: Some comments on the INGRES directories ! 156: .PS ! 157: The directories (in ...) necessary ! 158: for a minimal running system are: ! 159: ! 160: .nf ! 161: bin the binary programs comprising INGRES ! 162: files files used by various parts of INGRES ! 163: data/base/ user-created databases ! 164: demo used by the "demodb" command ! 165: .fi ! 166: ! 167: Several additional directories are also created. If space limitations ! 168: are a problem on your system you may want to delete some or all ! 169: of the material here. ! 170: If you need to, ! 171: delete the files but be sure to keep ! 172: the directories. ! 173: The additional directories are: ! 174: ! 175: .nf ! 176: doc documentation ! 177: lib object file libraries ! 178: source system source code ! 179: .fi ! 180: .sh ! 181: Support for separated I & D space. ! 182: .PS ! 183: On a PDP-11, ! 184: you MUST have separated I & D space and floating point hardware ! 185: for INGRES to run under version 7. ! 186: INGRES will NOT run on an 11/40 or similar machine ! 187: under version 7 of UNIX. ! 188: .sh 1 ! 189: Getting started using INGRES. ! 190: .dn ! 191: The Users File. ! 192: .PS ! 193: In order to use INGRES a user must be entered into ! 194: the "users" file. ! 195: The users file contains information ! 196: regarding the status and permissions of each ! 197: user. ! 198: This file resembles the /etc/passwd file, ! 199: and includes the user's name, the user ! 200: code (used inside INGRES to identify a user), ! 201: the UNIX id of the user, some status bits, ! 202: and some other fields. ! 203: These are described in detail in the document ! 204: users(files). ! 205: ! 206: The users file can be initialized by running ! 207: the "usersetup" program. ! 208: This program installs all ! 209: users in the /etc/passwd file as valid ! 210: INGRES users. ! 211: The user code is assigned sequentially ! 212: from "aa". ! 213: The status field is initialized to 000000 ! 214: for all normal users and ! 215: 177777 for the user "ingres". ! 216: ! 217: To setup the users file in /mnt/ingres execute: ! 218: ! 219: .../bin/usersetup ! 220: ! 221: Once created the users file can be edited using "ed" to do ! 222: the following things: ! 223: ! 224: .in +8 ! 225: - completely remove all users not authorized to execute INGRES. ! 226: ! 227: - restrict a user from using a particular database. ! 228: ! 229: - set the other status bits for appropriate users. ! 230: .in -8 ! 231: ! 232: As UNIX users are added or deleted, the users ! 233: file must be updated appropriately. ! 234: The usersetup program can be executed only once. ! 235: A diagnostic is issued if it is executed a second time. ! 236: .sh ! 237: Creating a Sample Data Base ! 238: .PS ! 239: The "demodb" command provided can be used to construct the sample ! 240: database on ! 241: which the examples in the tutorial (located on-line in ! 242: ".../doc/other/tutorial") are based. ! 243: In order to execute this command ! 244: you must be entered into the users ! 245: file and have permission to create a database. ! 246: To create the sample ! 247: database and assign it the name "demo" ! 248: type the command: ! 249: ! 250: .nf ! 251: demodb demo ! 252: .fi ! 253: ! 254: In order to use INGRES ! 255: with this database you need ! 256: merely type ! 257: ! 258: .nf ! 259: ingres demo ! 260: .fi ! 261: ! 262: and you will be ready to follow the terminal session described in ! 263: the tutorial or to formulate your own queries. ! 264: ! 265: To create your own copy of the same sample database ! 266: use some unique database name. ! 267: ! 268: .nf ! 269: demodb mydemo ! 270: .fi ! 271: ! 272: .sh ! 273: Creating Other Data Bases. ! 274: .PS ! 275: You will no doubt wish to create other databases of your own and ! 276: for this you will need to use "creatdb". ! 277: In order ! 278: to use this command you must be authorized in the users file. ! 279: .sh ! 280: Concurrency Control. ! 281: .PS ! 282: INGRES is designed to run with either no ! 283: concurrency control or with full ! 284: concurrency control. ! 285: INGRES locks portions of a database by using ! 286: a user level process called /etc/ingreslock. ! 287: Initially you can use INGRES without this ! 288: special process. ! 289: If you want concurrency control ! 290: (if more than one person will be using ! 291: INGRES on the same database at the ! 292: same time, you MUST have it) then ! 293: print a copy of the instructions on ! 294: how to install the concurrency device: ! 295: ! 296: .ti +8 ! 297: nroff .../doc/other/lockdev.nr ! 298: ! 299: .sh 1 ! 300: Hints and suggestions. ! 301: .PS ! 302: .dn ! 303: Unix Protection Problems. ! 304: .PS ! 305: If you encounter problems in creating directories or reading in files ! 306: from the tape ! 307: check the protection status of the parent directories involved to make sure ! 308: that permission to write new files exists. ! 309: ! 310: The following summarizes the proper modes for each directory. ! 311: All directories are owned by INGRES except the ! 312: individual databases. ! 313: (The modes in parentheses represent the mode to be used ! 314: if you wish to restrict access maximally.) ! 315: .nf ! 316: ! 317: bin 755 ! 318: data 700 ! 319: data/base 777 ! 320: demo 755 ! 321: doc 755 ! 322: files 755 ! 323: lib 755 ! 324: source and all its subdirectories 755 (700) ! 325: any database 777 (typically owned by the dba) ! 326: .fi ! 327: ! 328: The programs in .../bin should be in the following modes: ! 329: ! 330: .nf ! 331: -rwxr-x--x 1 ingres . . . monitor ! 332: -rwsr----- 1 ingres . . . vaxingres ! 333: .fi ! 334: ! 335: You may need to ! 336: become super-user to add files ! 337: in "/usr/bin". ! 338: .sh ! 339: Upper Case Only Terminals ! 340: .PS ! 341: Remember if you are using an upper-case-only terminal you will have ! 342: to use a double backslash "\\\\" with all terminal monitor commands in order to ! 343: override the interpretation of "\\" as an escape character. ! 344: For example on an upper and lower case terminal you would type: ! 345: ! 346: .nf ! 347: help parts ! 348: \\g ! 349: .fi ! 350: ! 351: while on an upper case only terminal you would type: ! 352: ! 353: .nf ! 354: HELP PARTS ! 355: \\\\G ! 356: .fi ! 357: ! 358: .sh 1 ! 359: Source code and system regeneration ! 360: .dn ! 361: Log on as user "ingres". ! 362: .PS ! 363: When doing any system work always log on as "ingres". ! 364: .sh ! 365: Recompilation. ! 366: .PS ! 367: All source code for the system is located in ".../source" ! 368: and various sub-directories therein. Each subdirectory is ! 369: named for a functional component or sub-component of the system. ! 370: Makefiles for regenerating the various portions of the system ! 371: from source are located in the associated directory. ! 372: To regenerate a particular module (e.g. parser) say: ! 373: ! 374: .nf ! 375: chdir .../source/parser ! 376: make ! 377: .fi ! 378: ! 379: The entire system can be recompiled and installed ! 380: in /usr/bin ! 381: using the command: ! 382: ! 383: .nf ! 384: chdir .../source/conf ! 385: make allinstall sysinstall ! 386: .fi ! 387: ! 388: When recompiling for the first time it is strongly ! 389: advised that you use a hard copy terminal or ! 390: save the output in some other manner. ! 391: ! 392: Libraries of object code are maintained ! 393: in .../lib. ! 394: ! 395: You may find that your C compiler cannot compile INGRES. ! 396: If this is true, you will have to increase the size of ! 397: the symbol table in cpp. ! 398: ! 399: .sh ! 400: Compilation Flags and Funny Flavored UNIXes. ! 401: .PS ! 402: If you are running any system ! 403: other than VM/UNIX release 4.2 (4.2BSD), ! 404: you may have to recompile the INGRES system ! 405: before it is usable. ! 406: Examine the file .../source/unix.h closely ! 407: for correspondence with your version of reality. ! 408: Major problems include representation of user and group id's ! 409: and structures returned by various system calls. ! 410: ! 411: Four compile flags in unix.h define the type of user id's ! 412: used on your system. ! 413: For a vanilla version six system ! 414: with 8-bit user id's and 8-bit group id's, ! 415: set the xV6_UNIX compilation flag. ! 416: For a Berkeley version six system ! 417: with a single 16-bit user id ! 418: (and no group id), ! 419: set the xB_UNIX flag. ! 420: For a vanilla version seven system, ! 421: chocolate version six system, ! 422: or VM/UNIX system, ! 423: with 16-bit user id's and 16-bit group id's ! 424: set xV7_UNIX. ! 425: Also, define either ! 426: VAX ! 427: or ! 428: PDP11 ! 429: depending on whether you are on a PDP-11 or a VAX. ! 430: ! 431: A large set of flags ! 432: in ingres.h ! 433: control compilation of trace information ! 434: and timing estimates. ! 435: Flags of the form "x?TM" ! 436: (where "?" is a letter as described below) ! 437: turn on timing information. ! 438: THESE SHOULD ALWAYS BE LEFT OFF, ! 439: since the system you receive on the distribution tape ! 440: does not include everything necessary to ! 441: successfully use these flags. ! 442: Flags of the form "x?TR1", "x?TR2", and "x?TR3" ! 443: are trace compilation flags. ! 444: Compiling these in does not automatically ! 445: make trace information print, ! 446: but only makes it available. ! 447: These flags must be properly nested; ! 448: for example, if xMTR2 is set, ! 449: xMTR1 must also be set ! 450: (but xMTR3 is optional). ! 451: The letter codes for these flags are as follows: ! 452: ! 453: .nf ! 454: .in +5 ! 455: A Access Methods ! 456: M Terminal Monitor ! 457: P Parser ! 458: Q Qrymod ! 459: D Decomposition ! 460: O One Variable Query Processor ! 461: Z Data Base Utilities ! 462: E Equel ! 463: S Scanner ! 464: T Standalone Routines ! 465: .fi ! 466: .in -5 ! 467: ! 468: A flag named DISTRIB is used in some places ! 469: in the code. ! 470: This is used in the yet-to-be-born ! 471: Distributed INGRES system, ! 472: and should always be left off. ! 473: ! 474: Touching any other defined constants ! 475: should be considered extremely dangerous ! 476: and is done strictly at your own risk. ! 477: ! 478: .sh 1 ! 479: Documentation. ! 480: .dn ! 481: Tutorial on INGRES. ! 482: .PS ! 483: A tutorial on using INGRES can be found in ! 484: ".../doc/other/tutorial.nr". A copy of the document ! 485: can be produced by: ! 486: ! 487: .nf ! 488: nroff .../doc/other/tutorial.nr ! 489: .fi ! 490: ! 491: The tutorial guides the reader through ! 492: examples of using QUEL the INGRES database ! 493: language. A basic familiarity with UNIX is ! 494: assumed. ! 495: .sh ! 496: Reference Manual. ! 497: .PS ! 498: The reference manual consists of a number of files - ! 499: one for each command or feature in INGRES. The reference ! 500: manual can be retrieved by using the ! 501: help command ! 502: (see help(quel)). ! 503: A complete copy of the manual can be ! 504: printed on the line printer by: ! 505: ! 506: chdir .../doc ! 507: make ref ! 508: ! 509: The complete manual is about 80 pages. ! 510: ! 511: .sh ! 512: Maintenance Manual. ! 513: .PS ! 514: A guide to using INGRES has been written and is called ! 515: "Creating and Maintaining ! 516: a Database Using INGRES". ! 517: It includes information about ! 518: creating databases, storage structures, ! 519: recovery, copy, indices and ! 520: other useful information. ! 521: A copy of the manual can be produced by: ! 522: ! 523: .nf ! 524: nroff .../doc/other/maintain.nr ! 525: .fi ! 526: ! 527: .sh ! 528: Design of INGRES ! 529: .PS ! 530: A draft of the report "The Design and Implementation ! 531: of INGRES" by Stonebraker, Kreps and Held can be ! 532: found in ".../doc/other/design.roff". It can be printed ! 533: by: ! 534: ! 535: .nf ! 536: roff .../doc/other/design.roff ! 537: .fi ! 538: ! 539: The report gives a ! 540: fairly detailed description of the structure ! 541: and capabilities of the entire system as ! 542: it existed over eight years ago, in January 1976. ! 543: .ul ! 544: It is out of date in many areas. ! 545: It gives implementation details and ! 546: algorithms of important system modules. ! 547: ! 548: .sh ! 549: Internal Documentation. ! 550: .PS ! 551: We currently do not provide, ! 552: nor have we written any ! 553: internal documentation beyond what ! 554: is mentioned in the "Design and Implementation" ! 555: paper. ! 556: ! 557: This document itself can be reproduced ! 558: by doing: ! 559: ! 560: .nf ! 561: nroff .../doc/other/howto_setup.nr ! 562: .fi ! 563: ! 564: .sh 1 ! 565: Consulting ! 566: .PS ! 567: The INGRES project is not set up to supply ! 568: regular consulting. ! 569: If you do have problems, ! 570: please reread these instructions carefully; ! 571: over two thirds of the "bug reports" we receive ! 572: can be answered by re-reading the documentation. ! 573: For non-technical questions ! 574: (e.g., regarding availability of the system ! 575: or documentation) ! 576: please call the project secretary ! 577: at (415) 642-2344. ! 578: I can also be reached through this number. ! 579: ! 580: ! 581: .in 10 ! 582: .nf ! 583: Joe Kalash ! 584: Electronics Research Laboratory ! 585: University of California ! 586: Berkeley, California 94720 ! 587: .fi ! 588: .in 0
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.