当前位置:网站首页>Installation of oracle19c under alicloud lightweight application server linux-centos7

Installation of oracle19c under alicloud lightweight application server linux-centos7

2022-06-21 13:45:00 testleaf

Initial environment : Alicloud lightweight application server has reset the system to CentOS7.3-64 position
Specific goals : install Oracle Database 19c

First step : Check Linux System version

1. Carry out orders lsb_release -a Check the system version
 Insert picture description here
You can see , My current system version is CentOS7.3-64 position .
2. To make sure that everything is OK , I'm going to upgrade my system to the latest .
3. use yum updates
Carry out orders yum -y clean all
Carry out orders yum -y update
At last I saw “Complete!” The update is complete .
4. After the update is complete , Carry out orders lsb_release -a Check the system version
 Insert picture description here
You can see , Now my system version is CentOS7.7-64 position .

The second step : download Oracle19c Installation package

1. Download. oracle-database-ee-19c-1.0-1.x86_64.rpm This file .
2. because Oracle Slow download on official website , So the following Baidu SkyDrive link is provided .
link : https://pan.baidu.com/s/1QDDFUGPu39kh7ObmHQTF2g Extraction code : leaf
3. Interested partners can also be in Oracle Download on the official website , Remember to sign up before downloading Oracle account number .
https://www.oracle.com/database/technologies/oracle-database-software-downloads.html#19c
 Insert picture description here

The third step : download Oracle19c Pre installation package for

1. Download. oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm This file .
2. This file is put on the top of the Baidu network disk link .
link : https://pan.baidu.com/s/1QDDFUGPu39kh7ObmHQTF2g Extraction code : leaf
3. Interested partners can also be in Oracle Download on the official website , This can be downloaded without login , And the file size is small , Go fast .
http://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

Step four : Upload to Linux

1. We have downloaded these two files to local .
 Insert picture description here
2. utilize Xftp Upload to Linux Of root Catalog , Can't use Xftp Please use the mount to 、 Download and other ways to get Linux above root Go to the catalogue .
After uploading , our root There are two files in the directory .
 Insert picture description here

Step five : Start installation

1. stay root Under the table of contents , Carry out orders yum -y localinstall oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm,
Conduct Oracle19c Pre installation of .
At last I saw “Complete!” It's just that the pre installation is complete .
 Insert picture description here
2. stay root Under the table of contents , Carry out orders yum -y localinstall oracle-database-ee-19c-1.0-1.x86_64.rpm,
Conduct Oracle19c Installation .
At last I saw “Complete!” The installation is finished , This may be a little slow , It's recommended to have a cup of hot water , Just wait patiently .
 Insert picture description here

Step six : Configuration environment

1. initialization Oracle database , Carry out orders /etc/init.d/oracledb_ORCLCDB-19c configure ,
It's really a long process , I suggest taking a nap , A good rest is really good .
 Insert picture description here
Finally, seeing this sentence means that this step is a success .
2. modify root User password , Remember this step , Otherwise you will regret .
Carry out orders passwd , Type twice 123456, That's all right. .
 Insert picture description here
3. Configure environment variables , Switch to oracle Under the user .
Carry out orders su - oracle,
Carry out orders vi .bash_profile,
Add the following to the document :

export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1
export PATH=$PATH:/opt/oracle/product/19c/dbhome_1/bin
export ORACLE_SID=ORCLCDB

Save and exit .
Check if the modification is correct , Carry out orders cat .bash_profile.
 Insert picture description here
Carry out orders source .bash_profile.
 Insert picture description here

Step seven : Using a database

1. Sign in oracle database , Carry out orders sqlplus / as sysdba.
 Insert picture description here
2. Enter the database statement to confirm that the database statement can execute normally ,
show pdbs;
 Insert picture description here
3. Change the user name to system The password for 123456,
alter user system identified by 123456;
 Insert picture description here
4. Be careful :
stay root Under the authority of user , You need to enter an account and password to enter the database ;
stay oracle Under the authority of user , No need to enter account and password to enter the database .

