`

linux oralce

 
阅读更多
RHEL/CentOs 6.x

# cd /etc/yum.repos.d
# wget https://public-yum.oracle.com/public-yum-ol6.repo
RHEL/CentOs 5.x

# cd /etc/yum.repos.d
# wget https://public-yum.oracle.com/public-yum-el5.repo
RHEL/CentOs 4.x

# cd /etc/yum.repos.d
# wget https://public-yum.oracle.com/public-yum-el4.repo
Now perform the following “yum” command to install all the necessary prerequisites automatically.

[root@oracle]# yum install oracle-rdbms-server-11gR2-preinstall
While importing GPG key, you might get “GPG key retrieval failed” error as shown below. Here, you need to import proper GPG key for your OS release.

Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Download and verify the appropriate Oracle Linux GPG Key that best matches your RHEL/CentOS compatible OS release.

RHEL/CentOs 6.x

# wget https://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
RHEL/CentOs 5.x

# wget https://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
RHEL/CentOs 4.x

# wget https://public-yum.oracle.com/RPM-GPG-KEY-oracle-el4 -O /usr/share/rhn/RPM-GPG-KEY-oracle
Step 2: Setting Hostname

Open the “/etc/sysconfig/network” file and modify the HOSTNAME to match your FQDN (Fully Qualified Domain Name) host name.

[root@oracle]# vi /etc/sysconfig/network
HOSTNAME=oracle.tecmint.com
Open “/etc/hosts” file and add fully qualified hostname for the server.

[root@oracle]# vi /etc/hosts
192.168.246.128 oracle.tecmint.com oracle
Now you need to restart networking on the server to make sure that changes will be persistent on reboot.

[root@oracle]# /etc/init.d/network restart
Step 3: Oracle User Settings

Set the password for the “oracle” user.

[root@oracle]# passwd oracle

Changing password for user oracle.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.





   oralce安装完成,以后基本操作是要知道的。
      一.启动
            1.#su - oracle              切换到oracle用户且切换到它的环境
            2.$lsnrctl status           查看监听及数据库状态
            3.$lsnrctl start            启动监听
            4.$sqlplus / as sysdba       以DBA身份进入sqlplus
            5.SQL>startup                启动db
      二.停止
            1.#su - oracle              切换到oracle用户且切换到它的环境
            2.$lsnrctl stop             停止监听
            3.$sqlplus / as sysdba      以DBA身份进入sqlplus
            4.SQL>SHUTDOWN IMMEDIATE    关闭db


emctl start dbconsole
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics