Home Database Mysql Tutorial RHEL6U3安装64bit Oracle 11gR2

RHEL6U3安装64bit Oracle 11gR2

Jun 07, 2016 pm 05:38 PM
oracle rhel database

今天接到通知,下周去一个新客户那边部署新环境,问题是时间还很紧,让下周一就去,时间紧还不是大问题,问题是产品的中间件Weblogic跟数据库Oracle我都好久没玩

今天接到通知,下周去一个新客户那边部署新环境,问题是时间还很紧,让下周一就去,时间紧还不是大问题,问题是产品的中间件Weblogic跟数据库Oracle我都好久没玩了,没得办法,只能提前演练一下了,为了下次找起来更加方便,就把过程整理到本博客上面来,也可以方便其他童鞋的查询吧。

谁要是跟我纠结时间这么紧,哪来的时间写博客的,我跟谁急哦!方便自己,也方便大家嘛!

华丽分割线

一.查看系统配置信息

[root@web-db ~]# hostname --fqdn //查看主机名 web-db [root@web-db ~]# ifconfig eth0 //查看本机IP地址 eth0 Link encap:Ethernet HWaddr 06:F1:96:00:00:C0 inet addr:192.168.153.153 Bcast:192.168.153.255 Mask:255.255.255.0 inet6 addr: fe80::4f1:96ff:fe00:c0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1706513 errors:0 dropped:0 overruns:0 frame:0 TX packets:877952 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2565533900 (2.3 GiB) TX bytes:59768622 (56.9 MiB) [root@web-db ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.153.153 web-db [root@web-db ~]# cat /etc/redhat-release //查看RHEL发行版本 Red Hat Enterprise Linux Server release 6.3 (Santiago) [root@web-db ~]# uname -m //查看本机CPU架构 x86_64 [root@web-db ~]# free -m //查看内存跟交换分区信息 total used free shared buffers cached Mem: 7870 2876 4993 0 12 2609 -/+ buffers/cache: 254 7616 Swap: 5760 0 5760 [root@web-db ~]# df -H //查看分区挂载信息 Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup-lv_root 9.1G 3.6G 5.1G 41% / tmpfs 4.2G 0 4.2G 0% /dev/shm /dev/vda1 508M 33M 449M 7% /boot /dev/vdb5 30G 181M 28G 1% /u01

当然,有朋友会问:你用的是物理机还是虚拟机?

我这么有钱,想想就知道我用的是什么了,是不是?

[root@web-db ~]# lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Thread(s) per core: 1 Core(s) per socket: 1 CPU socket(s): 8 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 13 Stepping: 3 CPU MHz: 2393.998 BogoMIPS: 4787.99 Hypervisor vendor: KVM Virtualization type: full L1d cache: 32K L1i cache: 32K L2 cache: 4096K NUMA node0 CPU(s): 0-7

咦? 怎么不是物理机,我说我什么时候这么有钱的呢?用的还是KVM虚拟机。

呵呵,开个玩笑,我们继续技术交流,禁止鄙视使用虚拟机的屌丝!

二.配置系统YUM源,安装依赖包

[root@web-db ~]# mount /dev/sr0 /media/ mount: block device /dev/sr0 is write-protected, mounting read-only [root@web-db ~]# cat /etc/yum.repos.d/rhel-source.repo [rhel6u3-core] name=rhel6u3-core baseurl=file:///media enabled=1 gpgcheck=0[root@web-db ~]# yum clean all Loaded plugins: product-id, subscription-manager Updating certificate-based repositories. Unable to read consumer identity Cleaning repos: rhel6u3-core Cleaning up Everything[root@web-db ~]# cat package.list //需要安装的依赖包信息列表 binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*.i686 elfutils-libelf-devel gcc gcc-c++ glibc*.i686 glibc glibc-devel glibc-devel*.i686 ksh libgcc*.i686 libgcc libstdc++ libstdc++*.i686 libstdc++-devel libstdc++-devel*.i686 libaio libaio*.i686 libaio-devel libaio-devel*.i686 make sysstat unixODBC unixODBC*.i686 unixODBC-devel unixODBC-devel*.i686[root@web-db ~]# yum install `cat package.list` -y //安装依赖包


三.修改内核参数


[root@web-db ~]# cp /etc/sysctl.conf \ /etc/sysctl.conf_20131016.bak//备份文件 [root@web-db ~]# cat /etc/sysctl.conf //在文件爱呢最后添加如下 ##==========Setting For Oracle 11G R2============## kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 6815744 fs.aio-max-nr = 1048576 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 4194304 net.core.wmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_max = 1048576[root@web-db ~]# sysctl -p //让修改立即生效 net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 net.ipv4.tcp_syncookies = 1 error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key error: "net.bridge.bridge-nf-call-iptables" is an unknown key error: "net.bridge.bridge-nf-call-arptables" is an unknown key kernel.msgmnb = 65536 kernel.msgmax = 65536 kernel.shmmax = 68719476736 kernel.shmall = 4294967296 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 6815744 fs.aio-max-nr = 1048576 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 4194304 net.core.wmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_max = 1048576

