Installation of Oracle Database XE on CentOS7 (t2.micro instance)

Preface

Set up an EC2 instance for the development of a certain project A record of all the crap when installing Oracle Database XE.

First read the official documentation Good child style https://docs.oracle.com/cd/E96517_01/xeinw/installing-oracle-database-xe.html#GUID-8A8E5F6D-F00E-40BD-B74D-A41CCC502AE9

`As a prerequisite, the Oracle Database XE installation consumes 9GB of disk space under / opt. If this disk partition does not have the required disk space, you will need to add space or mount the alternate partition as / opt / oracle. This disk partition is a predefined Oracle base where the software and database reside. ``

Russia.

So I set EBS to 30GB. You should also create a swap file. Make a 4GB area. In the first place, I thought it would be better to change the instance type to at least t3.mideum instead of t2.micro. But it was too late and I couldn't go back. Continue in a flexible environment called t2.micro instance.

Installation

**-For Red Hat compatible Linux distributions, use the following command to download and install the Database Preinstallation RPM. ** **

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
sudo yum localinstall oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm

** · From the Oracle Technology Network to the software download page for Oracle Database RPM-based installation ** https://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html

`Download the oracle-database-xe-18c-1.0-1.x86_64.rpm files needed to perform an RPM-based installation to the selected directory. Install the database software using the yum localinstall command. ``

wget https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-18c-1.0-
sudo yum localinstall oracle-database-xe-18c-1.0-1.x86_64.rpm

The installation is not completed with this message.

[SEVERE] Oracle Database 18c Express Edition requires a minimum of 1GB of physical
memory (RAM).  This system has 971 MB of RAM and does not meet minimum
requirements

I understand that it is said that there is not enough memory, but even with a 4GB swap area, it is Akan. Add swap. Even if you make an area of 8GB in addition, it will be shivered by Dio as ** wasteful wasteful wasteful **.

Error resolution method

When I google, this is the story. http://www.oaktable.net/content/how-install-oracle-xe-18c-oracle-cloud-free-tier The machine actually has 971MB of RAM, which is low on Oracle XE 18c and I get an error when I try to install the RPM file.

So that's it Kindly rebuild the rpm package at this point. https://dev.to/project42/install-oracle-database-xe-in-oracle-cloud-free-tier-vms-5akl

I couldn't install it with yum as explained, so I will go to RPM Search and drop the corresponding rpm package. http://rpm.pbone.net/

wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/matthewdva:/build:/EPEL:/el7/CentOS_7/noarch/rpmrebuild-2.11-3.el7.noarch.rpm
sudo rpm -ivh rpmrebuild-2.11-3.el7.noarch.rpm

If the installation of rpmrebild is successful, go to edit the RPM file.

** · Edit the RPM and change the following Memory restrictions option: ** (Edit the RPM and change the following memory limit options:)

time rpmrebuild -e -p oracle-database-xe-18c-1.0-1.x86_64.rpm

Then, it will be opened in the vi editor, so you will reach the relevant part where the memory is being checked and change the value.

oracle-database-xe-18c-1.0-1.x86_64.rpm


#Change before
# Check and disallow install, if RAM is less than 1 GB
space=`cat /proc/meminfo | grep '^MemTotal' | awk '{print $2}'`
PhyMem=`expr $space / 1024`
swapspace=`free -m | grep Swap | awk '{print $4}'`
for a number 100 (for example)

#After change
# Check and disallow install, if RAM is less than 1 GB
space=`cat /proc/meminfo | grep '^MemTotal' | awk '{print $2}'`
PhyMem=`expr $space / 100`
swapspace=`free -m | grep Swap | awk '{print $4}'`

Exit with: wq and select y.

If there is no particular problem, the following result will be output.

result: /root/rpmbuild/RPMS/x86_64/oracle-database-xe-18c-1.0-1.x86_64.rpm

If you can rebuild, execute the installation

yum install /root/rpmbuild/RPMS/x86_64/oracle-database-xe-18c-1.0-1.x86_64.rpm
Installation:
  oracle-database-xe-18c.x86_64 0:1.0-1                                                                                                             

Has completed!

Somehow the installation was successful

Creating and configuring the Oracle Database

Run service configuration script

/etc/init.d/oracle-xe-18c configure

I hit, but again! I'm stuck in the memory check. I'm used to checking memory, so I choose to edit quickly.

/etc/init.d/oracle-xe-18c


< MEMORY_CONSTRUCT="-initParams sga_target=500M,pga_aggregate_target=400M" #Change here
---
> MEMORY_CONSTRUCT="-initParams sga_target=${sga}M,pga_aggregate_target=${pga}M"

Re-execute

/etc/init.d/oracle-xe-18c configure
Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9]. Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts:
Confirm the password:
Configuring Oracle Listener.
Listener configuration succeeded.
Configuring Oracle Database XE.
[WARNING] [DBT-11209]The current available memory is the available memory required to create the database.(900MB)Is below.
Cause:The following nodes do not have the required available memory:
node:ip-xxx-xxx-xxx-xxx Available memory:669.6133MB (685684.0KB)

Please enter the SYS user password: 
**** 
Please enter the SYSTEM user password: 
*****
Please enter the PDBADMIN user password: 
*****
Preparing for DB operation
7%Done
Copying database files
29%Done
Creating and starting an Oracle instance
30%Done
31%Done
34%Done
38%Done
41%Done
43%Done
Completion of database creation
47%Done
50%Done
Creating a pluggable database
54%Done
71%Done
Perform post-configuration action
93%Done
Running custom script
100%Done
Database creation is complete. See the log file at the following location for more information::
/opt/oracle/cfgtoollogs/dbca/XE。
Database information:
Global database name:XE
System identifier(SID):XE
Log file for details"/opt/oracle/cfgtoollogs/dbca/XE/XE1.log"Please refer to.

Connect to Oracle Database using one of the connect strings:
     Pluggable database: ip-xxx-xxx-xxx-xxx.ap-xxxx.compute.internal/XEPDB1
     Multitenant container database: ip-xxx-xxx-xxx-xxx.ap-xxxx.compute.internal
Use https://localhost:5500/em to access Oracle Enterprise Manager for Oracle Database XE

There is a password setting, so enter it properly.

** Ahhhhhhh **

I felt that I had run out of power to come this far, so I will postpone the subsequent connections at a later date. What I want to say for the time being is ** Don't stingy on the instance type **. Have a good oracle life.

Recommended Posts

Installation of Oracle Database XE on CentOS7 (t2.micro instance)
Docker installation on CentOS 6
Zabbix 5 installation on CentOS 8
OpenJDK installation on CentOS 7
Let's encrypt installation procedure (Oracle Linux, RHEL, Centos7)
Fastest installation of Visual Studio Code on Ubuntu
Browse an instance of Tab's View on Android
Docker installation on CentOS 6
Docker installation on WSL2