Installation notes for Oracle 11g xe in Linux

Source: Internet
Author: User

Installation notes for Oracle 11g xe in Linux

After several days, I finally installed Oracle 11G on the server and it was able to run properly. So today, we will record the brief installation steps and problems encountered during the installation, and use them later.

Register and download the 64-bit linux installation package on the oracle website (it seems that there is only 64-bit). Note that the system must be 64-bit. Otherwise, you are wasting time.

First of all, my system is CentOS5. I have tried to install it on Ubuntu 12.04 and amazon EC2 (the free 8G hard drive version) for various reasons, if you are interested, please try it out. There are many guiding posts on the Internet.

Before installation, note that oracle requires system space. Before installation, you can view the following information:

Use free-m to view the swap space. oracle XE requires at least 1.2 GB of swap space. The expansion method is described in another blog. Portal

Run df-h to check the size of tmpfs. oracle XE provides the minimum requirement in the init. ora file. The default value is 1 GB.

Here we want to expand tmpfs to 2G:

1. Modify the/etc/fstab file:

Find this row: tmpfs/dev/shm tmpfs defaults 0 0

Change to tmpfs/dev/shm tmpfs ults, size = 2048 M 0 0

2. Reload tmpfs:

Run the following command:

# Umount/dev/shm; mount/dev/shm;

Enter

Df-h/dev/shm to view the output:

Filesystem Size Used Avail Use % Mounted on
Tmpfs 2.0G 492 M 1.6G 25%/dev/shm

The reload is successful. [Help house http://www.bkjia.com]

After doing this, we need to install some dependency packages:

Sudo yum install libaio *

To install the libaio package

Decompress the installation package,

Unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip

Go to the Disk1 folder

Install the extracted rpm package

Rpm-ivh oracle-xe-11.2.0-1.0.x86_64.rpm

After the installation is successful, the system prompts that the installation is successful and runs the following script as a super user for configuration:

#/Etc/init. d/oracle-xe configure

Including the http port. If tomcat is running on your server and the port configuration has not been changed, replace the default 8080 port to avoid conflict.

In addition, the program requires you to set a password for the default Administrator Account sys. Wait for a while. Please be patient.

After the installation is complete, the system automatically creates a user named oracle, and the home dir is located at/u01/app/oracle, that is, the database installation location.

For ease of use, we can copy. bashrc and. bash_profile under the home Directory of individual users to this directory, and then use chown to change the File Ownership:

# Chown oracle. bash_profile


# Chown oracle. bashrc

# Chmod 755. bash_profile

# Chmod 755. bashrc

Then, we need to set the environment variable:

Modify the/etc/profile file and add the following content:

# Oracle Settings

TMP =/tmp; export TMP
TMPDIR = $ TMP; export TMPDIR
ORACLE_BASE =/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/xe; export ORACLE_HOME
ORACLE_SID = XE; export ORACLE_SID
ORACLE_TERM = xterm; export ORACLE_TERM
PATH =/usr/sbin: $ PATH; export PATH
PATH = $ ORACLE_HOME/bin: $ PATH; export PATH
TNS_ADMIN = $ ORACLE_HOME/network/admin
LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH = $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib; export CLASSPATH

If [$ USER = "oracle"]; then
If [$ SHELL = "/bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi


Note:

There is only one instance in the XE version. After I modify the SID, it seems that an error will be reported, so I don't need to modify the SID.

After the BASE and HOME variables, try not to add the slash '/'. An error may be reported, although I do not know why... at the same time, the TNS_ADMIN variable must exist.

After the modification, run # source/etc/profile to reload the file.

Input echo $ ORACLE_BASE to check whether the modification is successful.

  • 1
  • 2
  • Next Page

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.