From stuart+@pitt.edu Tue Feb 15 11:56:51 2000 Date: Thu, 10 Feb 2000 10:01:42 -0500 From: Stuart Pomerantz To: sbclass@mail.sis.pitt.edu Subject: oracle for linux Dr. Brass: Well, I finally was able to install oracle 8i for linux. Here are some things that I discovered: 1) You absolutely must have JRE 1.1.6 v5 from http://www.blackdown.org . No other version ( at least none that I tried ) worked. 2) You must have root privilages to install. For your reference, my system is running Red Hat 6.0. BTW, is there some information somewhere that answers the question, "now that I have oracle installed, how do I use it ?" Many thanks, Stu -- 01010011 01110100 01110101 01100001 01110010 01110100 Stuart M. Pomerantz stuart+@pitt.edu PGP5 Public Key: finger stuart+@pitt.edu From stuart+@pitt.edu Tue Feb 15 11:57:08 2000 Date: Sun, 13 Feb 2000 15:03:26 -0500 From: Stuart Pomerantz To: Stefan Brass Class Account Subject: More oracle for linux info for you Dr. Brass: Whoopie! I've got oracle running on linux and I can start sqlplus and log in with username scott password tiger. The default database is there and the cd.sql database you put out for the class works! Here's some more stuff that I figured out: 1) Whatever you do, do NOT patch oracle before you install the default database. svrmgrl will not work if you do the patch first. I haven't tried the patch now that I have things working. 2) I found an absoutely great site for information, including an oracle on linux "how to", here it is: http://www.orafaq.org/ 3) You absolutely must have 128Mb of RAM for oracle to INSTALL. If you don't, which I don't, you can set up an extra swap file with linux so that the OUI will think you have the RAM, and then oracle will install. See man mkswap. Finally, here are the steps I took to get oracle to run: 1) Install the right version of java in /usr/local/jre 2) Make sure you have 128Mb or set up swap so that you do 3) Run the installer. It makes the default SID ORCL and I kept that. 4) After the install copy $ORACLE_HOME/dbs/init.ora to $ORACLE_HOME/dbs/initORCL.ora 5) edit initORCL.ora and make sure that the line db_name=DEFAULT is changed to db_name=orcl . 6) add the following envronmental variables to your shell: ORACLE_HOME=/usr/local/oracle ( or wherever you put it ) LD_LIBRARY_PATH=$ORACLE_HOME/lib PATH=$PATH":$ORACLE_HOME/bin" and most important ORACLE_SID=ORCL notice that the ORCL corresponds exactly to the ORCL in initORCL.ora. This, I think, is the name of the database you wish to access. So make sure these are in your shell environment ( env is a nice way to check ). 5) Once you done this stuff, you have to create the database. To do that go to $ORACLE_HOME/rdbms/install/create and edit crdb1.sh and change the i815 references to be ORCL. Then run the following scripts which reside in that directory like this: ./crdb1.sh ORCL ; ./crdb2.sh ORCL ; ./crdb3.sh ORCL ; ./sqlplus1.sh ORCL ; ./sqlplus2.sh ORCL ; ./sqlplus3.sh ORCL Then go out and have a beer, since it will be a while. 6) After those scripts are successfully run, you can start oracle on linux by 1st running svrmgrl, then typing 1) connect internal and 2) startup 3) exit svrmgrl Now the database should be running and you can log in with user scott , pass tiger. 7) to shut it down, start svrmgrl back up and type 1) connect internal and 2) shutdown abort 3) exit svrmgrl That will shutdown oracle. I Hope that helps somebody out. I like doing all my work in UNIX. It gives me the warm and fuzzy feeling that my machine will work just as well tomorrow as it did today. :-) Thanks again for you help on the homework! Stu ^X -- 01010011 01110100 01110101 01100001 01110010 01110100 Stuart M. Pomerantz stuart+@pitt.edu PGP5 Public Key: finger stuart+@pitt.edu ------------------------------------------------------------------------------- [Monday, Feb 21, 19:50] Another student, who got a CD with Oracle with Redhat Linux instead of downloading it from the Oracle site, had other problems: > Regarding our discussion of Linux this evening, here is the situation. > > I have 8i on Disc from RedHat. From the unix prompt I can type > "svrmgrl" and get into SVRMGR>, but when I type "connect internal" > it does not accept that password "oracle". this is important because the > startup script is as follows: > > crdb1.sh (in /usr/OraHome1/rdbms/install/create) > > #!/bin/sh > ORACLE_SID=$1 > export ORACLE_SID > > $ORACLE_HOME/bin/orapwd file=$ORACLE_HOME/dbs/orapwORCL password=change_on_ins tall > $ORACLE_HOME/bin/svrmgrl << EOF > spool $ORACLE_HOME/install/crdb1.log > connect internal > startup nomount pfile = $ORACLE_HOME/dbs/initORCL.ora > CREATE DATABASE "ORCL" > maxdatafiles 254 > maxinstances 8 > maxlogfiles 32 > character set US7ASCII > national character set US7ASCII > DATAFILE '$ORACLE_HOME/dbs/system01.dbf' SIZE 175M > logfile '$ORACLE_HOME/dbs/redo01.log' SIZE 500K, > '$ORACLE_HOME/dbs/redo02.log' SIZE 500K; > disconnect > spool off > exit > > > EOF > > > It gives an error when it tries to "connect internal". Authorization > privelidges or something like that. > > Also, when I issue the command "sqlplus"...it will not accept > "tiger/scott" nor any of the other passwords you indicated. What do I do > there? In this line it creates the password file: > $ORACLE_HOME/bin/orapwd file=$ORACLE_HOME/dbs/orapwORCL password=change_on_install So the password is change_on_install and not oracle as usual for "internal". > $ORACLE_HOME/bin/svrmgrl << EOF > spool $ORACLE_HOME/install/crdb1.log > connect internal Maybe you should say here connect internal/change_on_install (?) Or it will ask you. By the way, this script creates a database. So it has to be run only once, not every time you start your computer. ------------------------------------------------------------------------------- [Tuesday, Feb 22, 10:55] > What should I do about the inability to run sqlplus using "tiger/scott" > "scott/tiger" or the other combinations you spoke of? Yes, the script which creates the database seems to do very little. Especially, it does not create the guest account scott/tiger. You should at least be able to log in as sys/change_on_install. When you are logged into server manager as internal, you have all rights, and should also be able to create a user. Appendix C of http://www2.sis.pitt.edu/~sbrass/dd00/ explains how to create new users. The basic command is create user scott identified by tiger; grant connect, resource to scott; Appendix C of INFSCI 2711 also explains how to define a tablespace and quotas for the user. But this is probably not very important when you only want to play around with Oracle a bit (i.e. performance and security is no big issue). Of course, you do not need to call the user scott. You then must execute the program "demobld" for creating the example tables emp and dept. An error message at the beginning is normal. (It tries to log in as the unix user without password.) You then have to enter the username and password of the account where you want the tables. Please keep me informed about your progress.