Previously, Oracle xe, a lightweight server of oracle, was used in the development environment. Installing Oracle on Linux is a pain point. This is because many preparations need to be made for the installation. In addition, Oracle installation is based on the RedHat version.
Ubuntu Server is a good version of Linux Server, but has little enterprise support, such as Oracle and other software providers.
The company needs to transplant the previous Oracle Database stuff. Install an express edition (XE) on Ubuntu Server for emergency purposes ). This version is very easy to install on Ubuntu.
First, you must set the source of Oracle XE:
Sudo vim/etc/apt/sources. list
Add:
The deb http://oss.oracle.com/debian unstable main non-free then needs to add the public key of the source server to the keystore of the local apt system:
Wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle-O-| sudo apt-key add-then, update apt Library:
Apt-get update:
Apt-get install oracle-xe to install the oracle server. There will be a prompt to configure before starting.
Sudo/etc/init. d/oracle-xe configure, for example, configure the port number of the web management interface, the port number of the oracle listener, whether to start linux at startup, and the password of sys and system users.
In addition, you need to set the environment variable:
Added sudo vim/etc/environment:
PATH =/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: $ {ORACLE_HOME}/bin
ORACLE_HOME =/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
LD_LIBRARY_PATH = $ ORACLE_HOME/lib: $ LD_LIBRARY_PATH
TNS_ADMIN =/usr/lib/oracle and then make it take effect:
Source/etc/environment
In this way, you can directly run sqlplus.
Sqlplus system/password @ XE
You need to modify the oracle configuration in sqlplus so that the web access management interface can be accessed remotely.
EXEC DBMS_XDB.SETLISTENERLOCALACCESS (FALSE)
In addition, you need to create a tnsname configuration file:
Sudo vim/usr/lib/oracle/tnsnames. ora
File Content:
XE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = XE)
)
)
Then, restart Oracle:
Sudo/etc/init. d/oracle-xe restart