Step eight : The solution of some small problems

1.Oracle Backspace key failure , Unable to delete

stay oracle Edit under user folder bash_profile file ,
Carry out orders vi .bash_profile;
Add the following code :

stty erase ^h

Save and exit , Make the change effective , Carry out orders source .bash_profile
 Insert picture description here

2.Oracle The problem that the up and down keys can't call up the history

(1) install readline and libtermcap-devel Two dependency packages , Switch to root user .
Carry out orders yum -y install readline* libtermcap-devel*
(2) download rlwrap,
from github download rlwrap,
https://github.com/hanslub42/rlwrap/releases
Of course , We also offer Baidu online , Just before Oracle In the folder .
link : https://pan.baidu.com/s/1QDDFUGPu39kh7ObmHQTF2g Extraction code : leaf
Namely rlwrap-0.43.tar.gz This file .
And then upload it to root Just below the table of contents .
 Insert picture description here
(3) decompression 、 compile 、 install rlwrap
tar -zxvf rlwrap-0.43.tar.gz
cd rlwrap-0.43
./configure && make && make install
 Insert picture description here
 Insert picture description here
(4) To configure shell
su - oracle
vim .bash_profile
Finally, add the following configuration , send oracle Related commands support up and down keys :

alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
alias lsnrctl='rlwrap lsnrctl'

Save and exit , Make the change effective , Carry out orders source .bash_profile
 Insert picture description here
Be careful : This up and down key or only in oracle Under user authority oracle Use in the database .

3.Oracle The uninstall

(1) Switch to oracle Under the authority of user , Carry out orders su - oracle;
 Insert picture description here
(2) Switch to oracle Of deinstall Catalog , Carry out orders
cd /opt/oracle/product/19c/dbhome_1/deinstall
 Insert picture description here
(3) function deinstall file , Carry out orders ==./deinstall==
 Insert picture description here
(4) In the process of deletion, there are several points to confirm :( All the other things I didn't mention came back )
Specify the list of database names that are configured in this Oracle home [orcl]:
Specify the name of the database to be deleted , The default can be , Directly enter .

The details of database(s) orcl have been discovered automatically. Do you still want to modify the details of orcl database(s)? [n]:
Do you need to modify the database details , Default n, Directly enter .

Do you want to continue (y - yes, n - no)? [n]: y
Whether or not to continue , Fill in y, enter

End of script , Tips need to use root The user deletes the following three scripts .
rm -rf /etc/oraInst.loc
rm -rf /opt/ORCLfmap
rm -rf /etc/oratab

thus ,Oracle Delete completed .

(5) Carry out orders su Then enter the password to switch to root Under the authority of user .

Step nine : Colored eggs -Navicat Connect Oracle database

1. Alibaba cloud firewall added 1521 port
 Insert picture description here
 Insert picture description here
Otherwise, the following mistakes will occur :ORA-12170
 Insert picture description here
2. Service name query
Enter the query statement in the database ,
select global_name from global_name;
 Insert picture description here
I am here ORCLCDB, Remember this .
3.Navicat newly build Oracle Connect
 Insert picture description here
Don't Scribble the service name , Otherwise, the following mistakes will occur :ORA-12514
 Insert picture description here
Or the service name is wrong , When choosing SID when , There will be the following mistakes :ORA-12505
 Insert picture description here
The service name is written correctly , choice SID You can also connect successfully .

disclaimer :
1. The purpose of writing this article is to learn better Oracle Installation , If the interests of the people concerned are harmed , Please contact to delete ;
2. If the description is not right , Please correct in the comments ;
3. Writing is not easy , If it feels useful , Like collection will make bloggers happy ;
4. Besides , This article supports any form of reprint , Reprint please indicate the source , Thank you very much !!!
This article comes from :https://blog.csdn.net/testleaf/article/details/105303336
Blog Garden cnblogs Same number .

原网站

版权声明
本文为[testleaf]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202221432571118.html