In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Introduction to Oracle 12c
The latest version of the Oracle database is Oracle Database 12c. Oracle Database 12c introduces a new multi-tenant architecture that makes it easy to deploy and manage database clouds. In addition, some innovative features maximize resource utilization and flexibility, such as Oracle Multitenant can quickly consolidate multiple databases, while Automatic Data Optimization and Heat Map can compress and layer data at higher density. These unique technological advances, coupled with major enhancements in availability, security, and big data support, make Oracle Database 12c an ideal platform for private and public cloud deployments.
Installation environment
Installation system: Centos7
IP address: 192.168.91.153
Virtual machine memory: at least 4G
SWAP (virtual memory): 8G
Hard disk: 40g or add a new disk
Package link: https://pan.baidu.com/s/1XA6WUchSzhxH3qYevF0gxA
Extraction code: v3u6
You can also download https://www.oracle.com/cn directly from the official website.
Installation process
1. Turn off the firewall
[root@localhost ~] # setenforce 0
[root@ localhost~] # systemctl stop firewalld.service
[root@ localhost~] # systemctl disable firewalld.service
Removed symlink / etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink / etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
2. Create a mount directory
[root@localhost ~] # mkdir / orc / / create a mount directory
[root@localhost ~] # vim / etc/hostname / / change the hostname (add on the last line)
Localhost.localdomain
HOSTNAME=oracle
[root@localhost ~] # vim / etc/hosts / / resolve hostname (added on the last line)
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.91.153 oracle
3. Mount the newly added disk to the / orc directory
[root@localhost ~] # mount / dev/sdb1 / orc
Check the mount status
[root@localhost] # df-h
File system capacity used available used% mount point
/ dev/sda2 20G 3.5G 17G 18% /
Devtmpfs 2.0G 0 2.0G 0% / dev
Tmpfs 2.0G 0 2.0G 0% / dev/shm
Tmpfs 2.0G 9.1m 2.0G 1% / run
Tmpfs 2.0G 0 2.0G 0% / sys/fs/cgroup
/ dev/sda3 10G 33m 10G 1% / home
/ dev/sda5 10G 33m 10G 1% / opt
/ dev/sda1 997M 158M 839M 16% / boot
Tmpfs 394M 4.0K 394m 1% / run/user/42
Tmpfs 394M 24K 394M 1% / run/user/0
/ dev/sr0 4.3G 4.3G 0 100% / run/media/root/CentOS 7 x86room64
/ dev/sdb1 60G 33m 60G 1% / orc
4 download the software environment package
[root@oracle ~] # yum install binutils compat-libcapl compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXi libXtst make sysstat unixODBC unixODBC-devel-y
5. Adjust kernel parameters
[root@oracle ~] # vim / etc/sysctl.conf
Fs.aio-max-nr = 1048576 # the recommended value for the number of asynchronous IO requests is: 1048576, in fact, it equals 1024 million 1024, that is, 1024k.
Fs.file-max = 6815744 # maximum number of open file handles to prevent file description exhaustion problems
Kernel.shmall = 2097152 # Total shared memory in pages divided by 4k
Kernel.shmmax = 4294967295
Kernel.shmmni = 4096
Kernel.sem = 32000 100128 # SEMMSL: maximum number of signals per signal set SEMMNS: maximum number of signals used to control the entire Linux system
Net.ipv4.ip_local_port_range = 9000 65500 # Port range for outbound connections
Net.core.rmem_default = 262144 # default value of socket receive buffer size
Net.core.rmem_max = 4194304 # maximum size of socket receive buffer size
Net.core.wmem_default = 262144 # default value of socket send buffer size
Net.core.wmem_max = 1048576 # maximum size of socket send buffer size
Reload the configuration file
[root@oracle] # sysctl-p
Fs.aio-max-nr = 1048576
Fs.file-max = 6815744
Kernel.shmall = 2097152
Kernel.shmmax = 4294967295
Kernel.shmmni = 4096
Kernel.sem = 250 32000 100 128
Net.ipv4.ip_local_port_range = 9000 65500
Net.core.rmem_default = 262144
Net.core.rmem_max = 4194304
Net.core.wmem_default = 262144
Net.core.wmem_max = 1048576
6. User environment configuration
[root@oracle ~] # groupadd oinstall / / create an installation group
[root@oracle ~] # groupadd dba / / Administrator
[root@oracle ~] # useradd-g oinstall-G dba oracle / / create an oracle user
[root@oracle ~] # passwd oracle / / set password
Change the password of user oracle.
New password:
Invalid password: password less than 8 characters
Re-enter the new password:
Passwd: all authentication tokens have been successfully updated.
[root@oracle ~] # mkdir-p / orc/app/oracle / / create a working directory oracle in the disk mount directory
[root@oracle ~] # chown-R oracle:oinstall / orc/app / / Grant permissions to owners and groups
[root@oracle] # chmod-R 755 / orc/app/oracle
Change the configuration of the oracle user environment
[root@oracle ~] # vim / home/oracle/.bash_profile (added on the last line)
Umask 022
ORACLE_BASE=/orc/app/oracle
ORACLE_HOME=/orc/app/oracle/product/12.2.0/dbhome_1/
ORACLE_SID=orcl
NLS_LANG= "SIMPLIFIED CHINESE_CHINA" .UTF8
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/bin
LANG=zh_CN.UTF-8
Export PATH LANG NLS_LANG ORACLE_BASE ORACLE_HOME ORACLE_SID
7. Oracle user resource restrictions
Use pam_limits authentication module
[root@oracle ~] # vim / etc/pam.d/login
#% PAM-1.0
Auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
Auth substack system-auth
Auth include postlogin
Account required pam_nologin.so
Account include system-auth
Password include system-auth
Session required / lib/security/pam_limits.so (insert two lines)
Session required pam_limits.so
Configure limits Profil
[root@oracle ~] # vim / etc/security/limits.conf (last line insert)
Oracle soft nproc 2047 / / number of processes that a single user can use
Oracle hard nproc 16384
Oracle soft nofile 1024 / / number of files that a single user can open
Oracle hard nofile 65536
Oracle soft stack 10240 / / Stack Settings
Change system environment variabl
[root@oracle ~] # vim / etc/profile (last line insert)
If [$USER = "oracle"]
Then
If [$SHELL = "/ bin/ksh"]
Then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi
8. Install oracle 12c
(1) Mount the decompressed package database of oracle 12c first.
[root@oracle ~] # mkdir / aaa / / create mount point
[root@oracle ~] # mount.cifs / / 192.168.91.1/database / aaa / / Mount the database package
Password for root@//192.168.91.1/database:
[root@oracle ~] # df-h / / View the mount condition
File system capacity used available used% mount point
/ dev/sda2 20G 3.6G 17G 18% /
Devtmpfs 2.0G 0 2.0G 0% / dev
Tmpfs 2.0G 0 2.0G 0% / dev/shm
Tmpfs 2.0G 9.0M 2.0G 1% / run
Tmpfs 2.0G 0 2.0G 0% / sys/fs/cgroup
/ dev/sda3 10G 33m 10G 1% / home
/ dev/sda5 10G 33m 10G 1% / opt
/ dev/sda1 997M 158M 839M 16% / boot
Tmpfs 394M 12K 394M 1% / run/user/42
Tmpfs 394M 0 394M 0% / run/user/0
/ / 192.168.91.1/database 120G 63G 58G 53% / aaa
[root@oracle ~] # cd / aaa
[root@oracle aaa] # ls
Install response rpm runInstaller sshsetup stage welcome.html / / installation script
(2) switch to graphical interface operation (log in as root on the virtual machine)
The installation window automatically opens after the installation script is executed, as shown below
Then proceed to the second step of installation
The next step is to proceed to the third step of installation
The next step goes to step four.
The next step goes to step five.
The next step goes to step six.
When you proceed to the next step, you will prompt that the export order is not up to standard, and select "Yes" to continue the installation.
Proceed to step 7 installation, keep the default, no need to change
Next, do a premonition check, and when the installation requirements are met, a product list will appear. As shown below
Click next to begin the installation, and when the installation reaches 79%, you need to execute two script commands as root. After execution, "OK" to continue (operation on xshell)
[root@oracle aaa] # / orc/app/oraInventory/orainstRoot.sh / / execute the configuration script as root
Change permissions / orc/app/oraInventory.
Add read and write permissions for the group.
Removes global read, write, and execute permissions.
Change the group name / orc/app/oraInventory to oinstall.
The execution of the script is complete.
[root@oracle aaa] # / orc/app/oracle/product/12.2.0/dbhome_1/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= / orc/app/oracle/product/12.2.0/dbhome_1
Enter the full pathname of the local bin directory: [/ usr/local/bin]: / / press enter to enter
Copying dbhome to / usr/local/bin...
Copying oraenv to / usr/local/bin...
Copying coraenv to / usr/local/bin...
Creating / etc/oratab file...
Entries will be added to the / etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Do you want to setup Oracle Trace File Analyzer (TFA) now? Yes | [no]:
Yes
Installing Oracle Trace File Analyzer (TFA).
Log File: / orc/app/oracle/product/12.2.0/dbhome_1/install/root_oracle_2018-10-04 / 15-07-10-572821645.log
Finished installing Oracle Trace File Analyzer (TFA)
[root@oracle aaa] #
The following is the installation wait process, which will take a long time.
9. Login verification after installation is completed, login using https://192.168.91.153:5500/em address
Log in to the oracle database and use the command sqlplus / as sysdba
[oracle@oracle ~] $sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Thursday October 4 15:30:46 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connect to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0-64bit Production
SQL > quit
Disconnect from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0-64bit Production
[oracle@oracle ~] $
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
R download https://cran.r-project.org/Rstudio download https://www.rstudio.com/
© 2024 shulou.com SLNews company. All rights reserved.