Note:
Install oracle10g in ubuntu10.04. The main step is to configure the oracle runtime environment. The installation is a simple statement.
This is the oracle I installed, the ubuntu dual-system installed under Windows, with 2 GB memory. If you encounter any problems during installation,
Please use www.google.com.hk to search for an error message.
I. Preparations
1. Download oracle10g.
Log on to the official website www.oracle.com, download it, find oracle10g, and download
Oracle Database 10 gRelease 2 (10.2.0.1.0) Enterprise/Standard Edition for Linux x86: 10201_database_linux32.zip
2. Update ubuntu.
Sudo apt-get update
Sudo apt-get upgrade
3. Install the missing package.
1). sudo apt-get install gcc make binutils lesstif2 libc6 libc6-dev rpm libmotif3 libaio1 alien
Note: You can use the following method to replace 2), that is, do not install compat-libstdc ++-33-3.2.3-61.i386.rpm, but I have not tried it.
Cd/usr/lib
Ln-s libstdc ++. so.6 libstdc ++. so.5
2) Search for: compat-libstdc ++-33-3.2.3-61.i386.rpm at www.google.com.hk and download it.
Open the shell, use cd, and enter the directory, 1). Log On As the root user: su-
2) execute the installation command: alien-I compat-libstdc ++-33-3.2.3-61.i386.rpm
4. Modify the ubuntu version to cheat the oracle installer.
You need to create a file redhat-release in the/etc/directory. You need the permission to create the file. After the file is created, add the following content:
$ Sudo gedit/etc/redhat-release
Add the following line and save it.
Red Hat Linux release 3.1 (drupal)
5. Create a user.
1) log on to the root user: su-
(If your root password is not manually set, use the sudo passwd root command to reset the password and then log on again ).
2) create an Oracle user and two groups for the installer.
First, check whether they already exist:
$ Grep oinstall/etc/group
$ Grep dba/etc/group
$ Grep nobody/etc/group
If they are not in the system, create them.
$ Sudo addgroup oinstall
$ Sudo addgroup dba
$ Sudo addgroup nobody
$ Sudo useradd-m-g oinstall-G dba-p passwd-d/home/oracle-s/bin/bash oracle
$ Sudo usermod-g nobody
Note: If you do not understand the preceding parameters, run the following command: man useradd.
6. Add a user to the sudoer list
Sudo gedit/etc/sudoers
In the next line of "root ALL = (ALL) ALL", add:
Oracle ALL = (ALL) ALL
Save.
Note: by default, users are not added to the sudoers list in Linux. You must manually add the account to the sudoers list by the root user so that the normal account can execute the sudo command.
7. Create an oracle installation directory.
# Mkdir-p/opt/ora10
# Chown-R oracle: oinstall/opt/ora *
# Chmod-R 775/opt/ora *
You have generated the runtime path of oracle and granted the write permission to the oracle user. The execution permission is granted to the dba group.
8. System Environment configuration.
1) Add the following lines to the/etc/sysctl. conf file:
Run the sudo gedit/etc/sysctl. conf command to edit the file.
Kernel. shmall = 2097152
Kernel. shmmax = 2147483648
Kernel. shmmni = 4096
Kernel. sem = 250 32000 100 128
Fs. file-max = 65536
Net. ipv4.ip _ local_port_range = 1024 65000
Update the system and run:
$ Sudo sysctl-p
2) Add the following lines to the/etc/security/limits. conf file:
* Soft nproc 2407
* Hard nproc 16384
* Soft nofile 1024
* Hard nofile 65536
3) Establish a soft connection:
$ Sudo ln-s/usr/bin/awk
$ Sudo ln-s/usr/bin/rpm
$ Sudo ln-s/usr/bin/basename
4) modify the environment variables of oracle users in ubuntu.
Edit: gedit/home/oracle/. bashrc file, add:
Export ORACLE_HOME =/opt/ora10
Export ORACLE_OWNER = oracle
Export ORACLE_SID = ora1
Export ORACLE_TERM = xterm
Export PATH = $ ORACLE_HOME/bin: $ ORACLE_HOME/Apache/bin: $ PATH
Ii. Install oracle
Log out after completion and use the oracle user to log on. After extracting the downloaded zip file, the database folder is generated.
Cd to enter the database.
Run:./runInstaller
Enter the graphical interface for oracle installation. Read the installation tips carefully.
Note: small details should be paid attention to during installation
1) use Advanced Installation
2) create a database instance.
3) in the Post-installation period, the system prompts you to use the root user to run two script files orainstRoot. sh and root. sh. For details, see the prompt.
Iii. Start oracle
1. Switch to oracle user permissions.
Su oracle
2. start the TNS Listener: $ ORACLE_HOME/bin/lsnrctl start
($ ORACLE_HOME is the installation directory of oracle:/opt/ora10. Run cd to go to the installation directory of oracle, go to the bin folder, and run $ lsnrctl start ).
Disable TNS: $ ORACLE_HOME/bin/lsnrctl stop
3. Start sqlplus: $ ORACLE_HOME/bin/sqlplus/nolog
Disable sqlplus: SQL> exit
4. Create a database
1. log out of the current user (logout) and log on with the oracle user.
2. Open the shell and enter the command dbca.
The graphic interface for database installation is displayed. Install it as prompted.
Note:
1) when entering the sid, it must be consistent with the oracle environment variable, that is, export ORACLE_SID = ora1. You can view it through less. bashrc.
2) When the window name is "Character Set", select "choose from the list of the character sets" and then select:
"ZHS16GBK-GBK 16-bit Simplified Chinese"
5. Several Basic commands for operating the database
From the space of glzhang8610