Detailed steps for installing oracle xe in centos, centos
1. Download the installation package
Go to the official website and find the corresponding version.
2. Upload to ECs
Here, I use WinSCP. the upload speed is based on the network speed. You can also directly use wget to download the file. However, if you log on to the oracle official website, You need to log on to your account and password. If you use the wget command, there will be insufficient permissions. You can add a user name and password to get the password:
Wget -- user = xxxx -- password = xxxx https://download.oracle.com/otn/linux/oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
3. Install Dependencies
Yum install libaio-devel bc-y
4. Unzip the installation package
If you have installed the jdk environment, you can directly use the jar command to decompress the package.
Jar-zxvf oracle-xe-11.2.0-1.0.x86_64.rpm.zip
If unzip is used directly, an error is prompted, and unzipping is not allowed. The reason is that the compressed package is generated in java package and all unzip files cannot be decompressed.
Bytes
After obtaining the Disk1 folder, upload the entire folder to the centos7 server.
5. Installation
Run the following commands in sequence:
Su-root
Dd if =/dev/zero of =/swapfile bs = 1024 count = 1048576
Mkswap/swapfile
Swapon/swapfile
Cp/etc/fstab. backup _ $ (date + % N)
Echo '/swapfile swap defaults 0 0'>/etc/fstab
Chown root: root/swapfile
Chmod 0600/swapfile
Swapon-
Swapon-s
The above steps are used to allocate space; otherwise, the installation will fail.
Cd Disk1/
Rpm-ivh oracle-xe-11.2.0-1.0.x86_64.rpm
The installation is successful.
6. Configure and access
[Root @ localhost ~] # Cd/u01/app/oracle/product/11.2.0/xe/dbs/
[Root @ localhost dbs] # cd/etc/init. d/
[Root @ localhost init. d] # ls
Functions netconsole network oracle-xe README
[Root @ localhost init. d] #./oracle-xe
Usage:./oracle-xe {start | stop | restart | force-reload | configure | status | enable | disable}
[Root @ localhost init. d] #/etc/init. d/oracle-xe configure
........................
Http access port
Specify the HTTP port that will be used for Oracle Application Express [8080]: 8081
Database listening port
Specify a port that will be used for the database listener [1521]: 1521
Password of SYS and SYSTEM users
Initial configuration:
Confirm the password:
Whether or not to start the instance (the instance has not been started yet, and it may be set elsewhere ).
Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]: y
Starting Oracle Net Listener... Done
Processing database...
Done
Starting Oracle Database 11g Express Edition instance... Done
Installation completed successfully.
The installation is complete.
View the listening port. Process:
[Root @ localhost ~] # Netstat-anp
[Root @ localhost ~] # Ps-ef | grep oracle
[Root @ localhost init. d] # cd/u01/app/oracle/product/11.2.0/xe/dbs/
[Root @ localhost dbs] # ls
Hc_XE.dat init. ora lkXE orapwXE spfileXE. ora
Configure environment variables to use sqlplus
[Root @ localhost dbs] # vi/etc/profile
Join:
Export ORACLE_BASE =/u01/app/oracle
Export ORACLE_HOME =/u01/app/oracle/product/11.2.0/xe
Export PATH = $ PATH: $ ORACLE_HOME/bin
Export ORACLE_SID = XE
Export NLS_LANG = '$ ORACLE_HOME/bin/nls_lang.sh'
Then, log out of the user and use the oracle user to log on again. Then, you can use sqlplus to log on to oracle for further operations.
Test:
SQL> conn system/password @ cloud Host ip: 1521/xe;
SQL> select sysdate from dual;
You can install quick oracle in centos7.3 through the above steps.