Database Basic Pract
-
Upload
rodrigo-oviedo -
Category
Documents
-
view
232 -
download
0
Transcript of Database Basic Pract
-
8/22/2019 Database Basic Pract
1/58
PRACTICA I- INSTALACION
ORACLE LINUX
-
8/22/2019 Database Basic Pract
2/58
Pre-Installation Testing Media
-
8/22/2019 Database Basic Pract
3/58
3.2) Click OK to Test the Media, If you dont wanna test go directly to Step 3.6
http://sangramkeshari.files.wordpress.com/2013/03/113.png -
8/22/2019 Database Basic Pract
4/58
3.3) Click OK or Press Enter if Test is Highlighted
http://sangramkeshari.files.wordpress.com/2013/03/213.png -
8/22/2019 Database Basic Pract
5/58
3.4) Wait for it to Finish
http://sangramkeshari.files.wordpress.com/2013/03/312.png -
8/22/2019 Database Basic Pract
6/58
3.5) Click OK
http://sangramkeshari.files.wordpress.com/2013/03/412.png -
8/22/2019 Database Basic Pract
7/58
3.6) Click CONTINUE or Press Enter after you select CONTINUE
http://sangramkeshari.files.wordpress.com/2013/03/53.png -
8/22/2019 Database Basic Pract
8/58
3.7) Click SKIP or Press Enter after you select SKIP
http://sangramkeshari.files.wordpress.com/2013/03/63.png -
8/22/2019 Database Basic Pract
9/58
4) Starting Linux Installation
4.1) Click NEXT
http://sangramkeshari.files.wordpress.com/2013/03/73.png -
8/22/2019 Database Basic Pract
10/58
4.2) Select English and Click NEXT
http://sangramkeshari.files.wordpress.com/2013/03/103.png -
8/22/2019 Database Basic Pract
11/58
4.3) Choose for Keyboard
http://sangramkeshari.files.wordpress.com/2013/03/114.png -
8/22/2019 Database Basic Pract
12/58
4.4) Select YES to Continue. No need to worry as you are on a virtual new hard disk. Click Yes to
Erase all data.
http://sangramkeshari.files.wordpress.com/2013/03/122.png -
8/22/2019 Database Basic Pract
13/58
4.5) I am not going by the default options here. Choosing a custom layout to create new mount pointsand giving SWAP & TEMP more space.
http://sangramkeshari.files.wordpress.com/2013/03/132.png -
8/22/2019 Database Basic Pract
14/58
4.6) Nothing created so far , So it shows all 100 GB in free space. Space 100 GB is not yet allocated to
the virtual hard disk.
http://sangramkeshari.files.wordpress.com/2013/03/141.png -
8/22/2019 Database Basic Pract
15/58
4.7) Choosing 100 MB for Boot partition
http://sangramkeshari.files.wordpress.com/2013/03/151.png -
8/22/2019 Database Basic Pract
16/58
4.8) Choosing 5192 MB/ 5 GB for SWAP You can go for 4096 as well.
http://sangramkeshari.files.wordpress.com/2013/03/161.png -
8/22/2019 Database Basic Pract
17/58
4.9) Choosing 5192 MB/ 5 GB for /tmp You can go for 4096 as well.
http://sangramkeshari.files.wordpress.com/2013/03/181.png -
8/22/2019 Database Basic Pract
18/58
4.10) Allocating 20480 MB/20 GB to / (root) partition to hold the OS software.
http://sangramkeshari.files.wordpress.com/2013/03/191.png -
8/22/2019 Database Basic Pract
19/58
4.11) Allocating 61440 MB/60 GB to /u01 for my future software installations.
http://sangramkeshari.files.wordpress.com/2013/03/202.png -
8/22/2019 Database Basic Pract
20/58
4.12) Seeing what is going to be created
http://sangramkeshari.files.wordpress.com/2013/03/215.png -
8/22/2019 Database Basic Pract
21/58
4.13) Click NEXT
http://sangramkeshari.files.wordpress.com/2013/03/222.png -
8/22/2019 Database Basic Pract
22/58
4.14) Click NEXT
http://sangramkeshari.files.wordpress.com/2013/03/231.png -
8/22/2019 Database Basic Pract
23/58
4.15) Choose your TIME ZONE
http://sangramkeshari.files.wordpress.com/2013/03/241.png -
8/22/2019 Database Basic Pract
24/58
4.16) choose your ROOT Password
http://sangramkeshari.files.wordpress.com/2013/03/251.png -
8/22/2019 Database Basic Pract
25/58
4.17) I choose customize later as there are different set of RPMs required for different purposed. You
can clone this VM for your purpose and Install required extra RPMs.
http://sangramkeshari.files.wordpress.com/2013/03/261.png -
8/22/2019 Database Basic Pract
26/58
4.18) Click NEXT
http://sangramkeshari.files.wordpress.com/2013/03/272.png -
8/22/2019 Database Basic Pract
27/58
4.19) Now system will format all the partitions we created and Begin the Installation.
http://sangramkeshari.files.wordpress.com/2013/03/282.png -
8/22/2019 Database Basic Pract
28/58
4.20) Once Installation is OVER you will see it asking for a REBOOT.
http://sangramkeshari.files.wordpress.com/2013/03/292.png -
8/22/2019 Database Basic Pract
29/58
4.21) Click FORWARD
http://sangramkeshari.files.wordpress.com/2013/03/302.png -
8/22/2019 Database Basic Pract
30/58
4.22) Choose option YES and Click FORWARD
http://sangramkeshari.files.wordpress.com/2013/03/313.png -
8/22/2019 Database Basic Pract
31/58
4.23) Choose Firewall DISABLED and Click FORWARD
http://sangramkeshari.files.wordpress.com/2013/03/321.png -
8/22/2019 Database Basic Pract
32/58
4.24) Choose SELinux DISABLED and Click FORWARD
http://sangramkeshari.files.wordpress.com/2013/03/331.png -
8/22/2019 Database Basic Pract
33/58
4.24) Click FORWARD
http://sangramkeshari.files.wordpress.com/2013/03/341.png -
8/22/2019 Database Basic Pract
34/58
4.25) Choose DATE & TIME
http://sangramkeshari.files.wordpress.com/2013/03/351.png -
8/22/2019 Database Basic Pract
35/58
4.26) Create a USER
http://sangramkeshari.files.wordpress.com/2013/03/361.png -
8/22/2019 Database Basic Pract
36/58
4.27) Test Your Sound Card
http://sangramkeshari.files.wordpress.com/2013/03/371.png -
8/22/2019 Database Basic Pract
37/58
4.28) I am not installing any Additional CD at this movement.
http://sangramkeshari.files.wordpress.com/2013/03/381.png -
8/22/2019 Database Basic Pract
38/58
4.29) The Welcome Screen. Login with your credentials.
http://sangramkeshari.files.wordpress.com/2013/03/391.png -
8/22/2019 Database Basic Pract
39/58
4.30) You can check the Primary Memory consumption out of 2 GB we given and Secondary Memory(Partition Wise) Status.
http://sangramkeshari.files.wordpress.com/2013/03/401.png -
8/22/2019 Database Basic Pract
40/58
Congratulations !!! Your LAB Virtual Machine is Ready for Testing Purpose.
2- Mediante las herramientas yum y rpm instalar los siguientes paquetes
binutils-2.17.50.0.6 glibc-devel-2.5
compat-libstdc++-33-3.2.3 glibc-headers-2.5
elfutils-libelf-0.125 kernel-headers-2.6.18
elfutils-libelf-devel-0.125 ksh-20060214
elfutils-libelf-devel-static-0.125 libaio-0.3.106
gcc-4.1.2 libaio-devel-0.3.106
gcc-c++-4.1.2 libgcc-4.1.2
glibc-2.5-24 libgomp-4.1.2
glibc-common-2.5 libstdc++-4.1.2
libstdc++-devel-4.1.2
make-3.81
http://sangramkeshari.files.wordpress.com/2013/03/413.png -
8/22/2019 Database Basic Pract
41/58
sysstat-7.0.2
libXp
-
8/22/2019 Database Basic Pract
42/58
PRACTICA II- INSTALACION
BASE DE DATOS
-
8/22/2019 Database Basic Pract
43/58
Preinstallation Requirements
login as root
Memory
RAM: At least 4 GB
[root@di-rep-db ~]# grep MemTotal /proc/meminfo
MemTotal: 4344304 kB
swap space
The following table describes the relationship between installed RAM and the configured swap space
requirement:
RAM Swap Space
Between 4 GB and 8 GB 2 times the size of RAM
Between 8 GB and 32 GB 1.5 times the size of RAM
More than 32 GB 32 GB
To determine the size of the configured swap space, enter the following command:
[root@di-rep-db ~]# grep SwapTotal /proc/meminfo
SwapTotal: 10860752 kB
To determine the available RAM and swap space, enter the following command:
[root@di-rep-db ~]# free
total used free shared buffers cached
Mem: 4344304 4215960 128344 0 13892 3913024
-/+ buffers/cache: 289044 4055260
Swap: 10860752 0 10860752
Add Swap space if needed.
System Architecture
Verify that the processor architecture matches the Oracle software release that you want to install.
[root@di-rep-db ~]# uname -m
http://gerardnico.com/wiki/linux/swap#add_swap_spacehttp://gerardnico.com/wiki/linux/swap#add_swap_space -
8/22/2019 Database Basic Pract
44/58
x86_64
Disk Space
Disk space requirements
The following tables describe the disk space requirements on Linux x86:
Installation Type Software (GB) Data (GB)
Enterprise Edition 4.35 1.68
Standard Edition 3.73 1.48
Operating System (Distribution) and kernel
Check that you have the minimal operating systemand kernel.
Minimal Distribution Minimal Kernel
Oracle Linux 4 Update 7 2.6.9 or later
Oracle Linux 5 Update 22.6.18 or later (compatible with Red Hat
Enterprise kernel)
Oracle Linux 5 Update 5 (only if using Oracle
Unbreakable Enterprise Kernel)2.6.32-100.0.19 or later
[root@di-rep-db ~]# cat /etc/enterprise-release
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
[root@di-rep-db ~]# uname -r
2.6.18-194.el5
Network Setup
DNS
Verify the value of the DNS configuration file /etc/resolv.conf. The nameserver must be not set or set to
a valid DNS server and you can add the two time-out parameters.
Disable secure linux
Disable secure linux by editing the /etc/selinux/config file, making sure the SELINUX flag is set as
follows:
http://gerardnico.com/wiki/linux/distribution_versionhttp://gerardnico.com/wiki/linux/distribution_versionhttp://gerardnico.com/wiki/linux/kernel_versionhttp://gerardnico.com/wiki/linux/resolv.confhttp://gerardnico.com/wiki/linux/resolv.confhttp://gerardnico.com/wiki/linux/selinuxhttp://gerardnico.com/wiki/linux/distribution_versionhttp://gerardnico.com/wiki/linux/kernel_versionhttp://gerardnico.com/wiki/linux/resolv.confhttp://gerardnico.com/wiki/linux/selinux -
8/22/2019 Database Basic Pract
45/58
SELINUX=disabled
Alternatively, this alteration can be done using the GUI tool.
Operating System Groups
Log in as root.
Installation Groups
Create OS groups.
/usr/sbin/groupadd -g 501 dba
Creating the Oracle Inventory Group
When you install Oracle software on the system for the first time, Oracle Universal Installer creates the
oraInst.loc file.
If the oraInst.loc file does not exist, then create the Oracle Inventory group by entering the following
command:
# /usr/sbin/groupadd oinstall
Software Owners
The software owner is used to own and start the installation of an oracle database. You have typically
two software owner:
oracle, for the database software
and grid for the Oracle Restart owner user.
Creation
As we install a single database, we need only the oracle user. To create it, enter a command similar to
the following:
[root@@di-rep-db ~]# /usr/sbin/useradd -u 501 -g oinstall -G dba oracle
In the preceding command:
http://gerardnico.com/wiki/linux/firewallhttp://gerardnico.com/wiki/database/oracle/grouphttp://gerardnico.com/wiki/database/oracle/orainventory#orainstlochttp://gerardnico.com/wiki/database/oracle/software_ownerhttp://gerardnico.com/wiki/linux/firewallhttp://gerardnico.com/wiki/database/oracle/grouphttp://gerardnico.com/wiki/database/oracle/orainventory#orainstlochttp://gerardnico.com/wiki/database/oracle/software_owner -
8/22/2019 Database Basic Pract
46/58
The -u option specifies the user ID. Using this command flag is optional, as you can allow the
system to provide you with an automatically generated user ID number. However, you must
make note of the oracle user ID number, as you require it later during preinstallation.
The -g option specifies the primary group, which must be the Oracle Inventory groupfor
example, oinstall The -G option specifies the secondary groups, which include the OSDBA group, and the
OSOPER group.
Verify your user:
[root@di-rep-db /]# id oracle
uid=501(oracle) gid=502(oinstall) groups=502(oinstall),501(dba),505(oper)
Set the password of the oracle user:
[root@di-rep-db /]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is WAY too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
Installation Fixup Scripts
During installation, for certain prerequisite check failures, you can click Fix & Check Again to generate
a fixup script (runfixup.sh). You can run this script as a root user to complete the required
preinstallation steps.
The fixup script does the following:
Checks and sets kernel parameters to values required for successful installation, including:
Shared memory parameters
Semaphore parameters
Open file descriptor and UDP send/receive parameters
Sets permissions on the Oracle Inventory directory.
http://gerardnico.com/wiki/database/oracle/orainventory#grouphttp://gerardnico.com/wiki/database/oracle/group#osdbahttp://gerardnico.com/wiki/database/oracle/group#osdbahttp://gerardnico.com/wiki/database/oracle/group#osdbahttp://gerardnico.com/wiki/database/oracle/orainventory#grouphttp://gerardnico.com/wiki/database/oracle/group#osdbahttp://gerardnico.com/wiki/database/oracle/group#osdba -
8/22/2019 Database Basic Pract
47/58
Reconfigures primary and secondary group memberships for the installation owner, if
necessary, for the Oracle Inventory directory, and for the operating system privileges groups.
Sets up virtual IP and private IP addresses in /etc/hosts.
Sets shell limits to required values, if necessary.
Installs the Cluster Verification Utility packages (cvuqdisk rpm).
Using fixup scripts will not ensure that all the prerequisites for installing Oracle Database are satisfied.
You must still verify that all the preinstallation requirements are met to ensure a successful installation.
Shell limits
To improve the performance of the software, you must increase the following shell limits for the Oracle
installation owners:
Shell LimitItem in
limits.confHard Limit Soft Limit
Maximum number of open file
descriptorsnofile at least 65536 at least 1024
Maximum number of processes
available to a single usernproc at least 16384 at least 2047
Maximum size of the stack segment of
the processstack
at least 10240 KB, and at
most 32768 KB
at least 10240
KB
To increase the shell limits: Depending on your environment, make the following changes for all
Oracle installation owners. The steps below only show the user oracle.
Kernel Parameters
I. Environment:
================
1. Modify your kernel settings in /etc/sysctl.conf (RedHat) as follows. If the current value for
any parameter is higher than the value listed in this table, do not change the value of that
parameter. Range values (such as net.ipv4.ip_local_port_range) must match exactly.
kernel.shmall = physical RAM size / pagesize For most systems, this will be the value 2097152.
To view the pagesize, run getconf PAGE_SIZE
kernel.shmmax = 1/2 of physical RAM, but not greater than 4GB. This would be the value
2147483648 for a system with 4Gb of physical RAM.
http://gerardnico.com/wiki/linux/limits.confhttp://gerardnico.com/wiki/database/oracle/software_ownerhttp://gerardnico.com/wiki/database/oracle/software_ownerhttp://gerardnico.com/wiki/linux/file_descriptorhttp://gerardnico.com/wiki/linux/file_descriptorhttp://gerardnico.com/wiki/linux/limits.confhttp://gerardnico.com/wiki/database/oracle/software_ownerhttp://gerardnico.com/wiki/database/oracle/software_ownerhttp://gerardnico.com/wiki/linux/file_descriptorhttp://gerardnico.com/wiki/linux/file_descriptor -
8/22/2019 Database Basic Pract
48/58
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 512 x processes (for example 6815744 for 13312 processes)
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500a.) The runInstaller (OUI) checks may expect this to be the old guidance of "1024 65000". The
new guidance from Oracle development is "9000 65500". Please allow the runInstaller (OUI) to
proceed with the new guidance from Oracle development.
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
2. To activate these new settings into the running kernel space, run the "sysctl -p" command as
root.
3. Set Shell Limits for the oracle User. Assuming that the "oracle" Unix user will perform the
installation, do the following:
a.) Add the following settings to /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
b.) Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:
session required pam_limits.so
c.) Add the following lines to /etc/profile:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -u 16384
ulimit -n 65536
-
8/22/2019 Database Basic Pract
49/58
else
ulimit -u 16384 -n 65536
fi
fi
4. The gcc-4.1.2 and gcc-c++-4.1.2 RPM items above will ensure that the correct gcc / g++versions are installed. It is also required that you ensure that these correct gcc / g++ versions are
active, and in-use. Ensure that the commands "gcc --version" and "g++ --version" each return
"4.1.x".
5. The hostname command should return the fully qualified hostname as shown
below:
% hostname
hostname.domainname
6. If any Java packages are installed on the system, unset the Java environment variables, for
example JAVA_HOME.
7. The oracle account used to install Oracle 11.2.0.1, should not have the Oracle install related
variables set by default. For example setting ORACLE_HOME, PATH, LD_LIBRARY_PATH
to include Oracle binaries in .profile, .login file and /etc/profile.d should be completely avoided.
a.) Setting $ORACLE_BASE (not $ORACLE_HOME) is recommended, since it eases a few
prompts in the OUI runInstaller tool.
b.) following the succesful install, it is recommended to set $ORACLE_HOME, and to set
$PATH to include $ORACLE_HOME/bin at the beginning of the $PATH string.
8. By default, RHEL 5 x86 Linux is installed with SELinux as "enforcing". This is fine for the
11gR2 installation process. However, to subsequently run "sqlplus", switch SELinux to the
"Permissive" mode. See NOTE 454196.1, "./sqlplus: error on libnnz11.so: cannot restore
segment prot after reloc" for more details.
II. Environment Variables
Add the following lines to /home/oracle/.bash_profile
export ORACLE_BASE=/oracle/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_home1
https://support.oracle.com/epmos/faces/ui/km/DocumentDisplay.jspx?id=454196.1https://support.oracle.com/epmos/faces/ui/km/DocumentDisplay.jspx?id=454196.1https://support.oracle.com/epmos/faces/ui/km/DocumentDisplay.jspx?id=454196.1 -
8/22/2019 Database Basic Pract
50/58
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_SID=orcl
ADDITIONAL NOTES
----------------
1. Supported distributions of the 32-bit (x86) Linux OS can run on on AMD64/EM64T and Intel
Processor Chips that adhere to the x86_64 architecture
a.) Oracle 32-bit running on AMD64/EM64T with 32-bit OS is supported, and is covered by
this NOTE.
b.) Oracle 32-bit running on AMD64/EM64T with 64-bit OS is not certified and is not
supported.
2. Asynchronous I/O on ext2 and ext3 file systems is supported if your scsi/fc driver supports
that functionality.
3. No extra patch is required for the DIRECTIO support for x86.
4. No LD_ASSUME_KERNEL value should be used with the 11gR2 product.
Directories
Oracle base directory
The Oracle base directory is a top-level directory for Oracle software installations.
To create an appropriate directory:
Check the free disk space on each mounted file system using the following command:
# df -h
Create the Oracle Base Directory
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
http://gerardnico.com/wiki/database/oracle/oracle_basehttp://gerardnico.com/wiki/database/oracle/oracle_base -
8/22/2019 Database Basic Pract
51/58
chmod -R 775 /u01/app/oracle
chmod -R 775 /u01/app
set the ORACLE_BASEenvironment variable for the user Oracle to specify the Oracle base
directory that you have created.
OraInventory
The Oracle Inventory directory(oraInventory) stores an inventory of all software installed on the
system.
mkdir -p /u01/app/oraInventory
chown -R oracle:oinstall /u01/app/oraInventory
chmod -R 775 /u01/app/oraInventory
Oracle Home Directory
The Oracle home directoryis the directory where you choose to install the software for a particular
Oracle product.
Oracle Universal Installer creates this directory path that you specify under the Oracle base directory
and then you do not need to create this directory.
Hostname on Multi homed/Alias computer
You can install Oracle Database on:
A multihomed computer. It is associated with multiple IP addresses. This is typically achieved
by having multiple network cards on the computer. Each IP address is associated with a host
name. In addition, you can set up aliases for the host name.
A computer with multiple aliases: it is registered with the naming service under a single IP but
with multiple aliases. The naming service resolves any of those aliases to the same computer.
Before installing Oracle Database on such a computer, set the ORACLE_HOSTNAME environment
variable to the computer whose host name you want to use. Oracle Universal Installer uses the
ORACLE_HOSTNAME environment variable setting to find the host name. If
ORACLE_HOSTNAME is not set and you are installing on a computer that has multiple network
cards, then Oracle Universal Installer determines the host name from the /etc/hosts file.
http://gerardnico.com/wiki/database/oracle/oracle_basehttp://gerardnico.com/wiki/linux/environment_variablehttp://gerardnico.com/wiki/database/oracle/orainventoryhttp://gerardnico.com/wiki/database/oracle/orainventoryhttp://gerardnico.com/wiki/database/oracle/oracle_homehttp://gerardnico.com/wiki/database/oracle/oracle_homehttp://gerardnico.com/wiki/database/oracle/oracle_hostnamehttp://gerardnico.com/wiki/database/oracle/oracle_basehttp://gerardnico.com/wiki/linux/environment_variablehttp://gerardnico.com/wiki/database/oracle/orainventoryhttp://gerardnico.com/wiki/database/oracle/oracle_homehttp://gerardnico.com/wiki/database/oracle/oracle_hostname -
8/22/2019 Database Basic Pract
52/58
Example of /etc/hosts file with di-rep-db.hotitem.local as hostname
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 di-rep-db.hotitem.local di-rep-db
127.0.0.1 localhost.localdomain localhost
Clients must be able to access the computer either by using this host name or by using aliases for this
host name. To verify this, ping the host name from the client computers using the short name (host
name only) and the full name (host name and domain name). Both tests must be successful.
Use the following procedure to set the ORACLE_HOSTNAME environment variable. For example, if
the fully qualified host name is somehost.us.example.com, then enter the following commands for the
Bourne, Bash, or Korn shell:
$ ORACLE_HOSTNAME=di-rep-db.hotitem.local
$ export ORACLE_HOSTNAME
Installation
Follow this article to know how to show a linux remote windows with X: Linux - How to display
remote clients (such as firefox, installation screen) with the X Server CygwinX ?
Login as oracle
Run the installer
The installation files are on the hard disk, then we change in the directory to the database directory and
enter the runInstaller command.
If the installation files are on installation media, enter commands similar to the following, where
directory_path is the path of the database directory on the installation media:
/directory_path/runInstaller
Oracle Universal Installer automatically installs the Oracle-supplied version of the JRE. This version is
required to run Oracle Universal Installer and several Oracle assistants. Do not modify the Java
Runtime Environment (JRE) except by using a patch provided by Oracle Support Services.
http://gerardnico.com/wiki/database/oracle/oracle_hostnamehttp://gerardnico.com/wiki/linux/shellhttp://gerardnico.com/wiki/linux/cygwinx_remote_clienthttp://gerardnico.com/wiki/linux/cygwinx_remote_clienthttp://gerardnico.com/wiki/database/oracle/oracle_hostnamehttp://gerardnico.com/wiki/linux/shellhttp://gerardnico.com/wiki/linux/cygwinx_remote_clienthttp://gerardnico.com/wiki/linux/cygwinx_remote_client -
8/22/2019 Database Basic Pract
53/58
[oracle@di-rep-db ~]$ cd /mnt/kiosque/database
[oracle@di-rep-db database]$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 64696 MB PassedChecking swap space: must be greater than 150 MB. Actual 7659 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-06-15_09-27-30PM. Please
wait ...
Configure Security Updates
Next
Installation Option
You can choose one of this options:
Create and Configure a Database: This option creates a new database along with sample
schemas.
Install Database Software Only: This option only installs the database binaries. To configure
database, you must run Oracle Database Configuration Assistant after the software installation.
Upgrade an Existing Database: This option installs the software binaries in a new Oracle home.
At the end of the installation, you can upgrade the existing database.
Choose Create and configure an database. Click Next
System Class
You can choose one of the following options:
Desktop Class: Choose this option if you are installing on a laptop or desktop class system. This
option includes a starter database and allows minimal configuration. This option is designed for
those who want to get up and running with the database quickly.(The ORACLE_HOSTNAME
Environment Variable must be set)
Server Class: Choose this option if you are installing on a server class system, such as what you
would use when deploying Oracle in a production data center. This option allows for more
http://gerardnico.com/wiki/database/oracle/sample_schemashttp://gerardnico.com/wiki/database/oracle/sample_schemashttp://gerardnico.com/wiki/database/oracle/sample_schemashttp://gerardnico.com/wiki/database/oracle/sample_schemas -
8/22/2019 Database Basic Pract
54/58
advanced configuration options. Advanced configuration options available using this option
include Oracle RAC, Automatic Storage Management, backup and recovery configuration,
integration with Enterprise Manager Grid Control, and more fine-grained memory tuning,
among many others.
Choose Server Class and click Next
Steps
Grip Option: Single instance database installation: This option installs the database and the
listener.
Install Type: Choose Advanced Install
Product Language: English
Database Edition: Enterprise
Installation Location
Create Inventory
By default, the Oracle Inventory directory is not installed under theOracle Base directory. This is
because all Oracle software installations share a commonOracle Inventory, so there is only one Oracle
http://gerardnico.com/wiki/database/oracle/oracle_basehttp://gerardnico.com/wiki/database/oracle/oracle_basehttp://gerardnico.com/wiki/database/oracle/oracle_basehttp://gerardnico.com/wiki/database/oracle/orainventoryhttp://gerardnico.com/wiki/database/oracle/orainventoryhttp://gerardnico.com/wiki/database/oracle/orainventoryhttp://gerardnico.com/wiki/_detail/database/oracle/oracle_database_11gr2_installation_create_inventory.jpg?id=database%3Aoracle%3Ainstall_11gr2_oel_linux_x86_64http://gerardnico.com/wiki/_detail/database/oracle/oracle_database_installationl_location_11gr2_oel_linux_x86_64.jpg?id=database%3Aoracle%3Ainstall_11gr2_oel_linux_x86_64http://gerardnico.com/wiki/database/oracle/oracle_basehttp://gerardnico.com/wiki/database/oracle/orainventory -
8/22/2019 Database Basic Pract
55/58
Inventory for all users, whereas there is a separate Oracle Base for each user.
Configuration Type: General Purpose
Database Identifier
Configuration Option: Choose Unicode, uncheck the Security and install the Sample Schemas
Management Options: Database Control
Database Storage: File System (/u01/app/oracle/oradata)
Backup and recovery: Don't enable backup
Schema Password: pwd for all account
Operating System Group (dba, oper)
Prerequisite check. If you don't have enough swap space (minimum 1.5 the total amount of
physical memory), check in this article on how to increase it : Linux - Swap / Paging
Configuration script
When you run the root.sh script, the script prompts you for the path of the local bin directoryand
automatically copies the oraenv, coraenv, and dbhome scripts to the directory that you specify. The
default local bin directory is /usr/local/bin. If you do not run the root.sh script, then you can manually
copy the oraenv or coraenv and dbhome scripts from the $ORACLE_HOME/bin directory to the local
http://gerardnico.com/wiki/database/oracle/grouphttp://gerardnico.com/wiki/linux/swaphttp://gerardnico.com/wiki/database/oracle/path#local_bin_directoryhttp://gerardnico.com/wiki/database/oracle/path#local_bin_directoryhttp://gerardnico.com/wiki/database/oracle/oraenvhttp://gerardnico.com/wiki/_detail/database/oracle/oracle_database_11gr2_database_creation_complete.jpg?id=database%3Aoracle%3Ainstall_11gr2_oel_linux_x86_64http://gerardnico.com/wiki/_detail/database/oracle/oracle_database_11gr2_os_group.jpg?id=database%3Aoracle%3Ainstall_11gr2_oel_linux_x86_64http://gerardnico.com/wiki/database/oracle/grouphttp://gerardnico.com/wiki/linux/swaphttp://gerardnico.com/wiki/database/oracle/path#local_bin_directoryhttp://gerardnico.com/wiki/database/oracle/oraenv -
8/22/2019 Database Basic Pract
56/58
bin directory.
[root@di-rep-db database]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@di-rep-db kiosque]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
-
8/22/2019 Database Basic Pract
57/58
Finish
Try then connect to thedatabase control of the machine using the user name SYSTEM and connect as
SYSDBA:
https://hostname:1158/em
CREATE A DATABASE AN CONFIGURE THE LISTENER
# dbca
#netca
Status verification
lsnrctl status
emctl status dbconsole
Start
lsnrctl start
emctl start dbconsole
[oracle@di-rep-db ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Mon Sep 13 15:35:43 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> startup
ORA-01031: insufficient privileges
SQL> connect / as sysdba
Connected to an idle instance.
http://gerardnico.com/wiki/database/oracle/database_controlhttp://gerardnico.com/wiki/database/oracle/database_controlhttps://hostname:1158/emhttp://gerardnico.com/wiki/_detail/database/oracle/oracle_database_installation_11gr2_successful.jpg?id=database%3Aoracle%3Ainstall_11gr2_oel_linux_x86_64http://gerardnico.com/wiki/database/oracle/database_controlhttps://hostname:1158/em -
8/22/2019 Database Basic Pract
58/58
SQL> startup
ORACLE instance started.
Total System Global Area 619360256 bytes
Fixed Size 1338280 bytesVariable Size 423625816 bytes
Database Buffers 188743680 bytes
Redo Buffers 5652480 bytes
Database mounted.
Database opened.
Database Console
[oracle@di-rep-db database]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
https://di-rep-db.hotitem.local:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/di-rep-
db.hotitem.local_direp/sysman/log