Introduction: The installation of Oracle XE on CentOS is primarily intended to solve the usefulness of learning and testing, albeit simple, but involves many steps and details.
1. Download Oracle XE
Visit http://www.oracle.com/technetwork/cn/database/database-technologies/express-edition/downloads/index.html, Depending on the operating system, select the version to download.
2. Unzip the Oracle XE Installer
Unzip Oracle-xe-11.2.0-1.0.x86_64.rpm.zip
2.1 Creating a User
[Email protected] ~]# groupadd oinstall //Create Oracle Database Installation Group [[email protected] ~]# Groupadd DBA //Create Oracle Database management Group [[ Email protected] ~]# useradd-m-G oinstall-g dba Oracle //create Oracle user [[email protected] ~]# ID oracleuid=501 (Oracle) gid=501 (Oinstall) groups=501 (Oinstall), 502 (DBA) passwd Oracle //Set password for Oracle users: 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. Set up the installation directory
Chown-r Oracle:oinstall/u01/app
Chmod-r 775/u01/app
5. Start the 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. Modifying environment variables in Bash_profile
After installation, the system will automatically establish a user named Oracle, home dir location in/u01/app/oracle is the location of the database installation.
Modify the. Bash_profile. Add the following:
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 modification is under the user of the SQL you are running, such as user Oracle. Before this, you need to switch to user Oracle. The Oracle user then modifies its. Bash_profile.
8. Whether the test was successful
>> Echo $ORACLE _base
>> Sqlplus/as sysdba #查看是否可以进入sql命令行
Installing the Oracle XE Guide on CentOS