Linux下安装Oracle11g服务器
安装环境 Linux服务器:SuSe10 sp2 64位 Oracle服务器:Oracle11gR2 64位 系统要求 Linux安装Oracle系统要求 系统要求 说明 内存 必须高于1G的物理内存 交换空间 一般为内存的2倍,例如:1G的内存可以设置swap 分区为3G大小 硬盘 5G以上 2.修改操作系统核心
安装环境
Linux服务器:SuSe10 sp2 64位
Oracle服务器:Oracle11gR2 64位
系统要求
- Linux安装Oracle系统要求
系统要求 |
说明 |
内存 |
必须高于1G的物理内存 |
交换空间 |
一般为内存的2倍,例如:1G的内存可以设置swap 分区为3G大小 |
硬盘 |
5G以上 |
2.修改操作系统核心参数
在Root用户下执行以下步骤:
1)修改用户的SHELL的限制,修改/etc/security/limits.conf文件
输入命令:vi /etc/security/limits.conf,按i键进入编辑模式,将下列内容加入该文件。
oracle soft nproc 2047 |
编辑完成后按Esc键,输入“:wq”存盘退出
2)修改/etc/pam.d/login 文件,输入命令:vi /etc/pam.d/login,按i键进入编辑模式,将下列内容加入该文件。
session required /lib/security/pam_limits.so |
编辑完成后按Esc键,输入“:wq”存盘退出
3)修改linux内核,修改/etc/sysctl.conf文件,输入命令: vi /etc/sysctl.conf ,按i键进入编辑模式,将下列内容加入该文件
fs.file-max = 6815744 |
编辑完成后按Esc键,输入“:wq”存盘退出
4)要使 /etc/sysctl.conf 更改立即生效,执行以下命令。 输入:sysctl -p 显示如下:
linux:~ # sysctl -p net.ipv4.icmp_echo_ignore_broadcasts = 1 net.ipv4.conf.all.rp_filter = 1 fs.file-max = 6815744 fs.aio-max-nr = 1048576 kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 4194304 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 |
5)编辑 /etc/profile ,输入命令:vi /etc/profile,按i键进入编辑模式,将下列内容加入该文件。
if [ $USER = "oracle" ]; then fi |
编辑完成后按Esc键,输入“:wq”存盘退出
6)创建相关用户和组,作为软件安装和支持组的拥有者。
创建用户,输入命令: groupadd oinstall 创建Oracle用户和密码,输入命令: useradd -g oinstall -g dba -m oracle passwd oracle 然后会让你输入密码,密码任意输入2次,但必须保持一致,回车确认 |
7)创建数据库软件目录和数据文件存放目录,目录的位置,根据自己的情况来定,注意磁盘空间即可,这里我把其放到oracle用户下,例如:
输入命令: mkdir /home/oracle/app mkdir /home/oracle/app/oracle mkdir /home/oracle/app/oradata mkdir /home/oracle/app/oracle/ product |
8)更改目录属主为Oracle用户所有,输入命令:
chown -R oracle:oinstall /home/oracle/app |
9)配置oracle用户的环境变量,首先,切换到新创建的oracle用户下,
输入:su – oracle ,然后直接在输入 : vi .bash_profile
按i编辑 .bash_profile,进入编辑模式,增加以下内容:
umask 022 export ORACLE_BASE=/home/oracle/app export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1 export ORACLE_SID=orcl export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib |
编辑完成后按Esc键,输入“:wq”存盘退出
安装过程
1) 当上述系统要求操作全部完成后,注销系统,在图形界面以Oracle用户登陆。首先将下载的Oracle安装包复制到linux中,推荐用Xmanager 或其他ftp工具拷贝。
打开一个终端,运行unzip命令解压oracle安装文件,如:
输入命令: unzip linux.x64_11gR2_database_1of2.zip unzip linux.x64_11gR2_database_2of2.zip |
解压完成后 cd 进入其解压后的目录database
输入命令: cd database |
使用ls命令可以查看解压后database所包含的文件,如下图:
2) 执行安装,输入命令:./runInstaller
装到这一步,可以看到,可以查看到有很多的rpm包没有,我们可以从安装linux的光盘或ISO中查找所缺的包,使用ftp上传到linux中,然后使用rpm –ivh xxx.rpm --nodeps –force 来进行安装(其中加上--nodeps -- force 代表强制安装,是在直接使用rpm –ivh xxx.rpm安装不成功的情况下用的)安装过程略。
等到把包全部都安装好的情况下,再次在oracle图形界面中,执行安装过程2,下来在环境检查过程中,就通过了。
安装完成后,系统会提示你需要用root权限执行2个shell脚本。按照其提示的路径,找到其所在的位置,如:我的就在/home/oracle/app/oracle/product/11.2.0/dbhome_1/root.sh
和 /home/oracle/app/oraInventory/orainstRoot.sh 新开启一个终端,输入命令:
su – root cd /home/oracle/app/oracle/product/11.2.0/dbhome_1 sh root.sh cd /home/oracle/app/oraInventory sh orainstRoot.sh |
数据库建库
1) 还是在oracle用户的图形界面oracle用户中,新开启一个终端,直接输入命令dbca会弹出如下界面。我们这里采用定制数据库。
输入统一密码(也可以分别设置其密码)
数据库存放位置,我这里采用默认
不指定快速恢复和归档
去掉不常用的模块
内存分配及指定字符集
经过漫长的等待,当看到此界面,说明oracle建库完成
可以用sqlplus来检验下,新开启一个命令窗口,输入sqlplus,然后输入用户名和密码,可以测试下,这里就不做过多的介绍了。
配置监听及本地网络服务
1) 在oracle用户的图形界面oracle用户中,新开启一个终端,输入命令netca 会弹出如下界面。
2)创建监听服务(充当oracle服务器,让别的oracle客户端连接本oracle服务器)
3)配置本地网络服务名(充当oracle客户端,连接别的oracle服务器)
输入连接的oracle服务器的数据库的实例名
输入oracle服务器的ip地址
选中测试
点击change Login 输入所连接oracle服务器的其中某一个用户名和密码,点击OK
看到此界面说明测试成功(如果不成功,请查看网络是否畅通,所连接的oracle服务器是否启动,监听是否启动等原因)
为你所设置的本地网络服务名起个名字
然后下一步,下一步即可
这样oracle服务器安装配置基本就完成了。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

