Linux installation notes at Oracle 11G XE

operating system

[oracle@RAC02 ~]$ lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: OracleServer
Description: Oracle Linux Server release 6.6
Release: 6.6
Codename: n/a
[oracle@RAC02 ~]$

Database Version

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

oracle-xe-11.2.0-1.0.x86_64.rpm

 

SQL> select * from V$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production

 

Installation process

Before installing pay attention, oracle for space systems is required before installation can be viewed at:

First, using the free -m to view the swap space, oracle XE requires swap space at least 1.2G, expanded method on my other blog post has been explained. Portal  http://www.linuxidc.com/Linux/2012-08/66973.htm

Use df -h to see the size of tmpfs, oracle XE gives the minimum requirements in the init.ora file, the default is 1G.

Here we want tmpfs expanded to 2G:

1. Modify / etc / fstab file:

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

Review of: tmpfs / dev / shm tmpfs defaults, size = 2048M 0 0

2. Reload tmpfs:

Use the command:

#umount /dev/shm; mount /dev/shm;

Then enter

df -h / dev / shm look at the output:

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

Description reload success. [Linux] commune http://www.linuxidc.com

Second, this is done, we need to do some install some dependencies:

yum install libaio*

To install the package libaio

After unpacking the installation package,

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

 Into the Disk1 folder

After extracting the installation package rpm

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

 

Third, modify / etc / profile file, add the following:

# 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:/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

After modification using the command # source / etc / profile to reload the changed file.

Enter echo $ ORACLE_BASE change was successful.

Fourth, modify / etc / hosts file, add the following:

127.0.0.10 hostname (hostname filled in accordance with the actual situation)

Fifth, run the following script with super user identity configuration:

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

Including http port, and if you run a tomcat on your server and not turn over the port configuration should replace the default port 8080 to avoid conflict.

In addition, the program will ask you to set a password for the default administrator account sys. Will then wait for some time, please be patient.

After installation, the system will automatically create a user called oracle, home dir location / u01 / app / oracle database is installed.

Sixth, the only switch user sqlplus oracle database link

sqlplus /nolog

Enter sqlplus console

SQL> connect as sysdba

Prompted for a user name and password: use sys / password login

Start and mount the database

SQL>  startup mount

11g xe version has a built-in set a good database XE, and therefore not allowed to manually create the database, but you need to initialize the database structure

Run the two lines of code:

SQL> @?/rdbms/admin/catalog.sql
SQL> @?/rdbms/admin/catproc.sql


After waiting prompted complete, the next step.

If the database did not open during the operation appears you need to reboot and load the database. [Linux] commune http://www.linuxidc.com

Next, create a user, an initial database already exists in the users table should be, so the data can be directly inserted:

SQL> create user myaccount
      2   identified by “mypassword”
      3   default tablespace users;

Authorized Users:

SQL> grant dba to myaccount;


After the exit can then log in with the user.

Insert table test:

SQL> create table test_table (txt varchar2(100) not null);
SQL> insert into test_table values('Hello world !');


After successfully inserting data query

SQL> select * from test_table;

If the query is successful, then congratulations, you're done!

some problems:

If there is an error:

ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist


Usually because the database does not start, you need to enter the DBA database startup login

Before doing /u01/app/oracle/product/11.2.0/xe/dbs/ make sure the folder exists init <SID> .orc file exists

ORA-00845:MEMORY_TARGET not supported on this system

Please check your file init.orc value memory_target item is less than tmpfs, otherwise tmpfs expand capacity.

ORA-44410:XE edition single instance violation error

XE version can have only one instance, when I installed the program automatically generates the instance called XE and the path has been set up, as to how to add a new instance Supreme indicated.

or

To ensure that your environment variable is not '/' end while TNS_ADMIN variable has been set. As for why such a change .. hope to have an expert can tell me.

ORA-01261:Parameter db_recovery_file_dest destination string connot be translated

ORA-01262:Stat failed on a file destination directory

On this error, relatively silent, in init.orc in, db_recovery_file_dest destination that one of the initial value is "<ORACLE_BASE> / flash_recovery_area"

If you only modify the <ORACLE_BASE> you will get this error because only one file called fast_recovery_area under $ ORACLE_BASE, modify the back of the file name matches, the problem is solved.

Guess you like

Origin blog.csdn.net/kwame211/article/details/91984397