Install ORACLE12C1, download ORACLE12C package
- Before installing Oracle, you need to download the ORACLE12C database software package on the official website, the official download link: http://www.oracle.com/technetwork/database/enterprise-edition/ Downloads/oracle12c-linux-12201-3608234.html
2. Configure virtual machines that can install Oracle
- To install the CentOS configuration required by Oracle:
- Minimum CPU Dual Core
- Minimum memory 4G
- In addition to a system hard drive, add a piece of hard disk less than 15G to install Oracle, and the hard drive format is XFS.
3, CentOS system optimization shutdown firewall
Systemctl Disable Firewalld.service
Systemctl Stop Firewalld.service
Setenforce 0
Creating an XFS File system
Mkfs-t XFS/DEV/SDB1
Creating the ORC directory for mounting
- Mount an additional piece of hard disk space not less than 15G to the system for installation of Oracle
Mkdir/orc
Mount/dev/sdb1/orc
Change the host name to Oracle
- Change the host name to facilitate the viewing and management of the Web interface behind it.
Vim/etc/hostname//Change host name Oracle
HOSTNAME=oracle
- Configure a native parsing file
Vim/etc/hosts
192.168.144.144 Oracle //此处需要将本机IP解析成Oracle
Install the Environment Pack required for Oracle to run
Yum-y install binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc li bstdc++ libstdc++-devel libxi libxtst make Sysstat UnixODBC unixodbc-devel
Adjusting system kernel Parameters
Vim/etc/sysctl.conf
fs.aio-max-nr = 1048576 #异步IO请求数目 推荐值是:1048576 其实它等于 1024*1024 也就是 1024K 个fs.file-max = 6815744 #打开的文件句柄的最大数量,防止文件描述符耗尽的问题kernel.shmall = 2097152 #共享内存总量 页为单位,内存除以4K所得kernel.shmmax = 4294967295kernel.shmmni = 4096kernel.sem = 250 32000 100 128 //每一串数字意义如下 #SEMMSL: 每个信号集的最大信号数量 #SEMMNS:用于控制整个 Linux 系统中信号的最大数 #SEMOPM: 内核参数用于控制每个 semop 系统调用可以执行的信号操作的数量 #SEMMNI :内核参数用于控制整个 Linux 系统中信号集的最大数量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 #套接字发送缓冲区大小的最大值
- Reload the configuration file
Sysctl-p
Oracle User Environment Configuration
Groupadd Oinstall
Groupadd dba
USERADD-G oinstall-g dba Oracle
passwd Oracle//Password 123123
Mkdir-p/orc/app/oracle
Chown-r oracle:oinstall/orc/app/
Chmod-r 755/orc/app/oracle/
- Configuring the Oracle User's own environment variables
Vim/home/oracle/.bash_profile//oracle User Environment configuration
umask 022ORACLE_BASE=/orc/app/oracleORACLE_HOME=/orc/app/oracle/product/12.2.0/dbhome_1/ORACLE_SID=orclNLS_LANG="SIMPLIFIED CHINESE_CHINA".UTF8PATH=$PATH:$HOME/.local/bin:$HOME/bin:$ORACLE_HOME/binLANG=zh_CN.UTF-8export PATH LANG NLS_LANG ORACLE_BASE ORACLE_HOME ORACLE_SID
Oracle User Resource Limits
- Using the Pam_limits authentication module
Vim/etc/pam.d/login
session required /lib/security/pam_limits.sosession required pam_limits.so
Vim/etc/security/limits.conf
oracle soft nproc 2047 #单用户可使用的进程数量oracle hard nproc 16384oracle soft nofile 1024 #用户可打开的文件数量oracle hard nofile 65536oracle soft stack 10240 #堆栈设置
- Configure Oracle User throttling environment variables
Vim/etc/profile
if [ $USER = "oracle" ] then if [ $SHELL = "/bin/ksh" ] then ulimit -p 16384 #缓冲区大小 ulimit -p 65536 else ulimit -u 16384 -n 65536 #进程数 文件数 fifi
4. Oracle Installation
Mkdir/abc
- Mount the installation package to ABC and manipulate it in the graphical interface of the virtual machine
Xhost +
Su-oracle switching to Oracle user actions
Cd/abc
Export display=:0.0 Setting the mounting frame resolution
- Locate the installation file Runinstaller, execute the Setup program
./runinstaller
- The installation dialog box appears in the graphical interface as follows:
- When the dialog box appears during the installation process, you need to use the remote connection side to log in with root and execute the script as shown.
/orc/app/orainventory/orainstroot.sh
/orc/app/oracle/product/12.2.0/dbhome_1/root.sh
- Click OK after execution to continue the installation.
- As above, the installation of oracle12c on CENTOS7 has been completed.
Web interface Management
挂载flash的rpm包安装使用火狐浏览打开https://Oracle:5500/em登录名:sys 密码:abc123 勾选:as sysdba
Command line Login Management
- When we can enter the Web interface management, we can still access the database through the terminal, a series of operations.
sqlplus / as sysdba (sys用户是oracle的最高管理员所以要加上as)如果是普通用户登录 sqlplus 用户名/密码SQL> help index (查看命令列表,sql中不区分大写小写)SQL> show user (查看当前用户)
ORACLE12C detailed procedures for installation in Centos7.3