Hi, this is my first ebuild for Gentoo. I just converted the SuSE oracle runtime to gentoo. ftp://ftp.suse.com/pub/suse/i386/supplementary/commercial/Oracle/sles-8/orarun.rpm This is a very handy way if you want to install Oracle 9.2i. The file includes a startskript for init.d and a nice way to configure runtime variables for oracle setups. I suggest dev-db/orarun. I also included a mini howto for installing Oracle 9.2. Harald
Created attachment 20108 [details] Oracle 9.2 Mini Howto This is a file explaining how to setup Oracle 9.2 with Gentoo.
Created attachment 20109 [details] orarun-9.2.0.ebuild Oracle 9.2 environment for Gentoo
Here are a few pointers to help you write ebuilds better, and also to help this get into portage faster. 1) look into the enewuser and enewgroup fuctions in the eutils eclass, these will add users in a portage friendly way, this can be done in src_install in this particular ebuild. 2) rather than doing install -d in postinstall on ${ROOT} (which is outside sandbox and not allowed ebuild policy) please do keepdir /opt/oracle (which adds a .keep file to it and tells portage to install an empty directory), that way these directories will still be managed by portage. preinst and postinst should be used only if entirely necessary, in this case all that stuff can (and should) be done in src_install. I'll put this ebuild in portage once the corrections are made, perhaps it'd be a good idea to install the mini howto with the ebuild , just dodoc ${FILESDIR}/oracle.howto or whatever, then we can point to it for reference after the ebuild is done, Thanks.
Comment on attachment 20108 [details] Oracle 9.2 Mini Howto File is now in the new ebuild.
Comment on attachment 20109 [details] orarun-9.2.0.ebuild enhanced version.
Created attachment 20125 [details] orarun-9.2.0.ebuild - including changes and howto This files includes the suggested changes. Harald
Thumbs up! Is this in the portage tree? I was seeking a way to get Oracle 9i R2 running on Gentoo without to much work of my own (Suse took me my last time about 2 full days!).
Just read the howto that is provided with the file. I have 9.2.0 running. There are several "bugs" in the oracle installer and the howto tells you what todo.
Yes! Oracle 10g for Linux was released yesterday! Could you also write a support packages + install instructions for Oracle 10g on Linux?
Hi, wow good news! Have a look to the script. It might work with Oracle 10, too. It's possible that it will run out of the box. You might want to skipt the gcc 2.95.x installation and of course the Ora9 patches. As soon as SuSE releases a new Ora Env script i will port it. The env script they made is usable for Ora 8 and 9 so the chance is high that it might work even with Ora 10. Once again - don't use Gentoo with Oracle for production use! Gentoo is not a certified distributon for Oracle! I only made this port for using Oracle on my Gentoo notebook. If you need commercial support for Oracle on a non certified distribution this will cause major troubles.
is there a place to get a demo or trial version of oracle so i can test this stuff before commiting?
Sure. http://otn.oracle.com/software/index.html
ok, got it.. one question. Is there any possible way to not use X to install oracle? it seems somewhat awkward to use a GUI to install a server based app.. I'd rather not emerge xfree just to install this thing, though I will if necessary, I've been wanting to learn oracle for a while so this might be a good opportunity
One word - no. ... and I hate Java - and I hate the Oracle installer.
Okay, you need xfree, but not KDE or Gnome, since you can transport it to a different computer. BTW: Windows always runs with GUI, even after install. So this kind of server, always has a GUI on! Oracle 10g: The installer wants to be run on a cretified Linux, but I also want it on my notebook. -> installer option "-ignoreSysPrereqs" should skip this check.
neat oracle is running now what do i do? :P
BTW: Today, I was not able to umcompress the archives! (nd the cksum was correct) (ugh) So what I did was: gzcat ship.db.cpio.gz | cpio -idmv And it worked! :)
ok, i got oracle running without *too* much effort, the installer was wierd and freaked out on me a few times before i got it to work anyway, write up the changes for 10g and I'll commit them both (include the info about skipping certified distro checks, etc)
My installation was smooth and fast 1) gzcat ship.db.cpio.gz | cpio -idmv [1.1 export DISPLAY=ip:0.0 since, I was on a remote workstation] 2) ./runInstaller -ignoreSysPrereqs 3) I installed the default 4) The install process asks you to run, a root.sh -> do it 5) chance /etc/oratab the N to Y so the instance will be started and stopped. done. BTW: I'm using the orarun-9.2.0 package. Without problems (at least for only starting/stoping the DB) Please notice: oemapp is now in the client.cpio file so I also installed this one! The Windows Oralce Management Console 9i R1 seems to have small problems to connect to an 10g instance. It works, but the configuration is totally wrong displayed :)
As of for now, Oracle 10g database seems to work without problems. I use the orarun package to start/stop it. -> I only had to manually change the old 9.2.0 to the new 10.1.0, but that was my "fault" since I used a new install path. The only thing that didn't work, was to comile php and mod_php with Oracle support! That is important for me, so I will have to look again at this issue!
Hi, i am not sure if Oracle 10 works with PHP. You must have a $ORACLE_HOME setup propperly to get this working. I am highly interessed in that! Currently i don't have time/fun dealing with Ora 10 but one day i have to ;)
anything for me on comment #18 ?
I will write a 10g ebuild when i have my new computer (i hope this weekend).
I am working on the ora 10.1.0 ebuilds. This is a modified version for the 9.2.0 (SuSE SLES seams to use the same orarun.rpm for 10.2). Currently i have some trouble with php 4.3.4 and oci8. I wait until a 4.3.5 ebuild is available. I will release the next ebuild in a few days.
Fine - php 4.3.5 is out for Gentoo. It works together with ora 10g - expect a new ebuild soon.
I have install oracle database 10g i nmy gentoo and work fine. I have modified on installation the file root.sh for init.d install error. I have create init script for boot oracle. I have modified my .bash_profile on user oracle. 1) i have comment this line on root.sh .... ..... # basic copies first... $CP $CH/css/admin/init.cssd $ID/init.cssd for rc in $RCDIR do $RM -f $rc/"$RC_START"init.cssd $rc/"$RC_KILL"init.cssd ---> # $LNS $ID/init.cssd $rc/"$RC_START"init.cssd || { $ECHO $?; exit 1; } ---> # $LNS $ID/init.cssd $rc/"$RC_KILL"init.cssd || { $ECHO $?; exit 1; } done ...... ........ 2) I have use and modified this scripts /etc/init.d/dboracle #!/sbin/runscript # Akadia AG, Arvenweg 4, CH-3604 Thun # ---------------------------------------------------------------------- # File: dboracle # # Autor: Martin Zahn / 10.03.2004 # # Purpose: Startup Oracle Database(s) defined in # /etc/oratab # ---------------------------------------------------------------------- # NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1; export NLS_LANG ORACLE_OWNER=oracle; export ORACLE_OWNER ORACLE_HOME=/opt/oracle/product/10.1.0/db_1; export ORACLE_HOME depend() { need net } start() { ebegin "Starting Oracle" if [ ! -f $ORACLE_HOME/bin/dbstart ] then echo "Oracle not started (no dbstart script)" else su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbstart fi eend $? "Failed to start Oracle." } stop() { ebegin "Stopping Oracle" if [ ! -f $ORACLE_HOME/bin/dbshut ] then echo "Oracle not started (no dbshut script)" else su - $ORACLE_OWNER -c $ORACLE_HOME/bin/dbshut fi eend $? "Failed to stop Oracle." } /etc/init.d/lsnroracle #!/sbin/runscript # Akadia AG, Arvenweg 4, CH-3604 Thun # ---------------------------------------------------------------------- # File: lsnroracle # # Autor: Martin Zahn / 10.03.2004 # # Purpose: Startup Oracle Listeners # ---------------------------------------------------------------------- depend() { need net after dboracle } start() { ebegin "Start Oracle Listeners" ORACLE_OWNER=oracle; export ORACLE_OWNER # TNS_ADMIN=/home/oracle/config/10.1.0; export TNS_ADMIN ORACLE_HOME=/opt/oracle/product/10.1.0/db_1; export ORACLE_HOME # ORA_NLS=$ORACLE_HOME/nls/data; export ORA_NLS # LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH su $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start" eend $? "Failed to start Oracle Listeners." } stop() { ebegin "Stopping Oracle Listeners" ORACLE_OWNER=oracle; export ORACLE_OWNER # TNS_ADMIN=/home/oracle/config/10.1.0; export TNS_ADMIN ORACLE_HOME=/opt/oracle/product/10.1.0/db_1; export ORACLE_HOME # ORA_NLS=$ORACLE_HOME/nls/data; export ORA_NLS # LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH su $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop" eend $? "Failed to stop Oracle Listeners." } 3) I have modified .bash_profile for user oracle # Setup ORACLE environment ($ORACLE_HOME/.bash_profile) umask 022 export ORACLE_BASE=/opt/oracle export ORACLE_SID=gentoo export ORACLE_TERM=xterm # For Oracle Server export ORACLE_HOME=$ORACLE_BASE/product/10.1.0/db_1 export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_BASE/product/10.1.0/client_2/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${ORACLE_HOME}/lib export CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export NLS_LANG=ITALIAN_ITALY.WE8ISO8859P1 DISABLE_HUGETLBFS=1; export DISABLE_HUGETLBFS I have found on documentaion of oracle site this text: B Non-interactive Installation and Configuration This chapter describes how to install and configure Oracle products non-interactively using response files. It includes information about the following topics: * Introduction * Create the oraInst.loc File * Prepare Response Files * Run the Installer Non-interactively Introduction You can install Oracle software non-interactively by specifying a response file when you start the Oracle Universal Installer. The Installer uses the values contained in the response file to provide answers to some or all of the Installer prompts. If you include responses for all of the Installer prompts in the response file, then you can run a completely non-interactive installation without seeing the Installer windows. To install and configure Oracle products non-interactively, follow these steps: 1. Create the oraInst.loc file. 2. Prepare a response file. 3. Run the Installer non-interactively. These steps are described in the following sections. Create the oraInst.loc File If you plan to install Oracle products non-interactively, you must manually create the oraInst.loc file if it does not already exist. This file specifies the location of the Oracle Inventory directory where the Installer creates the inventory of Oracle products installed on the system. Note: If Oracle software has been installed previously on the system, the oraInst.loc file might already exist. If the file does exist, you do not need to create a new file. To create the oraInst.loc file, follow these steps: 1. Switch user to root: $ su - root 2. On HP-UX, Solaris, and Tru64 UNIX, create the /var/opt/oracle directory if it does not exist: # mkdir -p /var/opt/oracle 3. Change directory as follows, depending on your operating system: * AIX and Linux: # cd /etc * HP-UX, Solaris, and Tru64 UNIX: # cd /var/opt/oracle 4. Use a text editor to create the oraInst.loc file, containing the following lines: inventory_loc=ORACLE_BASE/oraInventory inst_group= In this example, ORACLE_BASE is the path of the Oracle base directory, for example, /01/app/oracle. 5. Enter the following commands to set the appropriate owner, group, and permissions on the oraInst.loc file: # chown oracle:oinstall oraInst.loc # chmod 664 oraInst.loc Prepare Response Files Oracle provides response file templates for each product and installation type, and for each configuration tool. These files are located in the response directory on the CD-ROM or the db/response directory on the DVD-ROM. Note: If you copied the software to a hard disk, the response files are located in the Disk1/response directory. Table B-1 lists the response files provided with Oracle Database. Table B-1 Response Files Response File Description enterprise.rsp Enterprise Edition installation of Oracle Database standard.rsp Standard Edition installation of Oracle Database custom.rsp Custom installation of Oracle Database dbca.rsp Database Configuration Assistant netca.rsp Oracle Net Configuration Assistant To prepare a response file: 1. Copy the response file from the response file directory to a directory on your system: $ cp /directory_path/response/response_file.rsp local_directory In this example, directory_path is the CD-ROM mount point directory or the db directory on the DVD-ROM. If you have copied the software to a hard drive, you can edit the file in the response directory if you prefer. 2. Open the response file in a text editor: $ vi /local_dir/response_file.rsp 3. Edit the file, following the instructions in the file. Note: The Installer or configuration assistant fails if you do not correctly configure the response file. See "Silent Response File Error Handling" for more information about troubleshooting a failed non-interactive installation. 4. Change the permissions on the file to 700: $ chmod 700 /local_dir/response_file.rsp Caution: A fully specified response file for an Oracle Database installation contains the passwords for database administrative accounts and for a user that is a member of the OSDBA group (required for automated backups). Make sure that only the Oracle software owner user can view or modify response files or consider deleting them after the installation succeeds. Run the Installer Non-interactively To run the Oracle Universal Installer non-interactively, enter a command similar to the following: Note: Do not specify a relative path to the response file. If you specify a relative path, the Oracle Universal Installer fails. $ /directory_path/runInstaller [-silent] -responseFile filename In the previous example: * directory_path is either the CD-ROM mount point directory, the path of the db directory on the DVD-ROM, or the path of the Disk1 directory on the hard drive * The -silent parameter specifies a completely non-interactive installation * filename is the full path and filename of the installation response file that you configured This is fine for install oracle with ebuild.
Way too old to do anything with this.