四. 创建Oracle用户以及相关权限修改

1. 创建oracle 用户组跟用户

[root@web-db ~]# groupadd oinstall [root@web-db ~]# groupadd dba [root@web-db ~]# useradd -g oinstall -G dba -m oracle [root@web-db ~]# echo oracle |passwd --stdin oracle //创建密码 Changing password for user oracle. passwd: all authentication tokens updated successfully.

2. 修改限制

[root@web-db ~]# cp /etc/security/limits.conf /etc/security/limits.conf.20131016.bak ##=============Setting For Oracle 11G R2=============## oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 oracle soft stack 10240 [root@web-db ~]# cat /etc/pam.d/login ##======Setting For Oracle 11G R2========## session required pam_limits.so [root@web-db ~]# cat /etc/profile ##===Setting For Oracle 11G R2=====## if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi [root@web-db ~]# source /etc/profile
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MySQL: An Introduction to the World's Most Popular Database MySQL: An Introduction to the World's Most Popular Database Apr 12, 2025 am 12:18 AM

MySQL is an open source relational database management system, mainly used to store and retrieve data quickly and reliably. Its working principle includes client requests, query resolution, execution of queries and return results. Examples of usage include creating tables, inserting and querying data, and advanced features such as JOIN operations. Common errors involve SQL syntax, data types, and permissions, and optimization suggestions include the use of indexes, optimized queries, and partitioning of tables.

What to do if the oracle can't be opened What to do if the oracle can't be opened Apr 11, 2025 pm 10:06 PM

Solutions to Oracle cannot be opened include: 1. Start the database service; 2. Start the listener; 3. Check port conflicts; 4. Set environment variables correctly; 5. Make sure the firewall or antivirus software does not block the connection; 6. Check whether the server is closed; 7. Use RMAN to recover corrupt files; 8. Check whether the TNS service name is correct; 9. Check network connection; 10. Reinstall Oracle software.

Why Use MySQL? Benefits and Advantages Why Use MySQL? Benefits and Advantages Apr 12, 2025 am 12:17 AM

MySQL is chosen for its performance, reliability, ease of use, and community support. 1.MySQL provides efficient data storage and retrieval functions, supporting multiple data types and advanced query operations. 2. Adopt client-server architecture and multiple storage engines to support transaction and query optimization. 3. Easy to use, supports a variety of operating systems and programming languages. 4. Have strong community support and provide rich resources and solutions.

How to solve the problem of closing oracle cursor How to solve the problem of closing oracle cursor Apr 11, 2025 pm 10:18 PM

The method to solve the Oracle cursor closure problem includes: explicitly closing the cursor using the CLOSE statement. Declare the cursor in the FOR UPDATE clause so that it automatically closes after the scope is ended. Declare the cursor in the USING clause so that it automatically closes when the associated PL/SQL variable is closed. Use exception handling to ensure that the cursor is closed in any exception situation. Use the connection pool to automatically close the cursor. Disable automatic submission and delay cursor closing.

How to create cursors in oracle loop How to create cursors in oracle loop Apr 12, 2025 am 06:18 AM

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.

How to stop oracle database How to stop oracle database Apr 12, 2025 am 06:12 AM

To stop an Oracle database, perform the following steps: 1. Connect to the database; 2. Shutdown immediately; 3. Shutdown abort completely.

What steps are required to configure CentOS in HDFS What steps are required to configure CentOS in HDFS Apr 14, 2025 pm 06:42 PM

Building a Hadoop Distributed File System (HDFS) on a CentOS system requires multiple steps. This article provides a brief configuration guide. 1. Prepare to install JDK in the early stage: Install JavaDevelopmentKit (JDK) on all nodes, and the version must be compatible with Hadoop. The installation package can be downloaded from the Oracle official website. Environment variable configuration: Edit /etc/profile file, set Java and Hadoop environment variables, so that the system can find the installation path of JDK and Hadoop. 2. Security configuration: SSH password-free login to generate SSH key: Use the ssh-keygen command on each node

How to create oracle dynamic sql How to create oracle dynamic sql Apr 12, 2025 am 06:06 AM

SQL statements can be created and executed based on runtime input by using Oracle's dynamic SQL. The steps include: preparing an empty string variable to store dynamically generated SQL statements. Use the EXECUTE IMMEDIATE or PREPARE statement to compile and execute dynamic SQL statements. Use bind variable to pass user input or other dynamic values ​​to dynamic SQL. Use EXECUTE IMMEDIATE or EXECUTE to execute dynamic SQL statements.

See all articles