安装环境 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服务器安装配置基本就完成了。

InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA


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

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

Hot Article

Hot Tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

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

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version
Visual web development tools