![oracle xe安装](https://i-blog.csdnimg.cn/blog_migrate/3e4c3279dc9d4af08b650a2c6897a742.png)
oracle xe安装
Oracle is very popular database which is used by big enterprises, banks, governments etc. Oracle Database provides a lot of useful features to the MS SQL, PostgreSQL, MySQL etc. Oracle Express is lightweight database server provided by Oracle. We can use Oracle Express Edition without a fee. Oracle Express Edition is named as Oracle XE .
Oracle是非常流行的数据库,已被大型企业,银行,政府等使用。Oracle数据库为MS SQL,PostgreSQL,MySQL等提供了许多有用的功能。Oracle Express是Oracle提供的轻量级数据库服务器。 我们可以免费使用Oracle Express Edition。 Oracle Express Edition被命名为Oracle XE。
下载 (Download)
Oracle can be installed into Linux and Unix based operating systems. It is provided as 64 bit application architecture. We will download Oracle Express Edition from following URL.
Oracle可以安装到基于Linux和Unix的操作系统中。 它作为64位应用程序体系结构提供。 我们将从以下URL下载Oracle Express Edition。
![Download Oracle Express Edition](https://i-blog.csdnimg.cn/blog_migrate/eb9d9c8a53e5c15f8ac8a89b581c8362.png)
We can use following URL to download Oracle Express Edition RPM package which can be installed on CentOS, Fedora, RedHat
我们可以使用以下URL下载Oracle Express Edition RPM软件包,该软件包可以安装在CentOS,Fedora,RedHat上
http://download.oracle.com/otn/linux/oracle18c/xe/oracle-database-xe-18c-1.0-1.x86_64.rpm
http://download.oracle.com/otn/linux/oracle18c/xe/oracle-database-xe-18c-1.0-1.x86_64.rpm
安装必备软件包oracle-database-preinstall-18c (Install Prerequisites Package oracle-database-preinstall-18c)
We will use rpm
command in order to install the downloaded package. Before installing package we need to install prerequisites which is required by the package. The prerequisites are provided by the oracle-database-preinstall-18c
package.
我们将使用rpm
命令来安装下载的软件包。 在安装软件包之前,我们需要安装软件包所需的先决条件。 前提条件由oracle-database-preinstall-18c
软件包提供。
First we will download preinstallpackage. This package can be used for CentOS 7 , RedHat 7 , Oracle Linux 7 and sub versions.
首先,我们将下载preinstallpackage。 该软件包可用于CentOS 7,RedHat 7,Oracle Linux 7和子版本。
$ curl -o oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
Then we will install package with the following command.
然后,我们将使用以下命令安装软件包。
$ sudo yum -y localinstall oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm
![Install Prerequisites Package oracle-database-preinstall-18c](https://i-blog.csdnimg.cn/blog_migrate/affe35682479201cd04097a24ae45910.png)
使用rpm命令安装 (Install with rpm Command)
We will use rpm
command with -i
option and provide the package name. If the package is different then current working path we should provide the full path.
我们将rpm
命令与-i
选项一起使用,并提供软件包名称。 如果软件包不同,则当前工作路径应提供完整路径。
$ sudo rpm -i oracle-database-xe-18c-1.0-1.x86_64.rpm
![Install with rpm Command](https://i-blog.csdnimg.cn/blog_migrate/54bd652050bc00cadc330b51eec6d02c.png)
初始化和配置数据库(Initialize and Configure Database)
We will use oracle-xe-18c
script in order to configure and initialize the database . We will use default configuration which can be found /etc/sysconfig/oracle-xe-18c.conf
.
我们将使用oracle-xe-18c
脚本来配置和初始化数据库。 我们将使用默认配置,可以在/etc/sysconfig/oracle-xe-18c.conf
中找到。
$ sudo /etc/init.d/oracle-xe-18c configure
![Initialize and Configure Database](https://i-blog.csdnimg.cn/blog_migrate/3841927827c606c9fe0cdfd36c6fe64f.png)
We can see that we will provide root privileges with sudo
command. After that we will provide the password we want to use for SYS, SYSTEM and PDBADMIN accounts. In order to make database more secure use at least 8 character, uppercase,special characters in password. Following will be a secure password.
我们可以看到我们将通过sudo
命令提供root特权。 之后,我们将提供我们要用于SYS,SYSTEM和PDBADMIN帐户的密码。 为了使数据库更安全,请使用至少8个字符,大写,特殊字符的密码。 以下将是一个安全密码。
q323+F^Q_?qwe.321
初始化阶段 (Initialization Phases)
During the initialization following phases will be completed in row.
在初始化期间,以下阶段将逐行完成。
- Set Password 设置密码
- Create Users建立使用者
- Prepare Database engine准备数据库引擎
- Copy Database Files复制数据库文件
- Create Oracle Instance创建Oracle实例
- Start Oracle Instance启动Oracle实例
安装日志 (Installation Logs)
Oracle is very detailed and complex database server. Event during installation a lot of log and log files are created about the installation and usage. We can list these log files from /opt/oracle/cfgtoollogs/dbca/XE/
.
Oracle是非常详细和复杂的数据库服务器。 安装过程中的事件会创建许多有关安装和用法的日志和日志文件。 我们可以从/opt/oracle/cfgtoollogs/dbca/XE/
列出这些日志文件。
$ cd /opt/oracle/cfgtoollogs/dbca/XE/
$ ls
![Installation Logs](https://i-blog.csdnimg.cn/blog_migrate/f2318bdcea05e32931e41a90e1b5e423.png)
In this example we will list basic installation log which is stored in XE.log file.
在此示例中,我们将列出存储在XE.log文件中的基本安装日志。
$ less XE.log
![XE.log](https://i-blog.csdnimg.cn/blog_migrate/a599652e38598f35f0d46c7455627794.png)
连接字符串 (Connection Strings)
In order to use Oracle database from different applications we need to use Connection Strings
. This connection string provides connection information to the Oracle Database.
为了使用来自不同应用程序的Oracle数据库,我们需要使用Connection Strings
。 此连接字符串提供到Oracle数据库的连接信息。
Pluggable database: localhost.localdomain/XEPDB1
Multitenant container database: localhost.localdomain
![Connection Strings](https://i-blog.csdnimg.cn/blog_migrate/36ab730ba23a342758bd3a97f608e875.png)
Oracle企业管理器或基于Web的管理(Oracle Enterprise Manager or Web Based Management)
Oracle Enterprise Manager is a web based Oracle database management tool. We can use this tool from browser by navigating following URL. It uses port 5500
. But notice that it requires Adobe Flash which may not enabled or installed in your browser.
Oracle Enterprise Manager是基于Web的Oracle数据库管理工具。 我们可以通过浏览以下URL在浏览器中使用此工具。 它使用端口5500
。 但是请注意,它需要Adobe Flash,而您的浏览器可能未启用或未安装Adobe Flash。
https://localhost:5500/em/login
检查Oracle侦听器服务 (Check Oracle Listener Service)
We can check Oracle Listener Service with the ps
command. We will filter processes which names contains tnslsnr
.
我们可以使用ps
命令检查Oracle Listener Service。 我们将过滤名称包含tnslsnr
进程。
$ ps -ef | grep tnslsnr
![Check Oracle Listener Service](https://i-blog.csdnimg.cn/blog_migrate/12285582f0d965f993ab63a8aa602b64.png)
翻译自: https://www.poftut.com/how-to-install-oracle-express-edition-xe-18-on-linux/
oracle xe安装