Cài đặt oracle 19c in Linux

Mô tả cách cài đặt oracle 19c RPM package trên Oracle linux 7.5

Vì sao phải là oracle linux 7.5?

Tại vì oracle linux đã được oracle cài đặt các thành phần phù hợp các gói cài đặt sẵn. Nếu các bạn không thích các bạn có thể tự cài các gói này. Và hiển nhiên chúng ta không cài được bản oracle mới nhất.

Mình sẽ hướng dẫn các bạn trước tiên cài đặt với Oracle Linux 7.5 trước, sau đó mình sẽ update thêm các cách cài trên các hệ điều hành linux khác nhé.

Cài đặt oracle 19c

yum update
 

[root@ip-172-31-16-171 ~]# yum install oracle-database-ee-19c-1.0-1.x86_64.rpm
Loaded plugins: ulninfo
No package oracle-database-ee-19c-1.0-1.x86_64.rpm available.
Error: Nothing to do
[root@ip-172-31-16-171 ~]# yum -y install oracle-database-ee-19c
Loaded plugins: ulninfo
No package oracle-database-ee-19c available.
Error: Nothing to do
[root@ip-172-31-16-171 wall]# curl -o oracle-database-ee-19c-1.0-1.x86_64.rpm https://download.oracle.com/otn/linux/oracle19c/190000/oracle-database-ee-19c-1.0-1.x86_64.rpm?AuthParam=1589214671_8e604018ea78aa95791f666a76943393
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  1 2569M    1 34.0M    0     0  7552k      0  0:05:48  0:00:04  0:05:44 7552koracle-database-ee-19c  1 2569M    1 44.0M    0     0  7956k      0  0:05:30  0:00:05  0:05:25 9880koracle-database-ee-19c  2 2569M    2 54.0M    0     0  8294k      0  0:05:17  0:00:06  0:05:11 9806koracle-database-ee-19c-1.0-1.x86_64.rpmoracle-database-ee-19c-1.0-1.x86_64.rpmoracle-database-ee-19c-1.0-1.x86_64.rpmoracl  2 2569M    2 62.0M    0     0  8403k      0  0:05:13  0:00:07  0:05:06 9740koracle-database-ee-19c100 2569M  100 2569M    0     0  9478k      0  0:04:37  0:04:37 --:--:-- 9112k
[root@ip-172-31-16-171 wall]# ll
total 2631516
-rw-r--r--. 1 root root 2694664264 May 11 16:35 oracle-database-ee-19c-1.0-1.x86_64.rpm

Some error:

ORA-27102: out of memory Error

Doc ID 301830.1 Sometime, you may get the below error, when you try to start the Oracle database: SQL> startup nomount ORA-27102: out of memory Linux-x86_64 Error: 28: No space left on device One of the reason is, shmall kerne parameter is set to a low value on /etc/sysctl.conf or /proc/sys/kernel/shmall file. SHMALL is the total amount of shared memory, in pages, that the system can use at one time. This value is set to 50% of the total physical memory available. So, your total SGA allocated from all the database, hosted on a server, cannot be greater than the SHMALL value. How to calculate the Memory limit from SHMALL parameter: shmall parameter value is set in Page size. So, Memory in GB = (shmall * Page size in Bytes)/(1024*1024*1024) run the below command to get the page size in Bytes : $ getconf PAGE_SIZE To change the value of shmall, edit the /etc/sysctl.conf file as root and change the value of shmall. Then, run the below command as root user to make the change to shamall value parmanent, without the need to to reboot the server. (Alternatively, you can reboot the server to make this change permanent). # sysctl -p Modifying /etc/sysctl.conf is a permanent workaround (applies at boot time). If for some reason you DO NOT want to change the system wide configuration, you can do it on the fly by directly changing the kernel pseudo FS AKA procfs. e.g. # echo "4194304" > /proc/sys/kernel/shmall

ORA-27102: out of memory Linux-x86_64 Error: 28: No space left on device

Solution:

Check the page size: #getconf PAGE_SIZE 4096 Calculate proper value for shmall:

The value of shmall should be:

Shmall=total size of the SGAs on the system/page size.

Let’s assume the size of the SGA is 16GB in the system then it would be 1024 * 1024 * 1024 * 16 / 4096 = 4194304

Change shmall in /etc/sysctl.conf vi /etc/sysctl.conf

kernel.shmall = 4194304

Apply the changes:

# sysctl -p

check shmall value after change # sysctl -A | grep shmall

Start the database # su - oracle # sqlplus sys as sysdba SQL> startup

What are Sessions in Oracle database : Sessions specify the number of connections that can served by oracle database at a time. This is equivalent to the number of concurrent users of the application. If your application has a lot of concurrent users then you need to increase the sessions in the oracle database. What are processes in Oracle database : Processes run in the background of Oracle database to maximize performance and accommodate many users. What are transactions in Oracle database : A transaction is a logical, atomic unit of work that contains one or more SQL statements. A transaction groups SQL statements so that they are either all committed, which means they are applied to the database, or all rolled back, which means they are undone from the database What is the relation between Sessions, transactions & processes : The Oracle Documentation states that TRANSACTIONS is derived from SESSIONS, which in turn is derived from PROCESSES, thus:

PROCESSES = Operating System Dependant

SESSIONS = (1.1 * PROCESSES) + 5

TRANSACTIONS = 1.1 * SESSIONS

For example, if processes are 100, then sessions will be 115 and transactions will be 127.

To alter the sessions,transactions, processes follow this procedure – 1. At command line, type sqlplus 2. For username give / as sysdba 3. Give the following commands – alter system set sessions=400 scope=spfile; alter system set processes=350 scope=spfile; alter system set transactions=440 scope=spfile; Give the values according to the requirement 4. After running these commands, you need to restart the Oracel instance, follow these commands shutdown immediate; startup; 5. After startup is complete run the following commands to see the updated values

select name, value from v$spparameter where name in (‘sessions’,’processes’,’transactions’);

Oracle database has a gv$resource_limit view to check if any database resource reach his connection limit:

This info is, as all v$ views, from instance startup to current time. So, in this example we can say that max processes limit was reached, and just now there are only 44 processes running. v$resource_limit is a very useful view for day-to-day work because you can glance in a moment if there is or were some process reaching his limit If you check sessions, processes or another parameter and they are nearly or reaching their limits you can resize them by following this article: change parameters in Oracle Please note that if you set processes value, oracle will automatically set sessions value to (1.1 * PROCESSES) + 5 for oracle 10g and (1.5 * PROCESSES) + 22 in oracle 11g and above...(for previous versions you should set both parameter accordingly)

WALLET IN ORACLE

Create a directory structure like below :

/$ORACLE_BASE/admin/<database_name>/wallet

and then issue the below command. It will work..

SQL> alter system set encryption key identified by "XXXXXXXXXX";

System altered.

Last updated

Was this helpful?