Introduction to Ultra-simple Oracle 12c Installation:
Oracle Database, aka Oraclerdbms, or Oracle. is a relational database management system of Oracle Corporation. It is a leading product in the field of database.
It can be said that Oracle database system is currently the world's popular relational database management system, System portability, easy to use, strong function, applicable to all kinds of large, medium, small, microcomputer environment. It is a highly efficient and reliable database solution that adapts to high throughput.
System Introduction:
Oracle database system is one of the most popular client/server (client/server) or B/s architectures in the United States Oracle Corporation (Oracle) provides a distributed database-centric set of software products.
For example, Silverstream is a database-based middleware. Oracle database is the most widely used database management system in the world, and it has complete data management function as a general database system.
As a relational database, it is a complete relational product; It realizes distributed processing function as a distributed database. But all of its knowledge, as long as it learns Oracle knowledge on one model, can be used on all types of machines.
Installation conditions: 1. At least 4G of physical memory, 8G of virtual memory. 2. Prepare a new disk of not less than 15G.
The case: Operating system: CentOS 7.3 x86_64 installation oracle:1. Add a disk, change the hostname, and do the correlation:
vim /etc/hostname #更改主机名OracleHOSTNAME=oracle
vim /etc/hosts192.168.217.134 oracle #关联本地地址
2. Restart the machine and change the disk properties:
fdisk /dev/sdb #进入新添加的磁盘进行处理
[[email protected] ~]# mkfs -t xfs /dev/sdb1 #转换xfs格式meta-data=/dev/sdb1 isize=512 agcount=4, agsize=1310656 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=0, sparse=0data = bsize=4096 blocks=5242624, imaxpct=25 = sunit=0 swidth=0 blksnaming =version 2 bsize=4096 ascii-ci=0 ftype=1log =internal log bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=1realtime =none extsz=4096 blocks=0, rtextents=0
mkdir /orcmount /dev/sdb1 /orc #挂载
3. Install the Software environment package:
yum -y install binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXi libXtst make sysstat unixODBC unixODBC-devel
4. Adjust 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 = 4294967295 kernel.shmmni = 4096kernel.sem = 250 32000 100 128 #SEMMSL(250): 每个信号集的最大信号数量 #SEMMNS(32000):用于控制整个 Linux 系统中信号的最大数 #SEMOPM(100): 内核参数用于控制每个 semop 系统调用可以执行的信号操作的数量 #SEMMNI (128):内核参数用于控制整个 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 #套接字发送缓冲区大小的最大值
sysctl -p #重新加载配置文件
5. User Environment configuration:
groupadd oinstall #创建组 安装组groupadd dba #创建组 管理组useradd -g oinstall -G dba oracle #管理用户passwd oracle #设置密码
mkdir -p /orc/app/oracle #工作目录chown -R oracle:oinstall /orc/app/ chmod -R 755 /orc/app/oracle/
vim /home/oracle/.bash_profile #oracle用户环境配置#删除PATH=$PATH:$HOME/.local/bin:$HOME/binexport PATH#添加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 #oracle命令导入环境变量LANG=zh_CN.UTF-8 #字符集export PATH LANG NLS_LANG ORACLE_BASE ORACLE_HOME ORACLE_SID #导入
6.oracle User Resource limits:
vim /etc/pam.d/login #管理limits#添加session required /lib/security/pam_limits.so session 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 #堆栈设置
vim /etc/profile#末行插入if [ $USER = "oracle" ] then if [ $SHELL = "/bin/ksh" ] then ulimit -p 16384 #缓冲区大小 kb单位 ulimit -n 65536 #文件数 else ulimit -u 16384 -n 65536 #进程数 文件数 fifi
7. Install the package decompression, install Oracle, in the graphical interface operation:
[[email protected] ~]# xhost + #以root用户在图形化界面操作授权显示图形界面access control disabled, clients can connect from any host
su - oracle #切换oracle用户export DISPLAY=:0.0 #设置DISPLAY环境变量cd /abc/oracle #切换到oracle安装包位置[[email protected] oracle]$ ./runInstaller #安装正在启动 Oracle Universal Installer...检查临时空间: 必须大于 500 MB。 实际为 11122 MB 通过检查交换空间: 必须大于 150 MB。 实际为 8191 MB 通过检查监视器: 监视器配置至少必须显示 256 种颜色。 实际为 16777216 通过准备从以下地址启动 Oracle Universal Installer /tmp/OraInstall2018-07-17_09-17-43AM. 请稍候...
Tip: When installing to 79%, you will be prompted to execute the command at the root user, and then click OK when the command is completed:
[[email protected] ~]#/orc/app/orainventory/orainstroot.sh Change Permissions/orc/app/orainventory. Add read and Write permissions for the group. Deletes the global read, write, and execute permissions. Change the group name/orc/app/orainventory to Oinstall. The execution of the script is complete. [[email protected] ~]#/orc/app/oracle/product/12.2.0/dbhome_1/root.shperforming root user operation. The following environment variables is set as:oracle_owner= ORACLE oracle_home=/orc/app/oracle/product/12.2.0/db Home_1enter the full pathname of the local bin directory: [/usr/local/bin]: The contents of "Dbhome" has not changed. No need to overwrite. The contents of "oraenv" has not changed. No need to overwrite. The contents of "coraenv" has not changed. No need to overwrite. Entries'll be added to The/etc/oratab file as needed bydatabase Configuration Assistant when a database is Createdfinis Hed running generic part of root script. Now product-specific root actions would be performed. Want to setup Oracle Trace File Analyzer (TFA) now? yes| [No]: yesinstalling Oracle Trace File Analyzer (TFA). Log FiLe:/orc/app/oracle/product/12.2.0/dbhome_1/install/root_oracle_2018-07-17_09-33-07-445808435.logfinished Installing Oracle Trace File Analyzer (TFA)
8. Link database: Use the command line interface:
[[email protected] ~]# su - oracle上一次登录:二 7月 17 09:43:58 CST 2018[[email protected] ~]$ sqlplus / as sysdba #sys用户是oracle的最高管理员所以要加上asSQL*Plus: Release 12.2.0.1.0 Production on 星期二 7月 17 09:48:54 2018Copyright (c) 1982, 2016, Oracle.
Web Interface Management:
Ultra-simple Oracle 12c Installation