Oracle11gR2 for Linux installation

oracle download: https://www.oracle.com/database/technologies/oracle-database-software-downloads.html
vnc: https://sourceforge.net/ projects/tigervnc/
tightvnc download: https://www.tightvnc.com/download.php
After installing the accounting system rhel7.5, download the Pass the package up.

第一步:进到Oracle的目录,避免一会没权限
`[root@itpuxhsdb ~]# su - oracle` 
[oracle@itpuxhsdb:/home/oracle]$cd /backup/
[oracle@itpuxhsdb:/backup]$ls
p13390677_112040_Linux-x86-64_1of7.zip
p13390677_112040_Linux-x86-64_2of7.zip
p13390677_112040_Linux-x86-64_3of7.zip
p17890099_112040_Linux-x86-64.zip
p23615392_112040_Linux-x86-64.zip
p6880880_112000_Linux-x86-64.zip
rlwrap-0.42.tar.gz

The second step is to unzip the above:

[oracle@itpuxhsdb:/backup]$unzip p
p13390677_112040_Linux-x86-64_1of7.zip
p13390677_112040_Linux-x86-64_2of7.zip
p13390677_112040_Linux-x86-64_3of7.zip
p17890099_112040_Linux-x86-64.zip
p23615392_112040_Linux-x86-64.zip
p6880880_112000_Linux-x86-64.zip
[oracle@itpuxhsdb:/backup]$unzip p13390677_112040_Linux-x86-64_1of7.zip

The third step of installation: It is recommended to use vnc to install:
3. 1 First enter vncserver under the Oracle platform

[oracle@itpuxhsdb:/backup]$vncserver 

New 'itpuxhsdb:1 (oracle)' desktop is itpuxhsdb:1

Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/itpuxhsdb:1.log

After connecting to vnc

[oracle@itpuxhsdb:/backup/database]$cd database/
-bash: cd: database/: No such file or directory
[oracle@itpuxhsdb:/backup/database]$ls
install      response  runInstaller  stage
readme.html  rpm       sshsetup      welcome.html
[oracle@itpuxhsdb:/backup/database]$export DISPLAY=:1

#进行安装:提示红帽7,rhel7+11g会有bug,所以要在后面+ -jreloc /etc/alternatives/jre_18,在安装的时候就不会出现问题
#官方的是./runInstaller -ignorePrereq --忽略问题,但是数据库安装还是不用忽略问题
[oracle@itpuxhsdb:/backup/database]$ ./runInstaller -jreLoc /etc/alternatives/jre_1.8.0

The Oracle installation interface will pop up
Insert image description here
After the interface opens-cancel ✔I wish…–next–sikip spftware updates-next-lnstall database software only–next-- single instance database…—next–Select Chinese language and English–next-Next-Next-Automatic installation will detect problems (as shown in the picture)
Insert image description here
Looking at the picture above, there are three problems. This Problems need to be solved, don't ignore them.
The first os kernel Parameter:shmall can click Fix & Check Again (repair)
Insert image description here
Rebuild a new window-input

su -root 
[root@itpuxhsdb ~] #   /tmp/CVU_11.2.0.4.0_oracle/runfixup.sh
(下面返回这样的就是修复完成!)
Response file being used is :/tmp/CVU_11.2.0.4.0_oracle/fixup.response
Enable file being used is :/tmp/CVU_11.2.0.4.0_oracle/fixup.enable
Log file location: /tmp/CVU_11.2.0.4.0_oracle/orarun.log
Setting Kernel Parameters...
kernel.shmall = 1228800
kernel.shmall = 2097152

The second problem: package:compat-libstdc+±33-3.2.3(x86_x64) Solution: Download here Install to Inside [root@itpuxhsdb ~]# sudo yum localinstall /backup/compat-libstdc+±33-3.2.3-72.el7.x86_64.rpm Click check again when returning to the installation interface to solve this problem That's it. The third problem: package:pdksh-5.2.14 solution is the same as the second method. Next there will be a bug: file not found / oracle/app/oracle/product/11.2.0/db_1/oc4j/j2ee/oc4j_applications/applica/ins_emagent.mkt ​​(pictured) Solution: The first step: Unzip these two packages at the same time p13390677_112040_Linux-x86-64_1of7.zip p13390677_112040_Linux-x86-64_2of7.zip The file will not be found


Insert image description here


Insert image description here




A bug will appear next: as shown:
Insert image description here
Solution:

 [oracle@itpuxhsdb:/home/oracle]$cd $ORACLE_HOME
[oracle@itpuxhsdb:/oracle/app/oracle/product/11.2.0/db_1]$cd sysman/lib
[oracle@itpuxhsdb:/oracle/app/oracle/product/11.2.0/db_1/sysman/lib]$ls
[oracle@itpuxhsdb:/oracle/app/oracle/product/11.2.0/db_1/sysman/lib]cp ins_emagent.mk ins_emagent.mk.bak  #备份一下防止改错
[oracle@itpuxhsdb:/oracle/app/oracle/product/11.2.0/db_1/sysman/lib]vi ins_emagent.mk
进到里面反斜杠 /NMECTL
在后面加 -lnnz11   (数字11)

Insert image description here
The problem will be solved.

Step 4: Configure network monitoring

Now I have encountered a problem indicating that the netca command cannot be found in the system...

