Pedro F. Carvalho Analista de Sistemas [email protected] Instalando Oracle no Linux e preparando ambiente para Módulo 3 10g. Software Setup Instructions 1. Open a terminal window. Login as the root user. 2. Create these operating system groups: oinstall, dba, and, oper. /usr/sbin/groupadd oinstall /usr/sbin/groupadd dba /usr/sbin/groupadd oper 3. Create the operating system user oracle: /usr/sbin/useradd -g oinstall -G dba,oper -d /home/oracle oracle 4. Enter the following command to set the password of the oracle user: /usr/sbin/passwd oracle 5. With an editor of your choosing edit /home/oracle/.bash_profile to include the following entries: umask 022 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib ORACLE_BASE=/u01/app/oracle ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1 ORACLE_SID=orcl LD_LIBRARY_PATH=$ORACLE_HOME/jdk/jre/lib/i386: $ORACLE_HOME/jdk/jre/lib/i386/server: $ORACLE_HOME/rdbms/lib:$ORACLE_HOME/lib:$LD_LIBRARY_PATH PATH=$ORACLE_HOME/bin:$PATH export PATH LD_LIBRARY_PATH export ORACLE_BASE ORACLE_HOME ORACLE_SID 6. Create the directory for the software installation and assign ownership to oracle:oinstall. mkdir -p /u01/app/oracle chown -R oracle:oinstall /u01/app chmod -R 775 /u01/app Pedro F. Carvalho Analista de Sistemas [email protected] 7. Open the /etc/sysctl.conf file in any text editor and add lines similar to the following: kernel.sem = 250 32000 100 128 kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 8. Issue this command to set the kernel parameters: /sbin/sysctl -p 9. Exit from root user. 10. Connect as oracle in a Xterm enabled window to begin the installation. Mount the Oracle Database 10g CD. Execute the script /mnt/cdrom/runInstaller from oracle's home directory, /home/oracle. /mnt/cdrom/runInstaller 11. At the Welcome window, click Next. 12. You need to specify your Inventory Directory. The location should be set to /u01/app/oracle/oraInventory. Operating System Group Name, oinstall. Click OK. 13. A window will appear requesting orainstRoot.sh be executed. Leave this window open and open a new terminal window. 14. You need to execute orainstRoot.sh as the root user. Open a terminal window and enter the following commands: su <rootpassword> cd /u01/app/oracle/oraInventory ./orainstRoot.sh exit exit 15. In the Oracle Universal Installer window and click Continue. 16. In the Specify File Locations window, verify the path is /u01/app/oracle/product/10.2.0/db_1 then click Next. 17. Make sure the Installation Type Enterprise Edition is selected and click Next. Pedro F. Carvalho Analista de Sistemas [email protected] 18. The installer will now verify the system meets all the minimum requirements for installing and configuring the chosen product. Correct any reported issues before continuing. This may require you to stop the installation make the changes then start again. When the check successfully completes click Next. 19. You want to create a starter database. Make sure Create a starter database and General Purpose is selected then click Next. 20. Enter orcl.oracle.com as the Global Database Name, and select the check box to Create database with example schemas. Select Unicode standard UTF-8 AL32UTF8 as the Database Character set. Click Next. 21. The Database Management Options screen allows you to choose between Database Control or Grid Control of your database. In this example, you will accept the default which is Database Control. Click Next. 22. Specify the Database file location as /u01/app/oracle/oradata and click Next. 23. At the Backup and Recovery Options screen, do not enable automated backups. Accept the default and click Next. 24. Enter a password and confirm password for all accounts and click Next. Use password oracle. 25. At the Summary screen, review what will be installed and click Install. 26. You will see the progress window. 27. The Configuration Assistants Window will appear. 28. The Database Configuration Assistant (DBCA) will start. 29. Once the database is created the DBCA Password window will appear, click OK. 30. When the Setup Privileges window appears, open a new terminal window. 31. Execute root.sh as the root user. In the open terminal window and enter the following commands: cd $ORACLE_BASE/product/10.2.0/db_1 su <rootpassword> ./root.sh exit exit Pedro F. Carvalho Analista de Sistemas [email protected] 32. End of installation summary. Click OK. 33. Click Yes to exit. 34. Unlock and assign passwords to all locked schemas in the database. Open a text editor and create a text file named unlock.sh which contains (cut and paste): sqlplus -S /nolog <<ENDSQL connect / as sysdba SET LINESIZE 132 SET PAGESIZE 0 SET TERMOUT OFF SET NEWPAGE 0 SET SPACE 0 SET ECHO OFF SET FEEDBACK OFF SET HEADING OFF SPOOL x.sql SELECT 'ALTER USER '||username||' IDENTIFIED BY '||username||' ACCOUNT UNLOCK;' FROM dba_users WHERE account_status LIKE '%LOCK%'; SPOOL OFF @x.sql !rm x.sql exit <<ENDSQL 35. Change permissions on file unlock.sh to make it executable, then execute it. chmod u+x unlock.sh ./unlock.sh 36. As root create the /u01/asmdisks directories. su mkdir –p /u01/asmdisks 37. Create five 400MB files that will be used as ASM disks. Create those files in /u01/asmdisks. cd /u01/asmdisks dd if=/dev/zero of=asm_disk1 dd if=/dev/zero of=asm_disk2 dd if=/dev/zero of=asm_disk3 dd if=/dev/zero of=asm_disk4 dd if=/dev/zero of=asm_disk5 bs=1024k bs=1024k bs=1024k bs=1024k bs=1024k count=400 count=400 count=400 count=400 count=400 Pedro F. Carvalho Analista de Sistemas [email protected] 38. Make sure that the asm_disk files are associated to raw devices, and have the right permissions: chmod 777 asm_disk* losetup losetup losetup losetup losetup raw raw raw raw raw /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 asm_disk1 asm_disk2 asm_disk3 asm_disk4 asm_disk5 /dev/raw/raw1 /dev/raw/raw2 /dev/raw/raw3 /dev/raw/raw4 /dev/raw/raw5 chown chown chown chown chown /dev/loop1 /dev/loop2 /dev/loop3 /dev/loop4 /dev/loop5 oracle:oinstall oracle:oinstall oracle:oinstall oracle:oinstall oracle:oinstall /dev/raw/raw1 /dev/raw/raw2 /dev/raw/raw3 /dev/raw/raw4 /dev/raw/raw5 39. Make sure that you stage the Oracle Secure Backup software in the /stage/OSB directory: You should grab ob-4.1cdrom050705 first. Contact your OU representative for more information. su – mkdir /stage cd /stage mkdir OSB cd OSB 40. Then you need to patch the EM software for Oracle Secure Backup links to appear. For that step, you need to replace. For this step, you need to contact your OU representative. 41. As user oracle create the labs and solutions directory in $HOME cd mkdir labs mkdir solutions 42. As oracle user, extract D17092GC30_labs.zip in $HOME. First, you need to ftp Pedro F. Carvalho Analista de Sistemas [email protected] D17092GC30_labs.zip to $HOME in binary mode. Once done, move all the files located into $HOME/D17092GC30_labs/labs into $HOME/labs. Then, move all the files located into $HOME/D17092GC30_labs/solutions into $HOME/solutions. Then, remove the $HOME/D17092GC30_labs directory and the D17092GC30_labs.zip. cd unzip -a D17092GC30_labs.zip mv $HOME/D17092GC30_labs/labs/* $HOME/labs mv $HOME/D17092GC30_labs/solutions/* $HOME/solutions rm -Rf D17092GC30_labs rm D17092GC30_labs.zip 43. Change permissions to 777 on all the files locates into $HOME/labs and $HOME/solutions: cd $HOME/labs chmod 777 * cd $HOME/solutions chmod 777 * Non-Oracle software: Mozilla 1.4 with these plugins configured: Adobe SVG Viewer 3.01 Beta (Build 88) Adobe Acrobat Reader 5.08 Java Runtime Environment 1.4.2_03 These plugins and the installation instructions are available from Mozilla(http://plugindoc.mozdev.org/linux.html)