DeepSeek is a powerful intelligent search and analysis tool that provides two access methods: web version and official website. The web version is convenient and efficient, and can be used without installation; the official website provides comprehensive product information, download resources and support services. Whether individuals or corporate users, they can easily obtain and analyze massive data through DeepSeek to improve work efficiency, assist decision-making and promote innovation.

There are many ways to install DeepSeek, including: compile from source (for experienced developers) using precompiled packages (for Windows users) using Docker containers (for most convenient, no need to worry about compatibility) No matter which method you choose, Please read the official documents carefully and prepare them fully to avoid unnecessary trouble.

Ouyi OKX, the world's leading digital asset exchange, has now launched an official installation package to provide a safe and convenient trading experience. The OKX installation package of Ouyi does not need to be accessed through a browser. It can directly install independent applications on the device, creating a stable and efficient trading platform for users. The installation process is simple and easy to understand. Users only need to download the latest version of the installation package and follow the prompts to complete the installation step by step.

BITGet is a cryptocurrency exchange that provides a variety of trading services including spot trading, contract trading and derivatives. Founded in 2018, the exchange is headquartered in Singapore and is committed to providing users with a safe and reliable trading platform. BITGet offers a variety of trading pairs, including BTC/USDT, ETH/USDT and XRP/USDT. Additionally, the exchange has a reputation for security and liquidity and offers a variety of features such as premium order types, leveraged trading and 24/7 customer support.

Gate.io is a popular cryptocurrency exchange that users can use by downloading its installation package and installing it on their devices. The steps to obtain the installation package are as follows: Visit the official website of Gate.io, click "Download", select the corresponding operating system (Windows, Mac or Linux), and download the installation package to your computer. It is recommended to temporarily disable antivirus software or firewall during installation to ensure smooth installation. After completion, the user needs to create a Gate.io account to start using it.

Ouyi, also known as OKX, is a world-leading cryptocurrency trading platform. The article provides a download portal for Ouyi's official installation package, which facilitates users to install Ouyi client on different devices. This installation package supports Windows, Mac, Android and iOS systems. Users can choose the corresponding version to download according to their device type. After the installation is completed, users can register or log in to the Ouyi account, start trading cryptocurrencies and enjoy other services provided by the platform.

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

Causes and solutions for errors when using PECL to install extensions in Docker environment When using Docker environment, we often encounter some headaches...
