Oracle Database 11g R2 在Oracle Linux 6.3和Ubuntu 12.04的安装
Oracle Database很难装。在微博上看到,有人说如果装好Oracle的数据库,其他数据库就很简单了。除了MySQL,我没装过其他,所以不
Oracle Database很难装。在微博上看到,有人说如果装好Oracle的数据库,其他数据库就很简单了。除了MySQL,我没装过其他,所以不知道。。
Oracle Linux Server 6.3:
既然是Oracle的产品,Oracle Linux应该是被支持的平台之一。Oracle Database 11g Release 2 (11.2) Installation On Oracle Linux 6这篇文章基本上照着做就可以安装成功了。
Ubuntu 12.04:
同样,How to install Oracle Database 11g R2 on Ubuntu 12.04这篇文章也是按照它做就基本上会成功了。它的中心思想是两个步骤。一是把ubuntu装扮成Red Hat/Fedora系,修改文件夹结构,添加软链接;二是安装。轻松加愉快。
笔记:
珠玉在前,我也不好献丑重写一篇了。不过,在我安装的过程中,遇到几个情况,觉得值得记录一下。
其中一个提前说的就是最好先设置,安装前再解压。因为对两个文件改权限总比两个文件夹简单一点。
这些notes中,前两点是仅针对Oracle Linux的,后面的是两个操作系统公共的:
1. 在Oracle Linux Server 6.3安装的时候,oracle-rdbms-server-11gR2-preinstall这个工具很好用。它自动化地把配置修改了,,而且在前面添加上注释,如果以后要恢复配置,能清晰地看到。因为Oracle Linux是Red Hat兼容的,所以不知道会不会也有相同的效果。ubuntu装了rpm,也没有尝试过。
不过,在自动化配置工具运行完成以后,有两个地方与文中不一致。一是中还有一两个文中所说包没有被安装。虽然应该问题不大,但为了保险起见,我还是用yum安装了;二是有些用户组没有被建立,这点文中手工配置的部分提到过,那些组是不需要的。后来在另一台机器上没有建立这些组,安装依然成功。
2. Oracle Linux Server 6.3文章中,+xhost那一句的命令,我运行从未成功过。但貌似不影响结果。
3. /etc/sysctl.conf中,那些后缀是all与max的值,应该不需要与文中一致。那个应该是数据库的要求的最小值,只需要比那个值大就好。
4. /etc/hosts中,加上那一行的意思应该是从这个文件中,找到本机主机名的一个ip地址。所以这需要做到两点,一是给一个形式合法的ip,能否连接到互联网没关系,最好避开127.0.0.1;二是要写自己的主机名,不要照抄文章用的那一个,具体可以在shell中用hostname命令查询。实际上在文章中用尖三角写了应该怎样替换。
5. 安装时,如果按照文中所说,用命令行运行runInstaller,即使设置了display变量,还是会出现Java异常。这应该是一个显示的问题,具体我也不太了解。在个人电脑中,要回避这个问题,可以用图形界面登录oracle用户,然后用鼠标双击安装目录下的runInstaller安装。安装选择typical还是advance都没有问题。 【Linux公社 】
6. 安装过程中可能出现错误,这时不要急着退出,先按一下retry(有个错误就是这样被解决了。。)。如果不行,按照文中修改,然后retry即可。如果不能解决,请google一下。反正进程也是挂起了,不会有问题的。
7. 若未设置/etc/hosts,复制完文件、配置数据库会出现一个错误(号码忘了,不好意思),请重新查阅文章,设置为本机的hostname。
8. 安装成功后,记得运行那两个脚本。
9. 可以按照讲Oracle Linux安装那篇文章设置环境变量。
10. 用sqlplus,以sys(或者sysdba)用户登录后,可以尝试连接到scott/tiger模式。这需要先运行startup。
如果出现ORA-01034和ORA-27101错误,网上有两步可以解决问题,一是看变量$ORACLE_SID有没有设置(有可能写了配置文件,但是环境变量还没读取),二是看/dev/shm这个共享的空间有没有挂载、空间是否满足需求。
如果这些都满足,可能就是启动时的找不到pfile (Initialization Parameter File)。通常,启动时数据库会找$ORACLE_HOME/dbs/init$ORACLE_SID.ora这个文件。
这有两个解决方法。
10.1. 可以用命令行在startup命令后指定pfile,或者指定到全局的spfile(一般在$ORACLE_HOME/dbs/spfile,或者用show parameter spfile来定位)。
10.2. 把$ORACLE_BASE/admin/
11. 有可能做完前面的东西,再次startup会出现ORA-01078以及LRM-00109错误,这时请尝试一下重启机器。我的朋友就是因为共享空间忙,尝试多次后失败。注销也不行,但重启后就好了。如果重启后也不行,请google一下,所有的解决方案都是一样的呢。
最后,可以解锁账户,进入scott/tiger模式与hr/hr模式测试数据库是否成功运行啦~

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

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











Full table scanning may be faster in MySQL than using indexes. Specific cases include: 1) the data volume is small; 2) when the query returns a large amount of data; 3) when the index column is not highly selective; 4) when the complex query. By analyzing query plans, optimizing indexes, avoiding over-index and regularly maintaining tables, you can make the best choices in practical applications.

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

MySQL and MariaDB can coexist, but need to be configured with caution. The key is to allocate different port numbers and data directories to each database, and adjust parameters such as memory allocation and cache size. Connection pooling, application configuration, and version differences also need to be considered and need to be carefully tested and planned to avoid pitfalls. Running two databases simultaneously can cause performance problems in situations where resources are limited.

LaravelEloquent Model Retrieval: Easily obtaining database data EloquentORM provides a concise and easy-to-understand way to operate the database. This article will introduce various Eloquent model search techniques in detail to help you obtain data from the database efficiently. 1. Get all records. Use the all() method to get all records in the database table: useApp\Models\Post;$posts=Post::all(); This will return a collection. You can access data using foreach loop or other collection methods: foreach($postsas$post){echo$post->

Data Integration Simplification: AmazonRDSMySQL and Redshift's zero ETL integration Efficient data integration is at the heart of a data-driven organization. Traditional ETL (extract, convert, load) processes are complex and time-consuming, especially when integrating databases (such as AmazonRDSMySQL) with data warehouses (such as Redshift). However, AWS provides zero ETL integration solutions that have completely changed this situation, providing a simplified, near-real-time solution for data migration from RDSMySQL to Redshift. This article will dive into RDSMySQL zero ETL integration with Redshift, explaining how it works and the advantages it brings to data engineers and developers.

In MySQL database, the relationship between the user and the database is defined by permissions and tables. The user has a username and password to access the database. Permissions are granted through the GRANT command, while the table is created by the CREATE TABLE command. To establish a relationship between a user and a database, you need to create a database, create a user, and then grant permissions.

MySQL is suitable for beginners because it is simple to install, powerful and easy to manage data. 1. Simple installation and configuration, suitable for a variety of operating systems. 2. Support basic operations such as creating databases and tables, inserting, querying, updating and deleting data. 3. Provide advanced functions such as JOIN operations and subqueries. 4. Performance can be improved through indexing, query optimization and table partitioning. 5. Support backup, recovery and security measures to ensure data security and consistency.
