First, the preparatory work
1, download the Oracle installation package: Linux.x64_11gR2_database_1of2.zip and Linux.x64_11gR2_database_2of2.zip, can be downloaded to local, The FTP service is uploaded to the Linux system (refer to the CentOS7 FTP server Setup), and the wget command of the Linux system can be used to download the file package;
2. Create the system users and user groups that are running the Oracle database:
Log in with the root account, run the following command, create the required users and user groups, group reason reference URL
Groupadd oinstall #创建用户组oinstallgroupadd dba #创建用户组dbauseradd-G oinstall-g dba-m Oracle #创建oracle用户 and join the Oinstall and DBA user groups groups Oracle #查询用户组是否授权成功passwd Oracle #设置用户oracle的登陆密 Code, do not set the password, in the CentOS graphics landing interface can not login ID Oracle #查看新建的oracle用户
3. Create the Oracle Database installation directory (run the following command, create accounts and assign permissions)
Vi/etc/redhat-release #修改成红色部分文字redhat-7
5. Packages required to install the Oracle database
The following are the installation packages that you need to rely on, and the Yum install {package name} to verify installation, such as Yum install Binutils
Binutils-2.23.52.0.1-12.el7.x86_64compat-libcap1-1.10-3.el7.x86_64gcc-4.8.2-3.el7.x86_64gcc-c++-4.8.2-3. El7.x86_64glibc-2.17-36.el7.x86_64glibc-devel-2.17-36.el7.x86_64kshlibaio-0.3.109-9.el7.x86_ 64libaio-devel-0.3.109-9.el7.x86_64libgcc-4.8.2-3.el7.x86_64libstdc++-4.8.2-3.el7.x86_64libstdc++- Devel-4.8.2-3.el7.x86_64libxi-1.7.2-1.el7.x86_64libxtst-1.2.2-1.el7.x86_64make-3.82-19.el7.x86_ 64sysstat-10.1.5-1.el7.x86_64
Use the following directives to check for dependent packages
Yum install binutils-2.* compat-libstdc++-33* elfutils-libelf-0.* elfutils-libelf-devel-* gcc-4.* gcc-c++-4.* glibc-2. * glibc-common-2.* glibc-devel-2.* glibc-headers-2.* ksh-2* libaio-0.* libaio-devel-0.* libgcc-4.* libstdc++-4.* libstdc++-devel-4.* make-3.* sysstat-7.* unixodbc-2.* unixodbc-devel-2.* pdksh*
6. Turn off firewall and SELinux
6.1. Configure the firewall to open the port required by the FTP server
CentOS 7.0 defaults to using firewall as the firewall, shutting down firewall:
Systemctl Stop Firewalld.service #停止firewallsystemctl disable Firewalld.service #禁止firewall开机启动
6.2. Turn off SELinux
Vi/etc/selinux/config#selinux=enforcing #注释掉 #selinuxtype=targeted #注释掉SELINUX =disabled #增加: wq! #保存退出setenforce 0 #使配置立即生效
7. Modify Kernel Parameters
#红色部分是要添加sysctl. conf content net.ipv4.icmp_echo_ignore_broadcasts = 1net.ipv4.conf.all.rp_filter = 1fs.file-max = 6815744 #设置最大打开文件数fs. Aio-max-nr = 1048576kernel.shmall = 2097152 #共享内存的总量, 8G memory settings: 2097152*4k/1024/1024kernel.shmmax = 2147483648 #最大共享内存的段大小kernel. Shmmni = 4096 #整个系统共享内存端的最大数kernel. sem = 32000 128net.ipv4.ip_local_port_range = 900 0 65500 #可使用的IPv4端口范围net. Core.rmem_default = 262144net.core.rmem_max= 4194304net.core.wmem_default= 262144net.core.wmem_max= 1048576
8, set limits to Oracle user, improve the performance of software (red for the added part)
vi/etc/security/limits.conf #红色部分要添加到Limits. conf content Oracle Soft nproc 2047oracle hard Nproc 16384oracle Soft nofile 1024oracle Hard Nofile 65536
9, configure the user's environment variables (red part to add code)
Vi/home/oracle/.bash_profile #红色部分是要追加bash_profile内容部分Export Oracle_base=/data/oracle # ORACLE Database installation directory export oracle_home= $ORACLE _base/product/11.2.0/db_1 #oracle数据库路径export ORACLE_SID=ORCL # ORACLE Startup DB instance name export oracle_term=xterm #xterm窗口模式安装export path= $ORACLE _home/bin:/usr/sbin: $PATH #添加系统环境变量export ld_ Library_path= $ORACLE _home/lib:/lib:/usr/lib #添加系统环境变量export lang=c #防止安装过程出现乱码export Nls_lang=american_america. ZHS16GBK #设置Oracle客户端字符集 must be consistent with the CharSet set at Oracle installation
Configuration complete,: wq! save exit, run Source/home/oracle/.bash_profile when the above configuration takes effect
10. Get the installation package file and unzip the installation package
The way to get the package files can be downloaded to the specified directory via the FTP server or via wget, and the following decompression methods are available.
Unzip linux.x64_11gr2_database_1of2.zip-d/data/ #解压文件1unzip linux.x64_11gr2_database_2of2.zip-d/data/ # Unzip the file 2chown-r oracle:oinstall/data/database/#分配安装文件授权Oracle
Second, the CentOS 7 installation graphical interface
Prior to the company's servers are used by the CentOS system, need to install the graphical interface when I will execute the following command
Yum-y groupinstall "X Window System" "Fonts" "Desktop"
This installation is supposed to be the KDE desktop, the desktop now mainly has two kinds, KDE and gnome. KDE is suitable for clients, has a lot of applications, and works like Windows, GNOME is suitable for server-side and more streamlined.
However, the CentOS 7 was not installed using this method, so the following command was used to install
Yum Groupinstall "GNOME Desktop" "Graphical administration Tools" ln-sf/lib/systemd/system/ runlevel5.target/etc/systemd/system/default. targetstartx
The installation is successful after execution.
Note: If the installation of CentOS is a thin server version, without an image interface, it is not possible to successfully install Oracle, Oracle installation steps need to be completed in a graphical interface. Otherwise the command line will report the following exception:
Third, Oracle installation
1, the Oracle User login system, using the command line to jump to the Data/database directory, enter./runinstaller to bring up the installation page;
2, call up the installation page, click Next to install, I choose Database Service only installation
As with Windows installing an Oracle installation, this is not repeated here.
After the installation is complete, open the Listening configuration page via NETCA, execute the DBCA command, launch the Oracle instance installation interface, an Oracle service can correspond to multiple instances, an Oracle database corresponds to multiple table spaces and user names, and the table space can be managed by each user name.
After the installation completes the instance, when using the Sqlplus command to link the database, prompt could not open parameter file "/data/oracle/product/11.2/db_1/dbs/initorcl.ora", At this point, you need to copy the ORACLE instance configuration file you just installed (the file in init.ora.012009233838 form in the _base/admin/database name/pfile directory) to/data/oracle/product/ Under the 11.2/db_1/dbs directory
[[email protected] pfile]$ Pwd/data/oracle/admin/mlucdb/pfile[[email protected] pfile]$ CP init.ora.962016224738 /data/oracle/product/11.2/db_1/dbs/initorcl.ora# log in to Oracle using the Sqlplus command, restart the server sqlplus /nologconn/as sysdba;# Then enter startup, enter. This step is to start the Oracle service. Startup
After restarting the server, open ORACLE, prompting ora-01034:oracle not available ORA-27101
The reason for this is that the service is not started and is operated in the following way:
1, start the Oracle monitoring: CMD command Line window, input lsnrctl start, enter to start monitoring;
2, using Sqlplus/nolog login Oracle service, connection service Conn/as SYSDBA, then startup service
Iv. installation of Oracle under extended Redhat
1, Redhat system version as far as possible to use the desk version, easy to install Oracle interface, Oracle installation files to the Redhat server, you can SECURECRT remote clients to complete the transfer of data.
2, remember to configure the user to change the installation code under the machine, or the Oracle installation will appear garbled:
Vi/home/oracle/.bash_profile #追加配置文件export lang=c #防止安装过程出现乱码export Nls_lang=american_america. ZHS16GBK #设置Oracle客户端字符集 must be consistent with the CharSet set at Oracle installation
v. Reference blog
CentOS installation Oracle 11g full graphical http://www.cnblogs.com/zhwl/p/3719302.html
CENTOS7 installation of Oracle 11GR2 graphics detailed http://www.linuxidc.com/Linux/2016-04/130559p3.htm
Installing ORACLE_11GR2 tutorials in the redhat.enterprise.linux_v6.3 system http://www.cnblogs.com/swq6413/p/Oracle11gR2_Installation_On_RHEL6.html
Partially reprinted from: http://www.cnblogs.com/xibei666/p/5935219.html
CentOS7 installation of Oracle 11gR2