1. Install OEL 5.6
Ii. Install VMware Tools
1) Select the VM option in the menu. The sub-option is installVMware Tools and select it.
2) return to the operating system and mount the optical drive to/mnt.
[Root @ tyger ~] # Mount/dev/cdrom/mnt
Mount: block device/dev/cdrom is write-protected, mounting read-only
[Root @ tyger ~] #
3) decompress and install the tools Package
[Root @ tyger ~] # Pwd
/Root
[Root @ tyger ~] # Tar-xzvf/mnt/VMwareTools-9.2.0-799703.tar.gz
......
[Root @ tyger ~] # Ls
Anaconda-ks.cfg Desktop install. log install. log. syslog vmware-tools-distrib
[Root @ tyger ~] # Cd vmware-tools-distrib/
[Root @ tygervmware-tools-distrib] # ls
Bin doc etc files install installer lib vmware-install.pl
[Root @ tygervmware-tools-distrib] #./vmware-install.pl
Enter
Enter
Enter
......
3. disable unnecessary services (exercise by yourself)
Service NetworkManager stop
Service acpid stop
Service anacron stop
Service apmd stop
Service atd stop
Service auditd stop
Service autofs stop
Service avahi-daemon stop
Service avahi-dnsconfd stop
Service bluetooth stop
Service conman stop
Service cpuspeed stop
Service cups stop
Service dnsmasq stop
Service dund stop
Service firstboot stop
Service gpm stop
Service haldaemon stop
Service hidd stop
Service ip6tables stop
Service ipmi stop
Service ipmievd stop
Service iptables stop
Service irda stop
Service irqbalance stop
Service kdump stop
Service kudzu stop
Service mcstrans stop
Service mdmpd stop
Service microcode_ctl stop
Service netconsole stop
Service netfs stop
Service netplugd stop
Service nfs stop
Service nfslock stop
Service nscd stop
Service ntpd stop
Service pand stop
Service pcscd stop
Service portmap stop
Service psacct stop
Service rawdevices stop
Service rdisc stop
Service readahead_early stop
Service readahead_later stop
Service restorecond stop
Service rhnsd stop
Service rpcgssd stop
Service rpcidmapd stop
Service rpcsvcgssd stop
Service saslauthd stop
Service sendmail stop
Service setroubleshoot stop
Service smartd stop
Service vncserver stop
Service wdaemon stop
Service winbind stop
Service wpa_supplicant stop
Service xfs stop
Service xinetd stop
Service ypbind stop
Service yum-updatesd stop
4. Set unnecessary services not to start up
Chkconfig NetworkManager off
Chkconfig acpid off
Chkconfig anacron off
Chkconfig apmd off
Chkconfig atd off
Chkconfig auditd off
Chkconfig autofs off
Chkconfig avahi-daemon off
Chkconfig avahi-dnsconfd off
Chkconfig bluetooth off
Chkconfig conman off
Chkconfig cpuspeed off
Chkconfig cups off
Chkconfig dnsmasq off
Chkconfig dund off
Chkconfig firstboot off
Chkconfig gpm off
Chkconfig haldaemon off
Chkconfig hidd off
Chkconfig ip6tables off
Chkconfig ipmi off
Chkconfig ipmievd off
Chkconfig iptables off
Chkconfig irda off
Chkconfig isdn off
Chkconfig irqbalance off
Chkconfig kdump off
Chkconfig kudzu off
Chkconfig mcstrans off
Chkconfig mdmpd off
Chkconfig microcode_ctl off
Chkconfig netconsole off
Chkconfig netfs off
Chkconfig netplugd off
Chkconfig nfs off
Chkconfig nfslock off
Chkconfig nscd off
Chkconfig ntpd off
Chkconfig pand off
Chkconfig pcscd off
Chkconfig portmap off
Chkconfig psacct off
Chkconfig rawdevices off
Chkconfig rdisc off
Chkconfig readahead_early off
Chkconfig readahead_later off
Chkconfig restorecond off
Chkconfig rhnsd off
Chkconfig rpcgssd off
Chkconfig rpcidmapd off
Chkconfig rpcsvcgssd off
Chkconfig saslauthd off
Chkconfig sendmail off
Chkconfig setroubleshoot off
Chkconfig smartd off
Chkconfig vncserver off
Chkconfig wdaemon off
Chkconfig winbind off
Chkconfig wpa_supplicant off
Chkconfig xfs off
Chkconfig xinetd off
Chkconfig ypbind off
Chkconfig yum-updatesd off
5. Support for version Modification
The redhat operating system versions that have been verified by oracle are not verified by oracle. If the version is not verified, it cannot be installed.
[Root @ tyger ~] # Vi/etc/redhat-release
Red Hat Enterprise Linux Server release5.6(Tikanga) |
Change
Red Hat Enterprise Linux Server release4.6(Tikanga) |
[Root @ tyger ~] # Cat/etc/redhat-release
Cat/etc/redhat-release
Red Hat Enterprise LinuxServer release 4.6 (Tikanga)
Vi. YUM installation package
Use YUM tool to install the required software package (first load the OEL5.6 installation image file to the VM optical drive)
[Root @ tyger ~] # Mount/dev/cdrom/mnt
Mount: block device/dev/cdrom is write-protected, mounting read-only
[Root @ tyger ~] #
[Root @ tyger ~] # Vi/etc/yum. repos. d/public-yum-el5.repo
[Root @ tyger ~] #
[Oel5] Name = Enterprise Linux 5.6 DVD Baseurl = file: // mnt/Server/ Gpgcheck = 0 Enabled = 1 |
[Root @ tyger etc] #
[Root @ tyger etc] # yum install oracle-validated
...... ......
Total download size: 36 M
Is this OK [y/N]:Y
Downloading Packages:
--------------------------------------------------------------------------
Total 1.8 GB/s | 36 MB
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: unixODBC 1/18
Installing: libXp 2/18
Installing: sysstat 3/18
Installing: compat-db 4/18
Installing: gdb 5/18
Installing: kernel-headers 6/18
Installing: glibc-headers 7/18
Installing: glibc-devel 8/18
Installing: libstdc ++-devel 9/18
Installing: unixODBC-devel 10/18
Installing: libaio-devel 11/18
Installing: compat-gcc-34 12/18
Installing: gcc 13/18
Installing: gcc-c ++ 14/18
Installing: compat-gcc-34-c ++ 15/18
Installing: elfutils-libelf-devel 16/18
Installing: elfutils-libelf-devel-static 17/18
Installing: oracle-validated 18/18
Installed:
Oracle-validated.i386. 0.0-24. el5
Dependency Installed:
Compat-db.i386. 2.52-5.1
Compat-gcc-34.i386 0: 3. 4.6-4.1
Compat-gcc-34-c ++. i386. 4.6-4.1
Elfutils-libelf-devel.i3860: 0.137-3. el5
Elfutils-libelf-devel-static.i386. 137-3.el5
Gcc. i3860: 4.1.2-50. el5
Gcc-c ++. i386. 1.2-50. el5
Gdb. i3860: 7.0.1-32. el5
Glibc-devel.i386. 5-58
Glibc-headers.i386. 5-58
Kernel-headers.i386. 6.18-238. el5
LibXp. i3860: 1.0.0-8.1.el5
Libaio-devel.i386 0: 0. 3.106-5
Libstdc ++-devel. i386. 1.2-50. el5
Sysstat. i386. 0.2-3. el5_5.1
UnixODBC. i386. 2.11-7.1
UnixODBC-devel.i386 0: 2. 2.11-7.1
Complete!
[Root @ tyger ~] #
1.1. Modify/Etc/sysctl. conf file
The verification steps for installing the oracle software will clearly inform you of the following settings, so we can change them in advance. If you are interested, you can install them first, the same is true for the change.
[Root @ tyger soft] # vi/etc/sysctl. conf
Set Net. ipv4.ip _ local_port_range = 9000 65500 Change Net. ipv4.ip _ local_port_range = 1024 65000 |
-- Make the above modification take effect
[Root @ tyger soft] #/sbin/sysctl-p
Net. ipv4.ip _ forward = 0
Net. ipv4.conf. default. rp_filter = 2
Net. ipv4.conf. default. accept_source_route = 0
Kernel. core_uses_pid = 1
Net. ipv4.tcp _ syncookies = 1
Fs. file-max = 6815744
Kernel. msgmni= 2878
Kernel. msgmax = 8192
Kernel. msgmnb = 65536
Kernel. sem = 250 32000100 142
Kernel. shmmni = 4096
Kernel. shmall = 1073741824
Kernel. shmmax = 4294967295
Kernel. sysrq = 1
Net. core. rmem_default = 262144
Net. core. rmem_max = 4194304
Net. core. wmem_default = 262144
Net. core. wmem_max = 1048576
Fs. aio-max-nr = 3145728
Net. ipv4.ip _ local_port_range = 1024 65000
VMS. min_free_kbytes = 51200
[Root @ tyger soft] #
1.2. Change passwords and create directories and permissions
1) modify the password of an oracle user (we have installed related packages using YUM and created an Oracle account and related groups for us)
[Root @ tyger ~] # Passwdoracle
Changing password foruser oracle.
New UNIX password:
Bad password: it is basedon a dictionary word
Retype new UNIX password:
Passwd: allauthentication tokens updated successfully.
2) create related directories and grant permissions
[Root @ tyger ~] # Mkdir/soft
[Root @ tyger ~] # Chown-Roracle: oinstall/soft
[Root @ tyger ~] # Chmod-R755/soft
[Root @ comu ~] # Mkdir-p/u01/app/oracle
[Root @ tyger ~] # Chown-Roracle: oinstall/u01
[Root @ tyger ~] # Chmod-R755/u01
1.3. Host Name andIP Address Settings
[Root @ tyger ~] # Vi/etc/hosts
# Do not remove thefollowing line, or various programs
# That require networkfunctionality will fail.
127.0.0.1TygerLocalhost. localdomain localhost(Note: The tyger of this row must be deleted because the added row below already exists)
: 1 localhost6.localdomain6 localhost6
192.168.1.32 tyger
(Note: add this line because oracle performs some operations based on the IP address during installation. If there is no IP address or computer name for the computer, there will be a warning during verification)
1.4. SetOracle user environment variables
[Root @ tyger ~] # Su-oracle
[Oracle @ tyger ~] $
[Oracle @ tyger ~] $ Vi. bash_profile
Note: add the following content at the bottom of the file: Export ORACLE_BASE =/u01/app/oracle Export ORACLE_HOME = $ ORACLE_BASE/product/10.2.0/db_1 Export ORACLE_SID = ORCL Export PATH = $ PATH: $ HOME/bin: $ ORACLE_HOME/bin Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib |
After the modification is completed, the modification takes effect as follows:
[Oracle @ tyger ~] $. Bash_profile
[Oracle @ tyger ~] $
Or
[Oracle @ tyger ~] $ Source. bash_profile
[Oracle @ tyger ~] $
Or log out and log on again.
Note:
ORACLE_BASE: oracle product base Directory
ORACLE_HOME: the database product directory is usually a BASE subdirectory.
ORACLE_SID: the link between the operating system and the oracle instance
PATH: append the installed oracle command to the execution search PATH.
LD_LIBRARY_PATH: Location of the dynamic library
1.5. UploadOracle Installation Media
(Upload via ssh)
1. Configure your linux
①VM ----- settings ------ NetworkAdapter
Select all options in host-only mode Devicestatus.
OK
②Edit ------ VirtualNetwork Editor -----
Set VMnet1 to host-only and set the Subnet IP address to the same network segment as your linuxIP address (my IP address is 192.168.12.70, so I set it to 192.168.12.0)
========================================================== ================
Supplement: if you do not know your liunxIP address, open a terminal and check it.
[Root @ tyger ~] # Ifconfig
Eth0 Link encap: Ethernet HWaddr 00: 0C: 29: 2A: 24: 66
Inet addr: 192.168.12.70 Bcast: 192.168.12.255 Mask: 255.255.255.0
Inet6 addr: fe80: 20c: 29ff: fe2a: 2466/64 Scope: Link
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 3030 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 1739 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX bytes: 302428 (295.3 KiB) TX bytes: 274398 (267.9 KiB)
Interrupt: 67 Base address: 0x2024
Lo Link encap: Local Loopback
Inet addr: 127.0.0.1 Mask: 255.0.0.0
Inet6 addr: 1/128 Scope: Host
Up loopback running mtu: 16436 Metric: 1
RX packets: 1026 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 1026 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX bytes: 1359652 (1.2 MiB) TX bytes: 1359652 (1.2 MiB)
[Root @ tyger ~] #
========================================================== ==========================================
OK
2. Connect to SSH to upload the file 10201_database_linux32 to the/soft directory of linux.
Uploaded
1.6. Install software
1) decompress the uploaded file.
[Root @ tyger ~] # Xhost +
Access control disabled, clients can connect from any host
[Root @ tyger ~] # Su-oracle
[Oracle @ tyger ~] $ Cd/soft
[Oracle @ tyger soft] $ ls
10201_database_linux32.zip linux-oracle-needed-software
[Oracle @ tyger soft] $ unzip 10201_database_linux32.zip
............
Inflating: database/stage/oracle. server.10 _ 2_0_1_0_dep_default.properties
Inflating: database/stage/oracle. server.10 _ 2_0_1_0_1120187896411.bak
Inflating: database/stage/fastcopy. xml
Inflating: database/welcome.html
[Oracle @ tyger soft] $
[Oracle @ tyger soft] $ ls
10201_database_linux32.zip database linux-oracle-needed-software
2) start to install the oracle software (start the graphical interface)
[Oracle @ tyger soft] $ cddatabase/
[Oracle @ tyger database] $ ls
Doc install response runInstaller stage welcome.html
[Oracle @ tyger database] $./runInstaller
3) at the beginning, we will follow the image. At the beginning, we don't need to worry about what it is because we only know how to do it.
Next
Next
Next
It is automatically added when the following occurs, which is the same as the environment variable settings.
Next
We can see that all are passed. perfect !!!
Next
Select Install database Software only. Then we will create a database.
Next
Now, let's take a look at your configuration information. Next, we will start to install the oracle database software.
Install .......
Show your mercy !!!!!
Two script files to be executed will pop up. Open a new terminal to execute the file, or you have to find the script to execute it yourself,
[Root @ tyger ~] #/U01/app/oracle/oraInventory/orainstRoot. sh
Changing permissions of/u01/app/oracle/oraInventory to 770.
Changing groupname of/u01/app/oracle/oraInventoryto oinstall.
The execution of the script is complete
[Root @ tyger ~] #/U01/app/oracle/product/10.2.0/root. sh
Running Oracle10 root. sh script...
The following environment variables are set:
ORACLE_OWNER = oracle
ORACLE_HOME =/u01/app/oracle/product/10.2.0
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copyingdbhome to/usr/local/bin...
Copyingoraenv to/usr/local/bin...
Copyingcoraenv to/usr/local/bin...
Creating/etc/oratab file...
Entries will be added to the/etc/oratab file asneeded
Database Configuration Assistant when a database iscreated
Finished running generic part of root. sh script.
Now product-specific root actions will beperformed.
[Root @ tyger ~] #
OK ......
EXIT
Yes
1.7. Create an oracle database
Then, create an oracle database (DBCA) on the GUI)
[Oracle @ tyger ~] $ Dbca
-Bash: dbca: command not found
If the above problem occurs, it is because the environment variable settings are incorrect.
[Oracle @ tyger ~] $ Vi. bash_profile
Change path:
ExportORACLE_HOME = $ ORACLE_BASE/product/10.2.0/db_1
Change
Export ORACLE_HOME = $ ORACLE_BASE/product/10.2.0
After the modification is completed, the modification takes effect as follows:
[Oracle @ tyger ~] $. Bash_profile
[Oracle @ tyger ~] $
Or
[Oracle @ tyger ~] $ Source. bash_profile
[Oracle @ tyger ~] $
Or log out and log on again.
The preparation is complete ...... Start graphical interface
[Oracle @ tyger ~] $ Dbca
Next
...
Next
...
Next
...
Enter your Global Database Name (Global Database Name). The SID below will be automatically completed. This SID must be the same as the SID set for your environment variable.
The SID of the environment variable is set as follows:
Export ORACLE_SID = ORCL
Next
Next, we will ask you if you want to install oracle EM. You can skip this step. Later, we will learn how to manually install EM (a graphical interface management tool of oracle)
You can create a database and configure EM. What should you do ~~
I have summarized the tyger ~~~~~~~~~~~~~~~~~~
NEXT
Here, the password is set to: oracle
Next
..
Next
..
Next
....
Only selected users such as SCOTT and HR will be created during database installation. Otherwise, this user will not be available. Note that by default, these users are locked and need to be manually unlocked.
1.71 _ memory, block size, Character Set, connection mode settings
1) memory. You can allocate percentages or manually specify the size of SGA and PGA.
2) default database block size
3) set character sets. You can use the default character set (which is related to the operating system), UTF8, or the character set you specified.
4) connection mode, selection, dedicated mode
1.72 _Confirm the database storage information. Next Step
1.73 _By default, only databases are selected.
You can save all the currently created steps as templates, and save these steps as scripts.
1.74 _All Installed Components
1.75 _Click OK. The "Save template" dialog box is displayed.
1.76 _ then, the script is successfully saved dialog box is displayed.
1.77 _Click OK to create a database.
The time varies depending on the machine situation. Please wait.
1.78 _Click EXIT to complete the installation.