Cainiao installs Oracle 11 GB in Linux

Source: Internet
Author: User

Because the company's ERP system platform is RedHat Linux ES4 + Oracle10g, it is temporarily handed over to me for maintenance. So I would like to take this opportunity to learn about Linux, which is not very demanding on myself, oracle can be successfully installed on Linux, and the database will be backed up and restored. first, I bought a book on Dangdang, translated by Tsinghua Publishing House, on the basis of the Linux platform's mongoel Database 10 Gb management, it can be said that there is no substantial help for my study, and it is recommended that beginners do not buy this book.

First, I tried to install Oracle10g on the Red Hat Linux ES4. After several days of experimentation, I also downloaded a lot of materials to do it step by step. In the end, it was not successful, the most important thing is that when I enter Oracle for installation, I always check that some of the RPM package versions installed are incorrect. People are very upset, and I am also a newbie for Linux, so I haven't tried it again for a long time.

Finally, on the Oracle.com.cn forum, I saw a video lecture specially prepared by Mr. Xiao Bu for cainiao before I started my new study. finally, according to the step-by-step steps in the video, the installation was successful at 11 GB. in fact, my article is to repeat the steps in the video. My biggest goal is to review the installation process and make myself more proficient ., at the same time, it also gives cainiao at the same level some learning confidence.

Operating Platform: VMWARE6.0 + CentOS4.5. (available at www.centos.org ). note that the differences in the Linux version will cause a lot of puzzles for cainiao. I suggest you download the Linux version if you want to install it in accordance with this article. It is free of charge, it will not involve copyright issues like a red hat. it can be said that it is equal to the ES4 version of the red hat.

Database Version: Oracle11G R1 (I downloaded it on emule)

Auxiliary software: SecureCRT Filezella adobew.batreader

Hardware: Memory 1 GB hard disk space> 18 GB

I downloaded a DVD version of OS, and first loaded the OS into the optical drive in the Virtual Machine Software.

In Linux, be sure to pay attention to the Case sensitivity, especially the command.

First, install CentOS in the Virtual Machine Software,

1 SWAP partition I set 2048MB, that is, 2 times the memory, and the other space is loaded to the "/" root directory, a total of two partitions

2. Configure static IP addresses

3. Select "custom installation" and install the required software packages "GNOME graphic interface", Developments Tools, Legacy Softeare Development, and Editors. You do not need to install other software to save resources.

After the OS is installed.

1. Use SecreCRT to log on to Linux Using SSH. Most of my operations are performed here, because OS switching in VMWARE is inconvenient. in addition, in the actual environment, the management also maintains Linux through SSH remote logon, which is very convenient.

2. Use the open-source FileZella FTP tool SSH to connect to Linux and input the downloaded Oracle file. I downloaded the file in. ZIP format.

3. First modify the/etc/inittab file and change the number 5 in id: 5: initdefault: to 3. it is to change the GUI to the character interface after startup to save resources. I have been trying to learn this operation before. I did not expect to know it here. I was very happy at that time. therefore, some common Linux Command operations are also learned after Oracle is installed. after modification, enter reboot to restart the OS.

4. Open the b32002.pdf document in oracle.zip. from section 2nd, we will talk about how to install Oracle for reference. At the same time, some code can be copied directly from PDF, which is very convenient.

5. Check whether the required RPM package in the PDF document is installed. Command: rpm-qa | grep package name.

Generally, six packages are not installed. Open the OS image file, open the RPMS directory, extract the six packages, and FTP them to the Linux directory. at the same time, enter rpm-ivh * in the directory *. all rpm packages are installed. OK

Binutils-2.15.92.0.2-18

Compat-libstdc ++-33.2.3-47.3

Elfutils-libelf-0.97-5

Elfutils-libelf-devel-0.97-5

Glibc-2.3.9.4-2.19

Glibc-common-2.3.9.4-2.19

Glibc-devel-2.3.9.4-2.19

Gcc-3.4.5-2

Gcc-c ++-3.4.5-2

Libaio-devel-0.3.105-2

Libaio-0.3.105-2

Libgcc-3.4.5

Libstdc ++-3.4.5-2

Libstdc +-devel-3.4.5-2

Make-3.80-5

Sysstat-5.0.5

UnixODBC-2.2.11

UnixODBC-devel-2.2.11

6. Create Oracle groups and users, install directories and permissions

Mkdir-p/u01/Oracle

Groupadd dba

