Oracle XE Installation Guide on CentOS, centosxe
Introduction: Installing oracle xe on Centos is mainly used for learning and testing. Although simple, it involves many steps and details.
1. Download Oracle XE
Access the http://www.oracle.com/technetwork/cn/database/database-technologies/express-edition/downloads/index.html, depending on the operating system, select Version Download.
2. decompress the Oracle XE Installer
Unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
2.1 create a user
Root @ localhost ~] # Groupadd oinstall // create an oracle database installation group [root @ localhost ~] # Groupadd dba // create an oracle database management group [root @ localhost ~] # Useradd-m-g oinstall-G dba oracle // create an oracle user [root @ localhost ~] # Id oracleuid = 501 (oracle) gid = 501 (oinstall) groups = 501 (oinstall), 502 (dba) passwd oracle // set a password for an Oracle user: changing password for user oracle. new UNIX password: bad password: it is based on a dictionary wordRetype new UNIX password: passwd: all authentication tokens updated successfully.
4. Create an installation directory
Chown-R oracle: oinstall/u01/app
Chmod-R 775/u01/app
5. Start Installation
> Cd Disk1
> Rpm-ivh oracle-xe-11.2.0-1.0.x86_64.rpm
6. Run the command to configure oracle xe
>/Etc/init. d/oracle-xe configure
7. Modify the environment variable in bash_profile
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.
Modify. bash_profile. Add the following content to it:
TMP=/tmp; export TMPTMPDIR=$TMP; export TMPDIRORACLE_HOSTNAME=dbserver; export ORACLE_HOSTNAMEORACLE_UNQNAME=ORADB; export ORACLE_UNQNAMEORACLE_BASE=/u01/app/oracle; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOMEORACLE_SID=ORADB; export ORACLE_SIDPATH=/usr/sbin:$PATH; export PATHPATH=$ORACLE_HOME/bin:$PATH; export PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
Note: This. bash_profile is modified under the user of the SQL statement you run. For example, the user oracle. Before that, you need to switch to the user oracle. Then, the user in oracle needs to modify its. bash_profile.
8. Check whether the test is successful.
> Echo $ ORACLE_BASE
> Sqlplus/as sysdba # Check whether SQL command lines can be entered