1 # Oracle Database Server Build
3 Note: for Windows, you can also use the instant server, but this is the "right" way to do it.
5 * Download The Latest Version of Oracle Linux (can be 64 bit)
6 * Install it as you would any other distro
7 * For your non-root user, use the name oracle
8 * For ease of use, choose the install option with a desktop environment
10 * Can also install Oracle Server on Windows host if you know what you're doing
16 yum install oracle-rdbms-server-12cR1-preinstall
17 systemctl stop firewalld
18 systemctl disable firewalld
22 * Edit /etc/hostname and change it to something other than localhost
23 * Add an alias pointing 127.0.0.1 to the new hostname
25 ## Download the latest Oracle Database zip files (should be 2)
27 * Unzip both, and run the installer as your normal oracle user
28 * Go through the process, setting the options where required, including the db name
29 * Make sure to name the database appropriately
30 * Make sure to specify the proper hostname of the machine you are running
34 As root, change the "N" at the end of the last string to "Y"
36 ## Add some environment variables
38 Add to the bottom of /home/oracle/.bashrc:
40 export ORACLE_HOME=/home/oracle/app/oracle/product/12.1.0/dbhome_1
41 export PATH=$PATH:/home/oracle/app/oracle/product/12.1.0/dbhome_1/bin/
42 export ORACLE_SID=swg; #set this to the name you chose for your database/service
46 ## Create /etc/init.d/dbora
48 Copy and pase the example below, but make sure to set the hostname and Oracle variables!
52 # Change the value of ORACLE_HOME to specify the correct Oracle home
53 # directory for your installation.
55 ORACLE_HOME=/home/oracle/app/oracle/product/12.1.0/dbhome_1
57 # Change the value of ORACLE to the login name of the
58 # oracle owner at your site.
62 PATH=${PATH}:$ORACLE_HOME/bin
65 export ORACLE_HOME PATH
67 if [ ! "$2" = "ORA_DB" ] ; then
68 runuser $ORACLE $0 $1 ORA_DB
69 if [ "$PLATFORM" = "Linux" ] ; then
70 touch /var/lock/subsys/dbora
77 $ORACLE_HOME/bin/dbstart $ORACLE_HOME &
80 $ORACLE_HOME/bin/dbshut $ORACLE_HOME &
83 echo "usage: $0 {start|stop}"
90 Then, make it executable:
92 chmod +x /etc/init.d/dbora
94 ## Oracle Listener configuration
96 In /home/oracle/app/oracle/product/(some version number)/dbhome_1/network/admin edit
97 both tnsnames.ora and listener.ora and change all mentions of "localhost"
98 to the hostname you chose after installation.
100 ## Reboot and Start the Database
101 After rebooting, become root and execute:
103 /etc/init.d/dboracle start
105 ## Test the database locally on the DB server and connect for management
109 Login as SYSTEM using the password you set during installation.
111 ### Create user and grant privs
113 ALTER SESSION SET "_ORACLE_SCRIPT"=true;
114 CREATE USER remoteuser IDENTIFIED BY yourpasswordhere;
115 GRANT ALL PRIVILEGES TO remoteuser;
116 GRANT UNLIMITED TABLESPACE TO remoteuser;
118 ## Test connection from game server
120 sqlplus remoteuser/yourpasswordhere@oracle:1521/swg
122 ### Deleting/clearing tables for a fresh DB population
124 drop user username cascade;
126 Then recreate the user per the previous instructions.