Groupadd oinstall

Useradd-g oinstall-G-d/u01/Oracle

Passwd Oracle set password

Chown-R Oracle: oinstall/u01

Check whether the ls-l command is effective.

7 vi/etc/hosts

Modify the file and add the Host Name of your LinuxIP address.

The host name can be viewed by hostname.

8. Check the fs-filemax value of the number of processes. The value should be 10260. After dividing by 512, the value is the process value. the specific role is not clear. This is what the system will give and we should not change it. command: cat/proc/sys/fs/file-max

9 Modify/etc/sysctl. conf and add the following content:

Kernel. shmall = 2097152

Kernel. shmmax = 2147483648

Kernel. shmmni = 4096

Kernel. sem = 250 32000 100 128

Net. ipv4.ip _ local_port_range = 1024 65000

Net. core. rmem_default = 4194304

Net. core. rmem_max = 4194304

Net. core. wmem_default = 262144

Net. core. wmem_max = 262144

After,

Run/sbin/sysctl-p.

10 Modify/etc/security/limits. conf and add the content

Oracle soft nproc 2047

Hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

11 Modify/etc/pam. d/login and add content

Session required/lib/security/pam_limits.so

Session required pam_limits.so

12 Modify/etc/profile and add content

If [$ USER = "Oracle"]; then

If [$ SHELL = "/bin/ksh"]; then

Ulimit-p 16384

Ulimit-n 65536

Else

Ulimit-u 16384-n 65536

Fi

Fi

12. log on to the Oracle database and modify the. bash_profie file.

Su-Oracle

Vi. bash_profile Add the following content

Oracle_BASE =/u01

Oracle_HOME = $ Oracle_BASE/Oracle

Oracle_SID = wilson

PATH = $ Oracle_HOME/bin: $ PATH

Export Oracle_BASE Oracle_HOME Oracle_SID PATH

Complete

13 use the root user to move the Oracle Installation File from FTP to Linux

Mv *****. zip/u01/Oracle/

After unzip *. zip command is decompressed, the installation files are all under u01/Oracle/database.

Use

Chown-R Oracle: oinstall database/

Modify directory ownership

14. log on with an Oracle user, enter startx, enter the graphical interface, and then enter the installation directory.

./RunInstaller to start installation.

Select advanced installation for custom installation

During installation, a warning about the oraInventory directory is displayed. Click OK to continue. In the subsequent window, change/oraInventory to/u01/oraInventory.

The subsequent parameters are all default values. During installation, a request for u01/oraInventory/oraInstRoot is displayed. sh and/u01/Oracle/root. sh prompt box. In secureCRT, run these two files as the ROOT user. Be sure to pay attention to the case. The End of installtion window is entered and the installation is complete.

15. Enter the netca command to configure the listener. All parameters are set by default. You can use ps-ef to check whether the service is enabled.

16. Enter the dbca command to create a database. The following are some precautions:

Select gernel purpose. In SID and global name, select the SID you created in. bash_profile.

Select the 2nd Item AL32UTF8 from the Character Sets Character Set option.

OK.

17. Go to the u01/Oracle/oradata directory and check that some database files appear.

Ps-ef view will add more Oracle-related services

18. Select LogOut in the graphic interface to exit the character interface.

19 create an instance for final test

Note: Oracle users are used to execute commands in database operations.

Input

[Oracle @ computer ~] $ Sqlplus/nolog

SQL * Plus: Release 11.1.0.6.0-Production on Tue Dec 11 15:32:23 2007

Copyright (c) 1982,200 7, Oracle. All rights reserved.

SQL> conn/as sysdba

Connected.

SQL> create table testbl (id integer, name char (10 ));

Table created.

SQL> insert into testbl values (0, 'wilson ');

1 row created.

SQL> commit;

Commit complete.

SQL> select * from testbl;

ID NAME

--------------------

0 wilson

SQL> shutdown immediate

Database closed.

Database dismounted.

Oracle instance shut down.

SQL>! Ps-ef

Exit

We recommend that you take a look at the instructor's video lecture.

[Oracle @ computer ~] $ Sqlplus

SQL * Plus: Release 11.1.0.6.0-Production on Tue Dec 11 15:00:41 2007

Copyright (c) 1982,200 7, Oracle. All rights reserved.

Enter user-name: sys as sysdba

Enter password:

Connected:

Oracle Database 11g Enterprise Edition Release 11.1.0.6.0-Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0-Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.