[oracle@itpuxhsdb database]$ netca
bash: netca: command not found... 
#接下来用 echo $PATH
[oracle@itpuxhsdb database]$ echo $PATH
.:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/oracle/.local/bin:/home/oracle/bin:/oracle/app/oracle/product/11.2.0/db_1/b
#在你的环境中,Oracle 客户端的安装路径是 /oracle/app/oracle/product/11.2.0/db_1/bin。你可以手动将这个路径添加到 PATH 中。
[oracle@itpuxhsdb database]$ export PATH=$PATH:/oracle/app/oracle/product/11.2.0/db_1/bin
#然后再次尝试运行 netca 命令:
[oracle@itpuxhsdb database]$ netca   

Insert image description hereSelect Listener con…—next-add–next–next—default until completed (listener configuration is complete)
After the configuration is completed, you can type the following command in the terminal To check the status of the listener: lsnrctl status
Start the listener: lsnrctl start
Stop the listener: lsnrctl stop
Restart the listener: lsnrctl reload
Check listener status:lsnrctl status
View listener log:lsnrctl log_status
Manually register service:lsnrctl services
Delete service:< /span>lsnrctl delservice <service_name>
For example, suppose you have registered a service named my_service in the listener and you want to delete it, you can execute the following command:

lsnrctl delservice my_service

Modify the listener parameters:lsnrctl set <parameter_name> <value>
For example, if you want to set the listener's port number to 1522, you can execute the following command:

lsnrctl set port 1522

Step 5: Creation of database:

[oracle@itpuxhsdb database]$ cd ~   #是在Oracle下启动数据库的
[oracle@itpuxhsdb ~]$ dbca

Insert image description here
Select the "Create Database" option:
In the Database Configuration Assistant interface, select the "Create Database" option and click "Next" --- -Select "Custom Database" or other appropriate option:
Depending on your needs, select "Custom Database" or other appropriate option and click "Next" - ---Fill in the database information:Global Database Name:fyshsdb
SID: Specify the unique identifier of the database----Enterprise Manager(check Default)—next–✔Check Use the Same Administrative Password for All Accounts—Unified password—next–File System (Select this first for this project, and select ASM for another subsequent project)— General choiceUse common location For allDatabase Files(Create a file directory again. The default is to put all data in the Oracle directory. Here I build a self-made oradata directory to put all data) –next–Specify Fast Recovery Area (This option is archiving. It is not recommended to create an archive when creating a database. Do not open archiving when creating a database in a production environment. The speed will be slower), so do not check itEnablle archiving/Specify Fast Recovery Area–next–There is nothing special about the production environment. The requirements pointed by the arrow below can be installed without checking. (As shown in the picture) ButEnterprise Manager Repositiory must be checked.

Insert image description here
— Click standard Database (as shown in the picture) If there are no special requirements for the production environment, do not install this. JVM must be installed — Click OK a>
Insert image description here
–next– If you choose Typical memory to manage itself, some problems will occur, so we choose custom memory.
Insert image description here
The benefits of choosing custom memory and the configuration method are: So the memory is: taking 8G physical memory as an example, SGA: 3072-3200, pga: 1000-1200. The optimal total memory of sga+pga is not Less than 40% (4000m)
Insert image description here
—Sizing (as shown in the picture) There is no special requirement to generally choose 8192. In a production environment, the number of processes must match the memory. For example, if the memory is too small, such as only 2G If the process chooses 2000, then there will be a problem. My memory here is 8G, so if the process chooses 2000, there is no problem at all.
Insert image description here
– character Sets (character set): Look at the character set required by the company:
Insert image description here
—connection Mdeo默认第一个Dedicated Server Mode, its principle: In exclusive mode, each client connection is assigned a dedicated service process. This service process is responsible for handling communication and interaction with clients. This mode is suitable for smaller databases or environments that require high connection response time. The second Shared Server Mode (shared memory), in the shared memory mode, multiple client connections can share a set of background processes, these processes are called shared servers. This reduces resource consumption but may result in some performance loss. This mode is suitable for environments that need to support a large number of connections. —next–As shown in the figure: Generally, you choose to change it to 8192. For extremely large databases, you can change it to tens of thousands.
Insert image description here
–Tablespaces (tablespace) File Size: 20480m Bytes in the production environment. In the production environment, it must be set to at least 20 G. There is no need to check Automatically extend for storage (storage space)...No need Automatically expand space. – Click ok
Insert image description here
Settings under SYSTEM: Double-click system01.dbf and change the memory to 20480m, or if the memory is not enough, you can add a table space:
Insert image description here
TEMP (temporary table space It is also at least 20G) and the automatic expansion space must be turned off to facilitate maintenance. The memory here is too small, so I set it to 200-500m.
The UNDOTBS1 table space is at least 20480M. If it is not enough later, you can add a file of 50g/100g like SYSTEM.
The USERS table space can be set to 200m-500m. Automatic expansion: automatically expand 1M each time, and the total expansion is 5120m.
0e6860ab39.png)
Under redo, there must be at least 5 sets of data in the production environment, each set of data is at least 200M. If the amount of data is relatively large, it can be 1G or 2G, depending on the situation. Defined; you can click Create to add another two groups.
Insert image description here
Click next – as shown in the figure:
Insert image description here
Click finish-ok to automatically create it!
Configure the listener—netca defaults all the way until complete!

Guess you like

Origin blog.csdn.net/weixin_43798406/article/details/133856217