Sie sind auf Seite 1von 2

How install a database in Linux machine:

1. First copy the files to Linux machine to the folder Database.


2. Give the permissions to the folder Database to install and copy to that folder.
3. execute the command Xhost + for GUI interface.
4. Navigate to the Database folder.
5. Run the command chmod -R 777 /database/ to give the permission to the
database folder to the user oracle.
6. Switch to the oracle user by executing the command su oracle.
7. execute the command ll to long list the files.
8. execute the command ./runinstaller to start the database configuration.
9. Once the installation wizard starts click on next button without giving email
address.
10.Select the radio button install database software only and click on next
button.
11.Select the radio button Single instance database installation and click
on next button.
12.Select English language.
13.Select the enterprise edition and click on next.
14.Give the path in the oracle case as /database (I needs to install the s/w in
this location.)
15.Give Inventory directory path as /database/oralnventory
16.Dont change the privileged operating system groups, keep the defaults and click on
next.
17.If anything fails or warnings in prerequisite check, click on Fix and check
again button and follow the steps as recommended in the screen to run the
command in terminal.
18.Still unable to click on next button due to errors (3 errors in packages) check
the box Ignore all and click on next.

While creating the DB enter the following the content in the file db.sh

export ORACLE_HOME=/opt/db/product/12.1.0/dbhome_1 (Highlighted content change according


to the installation path.)

export PATH=$PATH:$ORACLE_HOME/bin

export ORACLE_SID=oracle

Note: Path and SIC will change according to the installation.

How to start a Database in Linux

1.Open the Linux terminal.


2.Switch user to Oracle if logged in as root user.
3.run the following command. Running this command for setting the environment
variables.
Navigate to the following directory cd/opt/db. (installed the db in opt mount point).
Then execute the file db.sh. To execute use the following the command . db.sh
After running the above command use the command sqlplus / as sysdba
4.Then Sql will be opened and give the input as startup. Then the database will be
started.
5.To shut down the Sql use the input as shutimmediately.

How to create Listener port (oracle net services configuration assistant)

Simply this is a connection between Database and Linux.

1. Open the Linux terminal.


2. Execute the command xhost + as a root user.
3. Switch user to Oracle if logged in as root user.
4. Navigate to the path /opt/db/product/12.1.0/dbhome_1/bin. While installing the db
we have installed in the opt mount point. So, to run the file netca we need to navigate
to the following path.
5. Run the file netca by the following command ./netca.
6. After the installation wizard opens select the option Listener configuration.
7. Then select the option as ADD, because we are creating the new port.
8. Give the listener port name for example listener1
9. Select the protocols based on the requirement TCP or TCPS.
10. Use the standard port 1521 for the first time configuration and from the second
instance we have to change the port numbers.
11.The next option to create another listener based on our usage. Usually use No.
12.Then select the listener and click Finish.

How to Start a listener Port


1.Run the command lsnrctl start Listener
How to Stop a listener Port
1.Run the command lsnrctl stop Listener
How to know the status of a listener Port
1.Run the command lsnrctl status Listener

To see the background file running status command tail -f nohup.out