Install the virtual system CentOS6.5, assign to at least 1G of memory, other conditions appropriate higher, specific reference official documents
First, install the database:
1. Install dependent packages
Yum Install binutils-Yyum Install Compat-libcap-Yyum Install Compat-libstdc++- --Yyum Install Compat-libstdc++- -. i686-Yyum Install gcc-Yyum Install gcc-c++-Yyum Install glibc-Yyum Install glibc.i686-Yyum Install glibc-devel-Yyum Install glibc-devel.i686-Yyum Install Ksh-Yyum Install LIBGCC-Yyum Install libgcc.i686-Yyum Install LIBSTDC++ -Yyum Install LIBSTDC++.i686-Yyum Install LIBSTDC++-devel-Yyum Install LIBSTDC++-devel.i686-Yyum Install Libaio-Yyum Install libaio.i686-Yyum Install Libaio-devel-Yyum Install Libaio-devel.i686-Yyum Install Libxext-Yyum Install libxext.i686-Yyum Install libxtst-Yyum Install libxtst.i686-Yyum Install libX11-Yyum Install libx11.i686-Yyum Install Libxau-Yyum Install libxau.i686-Yyum Install LIBXCB-Yyum Install libxcb.i686-Yyum Install Libxi-Yyum Install libxi.i686-Yyum Install make-Yyum Install Sysstat-Yyum Install UnixODBC-Yyum Install UnixODBC-devel-Yyum Install zlib-devel-y
View Code2. Create users and Groups [[email protected]~]# Clear
[[email protected]~]# Groupadd dba
[[email protected]~]# Groupadd Oinstall
[[email protected]~]# useradd-g oinstall-g dba Oracle
[[email protected]~]# passwd Oracle
3. Create the Oracle Software installation directory:
[[email protected]~]# mkdir-p/u01/app/oracle
[[email protected]~]# Chown-r oracle:oinstall/u01
[[email protected]~]# Chmod-r775/U01/4, edit the/etc/sysctl.conf file with the root user to modify this file, add at the end:
Kernel.shmmni =4096Kernel.sem= - 32000 - -Net.ipv4.ip_local_port_range=9000 65500Net.core.rmem_default=4194304Net.core.rmem_max=4194304Net.core.wmem_default=262144Net.core.wmem_max=1048586Fs.aio-MAX-NR =1048576Fs.file-max =6815744
View Code
Use the following command to make the kernel parameter changes effective so that you do not need to restart the computer:
[Email protected] ~]# sysctl-p
5, [[email protected] ~]# vim/etc/security/limits.conf
Root user modified, add at the end:
2047163841024x76865536
View Code
6, [[email protected] ~]# Vim/etc/pam.d/login
Add at the end of the file:
Session required /lib/security/pam_limits.sosession required pam_limits.so
View Code
7. Modify with Root [email protected] ~]# vim/etc/profile
if " Oracle " ];thenif"/bin/ksh"1638465536 Else1638465536Fifi
View Code
8. Edit/etc/hosts
[email protected] ~]# hostname
Vn
[email protected] ~]# ifconfig eth0|grep "inet addr"
inet addr:192.168.121.178 bcast:192.168.121.255 mask:255.255.255.0
[email protected] ~]# cat/etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.121.178 vn #添加此行
9. Edit/home/oracle/.bash_profile with Oracle user identity
[email protected] ~]# su-oracle
[email protected] ~]$ vim/home/oracle/.bash_profile
Add the following at the end:
Export tmp=/tmp;export TMPDIR=$TMP; export oracle_term=xtermexport oracle_base=/u01/app/ oracleexport oracle_home= $ORACLE _base/product/12.1. 0/db_1export oracle_sid=orclexport PATH= $ORACLE _home/bin: $PATH
View Code
Use the following command to have the settings take effect:
[Email protected] ~]$ Source/home/oracle/.bash_profil
10. Upload files to/home/oracle and unzip with Oracle user
Oracle is the owner of file permissions:
[Email protected] oracle]# ls/home/oracle/-L-rwxrw-rw-.1Root root1361028723June2 ,:TenLinuxamd64_12c_database_1of2.zip-rwxrw-rw-.1Root root1116527103June2 ,: theLinuxamd64_12c_database_2of2.zip[[email protected] oracle]# chown Oracle/home/Oracle Linuxamd64_12c_database_1of2.zip [[email protected] oracle]# Chown Oracle/home/Oracle Linuxamd64_12c_database_2of2.zip [[email protected] oracle]# ls/home/oracle/-L-rwxrw-rw-.1Oracle Root1361028723June2 ,:TenLinuxamd64_12c_database_1of2.zip-rwxrw-rw-.1Oracle Root1116527103June2 ,: theLinuxamd64_12c_database_2of2.zip
View Code
Switch to Oracle User decompression:
[email protected] oracle]# su-oracle
[email protected] ~]$ unzip Linuxamd64_12c_database_1of2.zip
[email protected] ~]$ unzip Linuxamd64_12c_database_2of2.zip
11. Install with Oracle User login GUI 11, install with Oracle user login GUI [[email protected]~]$ CD database/
[[email protected]database]$./runinstaller
Starting Oracle Universal Installer ...
Check for temporary space: must be greater than MB. The actual 39610 MB passed
Check swap space: must be greater than. The actual 3999 MB passed
Check monitor: The monitor configuration must display at least 256 colors. The actual 16777216 Pass
Prepare to start Oracle Universal installer/tmp/orainstall2015-06-08_08-52-17pm from the following address. Please wait ... Do not use e-mail: Do not use updates: Ignore, click Yes to select Create and configure a database: Select server type: Select Single Instance Database installation: Choose advanced installation, so there are more options: Choose the default language, here choose English and Chinese: Select the Enterprise Edition: Specify the installation location, the software will be automatically read. Profile settings, click Next: Select General purpose/thing handling: Database identifier, select default: Select Enable automatic memory management, UTF-8 character set, create a database with the sample schema:Select File System: Do not register: Do not enable recovery (according to their own needs to choose ha): password (can be set separately, you can also set the unified): The management of permissions, as required, here for the unity of the DBA: Save the response file: About 77%, the box will appear to execute two scripts as follows:
[Email protected] ~]#/u01/app/orainventory/orainstroot.sh Changing Permissions/u01/app/orainventory. Add read and Write permissions for the group. Deletes the global read, write, and execute permissions. Change group name/u01/app/orainventory to Oinstall. The execution of the script is complete. [[Email protected]~]#/u01/app/oracle/product/12.1.0/db_1/root.sh performing root user operation forOracle 12c The following environment variables isSet as: Oracle_owner=Oracle Oracle_home=/u01/app/oracle/product/12.1.0/Db_1enter the full pathname of the Local bin directory: [/usr/local/bin]: Here directly enter the Copying dbhome to/usr/local/bin ... Copying oraenv to/usr/local/bin ... Copying coraenv to/usr/local/bin ... Creating/etc/oratab File ... Entries 'll be added to the/etc/oratab file asneeded bydatabase Configuration Assistant when a database iscreatedfinished running generic part of root script. Now product-specific root actions would be performed.
View CodeAbout 91%. Configuration database: Password Management: Installation Complete: Two, Management Listener and database start shutdown Management Listener 1, view listener status [[email protected]~]$ Lsnrctl status2, start listener [[email protected]~]$ Lsnrctl start[[email protected]~]$ tnsping Orcl3, Close listener [[email protected]~]$ lsnrctl start and shut down Oracle1, start the database
" Sys/as sysdba " SQL> startup sql from V$instance;
2. Close the database
Sql> shutdown immediate;database closed. Database dismounted. ORACLE instance shut down.
Third, Oracle client Tools (1), Sql*plus (2), Oracle EM Express (enter the URL on the webpage: Https://IP address: 5500/em, and then add the trust in the warning that appears, if you are using a physical machine browser, Need to open 5500, 1521 ports of the firewall in the virtual System): (3), Oracle SQL Developer
CentOS Installation oracle12c