groupadd -g 1000 dba
useradd -m -s /bin/ksh -g dba -u 1000 oracle
passwd oracle
su - oracle
vi .profile
PATH=$PATH:$HOME/bin
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=/u01/app/oracle; export ORACLE_HOME
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export ORACLE_SID=XE
export LD_LIBRARY_PATH=$ORACLE_HOME/lib;
su - root
vi /etc/sysctl.conf
fs.file-max=327679
kernel.msgmni = 2878
kernel.msgmax = 8192
kernel.msgmnb = 65536
kernel.sem = 250 32000 100 142
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4294967295
net.core.rmem_default = 262144
net.core.rmem_max=2097152
net.core.wmem_default = 262144
net.core.wmem_max=262144
fs.aio-max-nr = 3145728
net.ipv4.ip_local_port_range=1024 65000
sysctl -p
vi /etc/security/limits.conf
oracle soft nofile 131072
oracle hard nofile 131072
oracle soft nproc 131072
oracle hard nproc 131072
oracle soft core unlimited
oracle hard core unlimited
oracle soft memlock 3500000
oracle hard memlock 3500000
/etc/selinux/config
SELINUX=disabled
mkdir -p /u01/app/oracle
chown -R oracle.dba /u01/app/oracle
chmod -R 755 /u01/app/oracle
chmod -R 777 /src
rpm -ivh libXp-1.0.0-8.1.el5.i386.rpm
vi /etc/redhat-release
redhat-4
restart server
# install vnc
yum install xorg-x11-xinit, xorg-x11-twm, xterm
su - oracle
vncserver :1
CD /src/database/
yum -y install glibc.i686
yum install libXtst.i686
yum install libXt.i686
yum install libXp.i686
./runinstaller -ignoreSysPrereqs
Problem spfile
create pfile from spfile;
otomatis up
vi /etc/init.d/dbora
#! /bin/sh -x
#
# chkconfig: 2345 80 05
# description: start and stop Oracle Database Enterprise Edition on Oracle Linux 5 and 6
#
# In /etc/oratab, change the autostart field from N to Y for any
# databases that you want autostarted.
#
# Create this file as /etc/init.d/dbora and execute:
# chmod 750 /etc/init.d/dbora
# chkconfig --add dbora
# chkconfig dbora on
# Note: Change the value of ORACLE_HOME to specify the correct Oracle home
# directory for your installation.
ORACLE_HOME=/u01/app/oracle/
#ORACLE_HOME=/home/oracle/app/oracle/product/12.1.0/dbhome_1
#
# Note: Change the value of ORACLE to the login name of the oracle owner
ORACLE=oracle
PATH=${PATH}:$ORACLE_HOME/bin
HOST=`hostname`
PLATFORM=`uname`
export ORACLE_HOME PATH
case $1 in
'start')
echo -n $"Starting Oracle: "
su $ORACLE -c "$ORACLE_HOME/bin/lsnrctl start" &
su $ORACLE -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" &
;;
'stop')
echo -n $"Shutting down Oracle: "
su $ORACLE -c "$ORACLE_HOME/bin/lsnrctl stop" &
su $ORACLE -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" &
;;
'restart')
echo -n $"Shutting down Oracle: "
su $ORACLE -c "$ORACLE_HOME/bin/lsnrctl stop" &
su $ORACLE -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" &
;;
I:q
'restart')
echo -n $"Shutting down Oracle: "
su $ORACLE -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" &
sleep 5
echo -n $"Starting Oracle: "
su $ORACLE -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" &
;;
*)
echo "usage: $0 {start|stop|restart}"
exit
;;
esac
exit
Set permissions on the script
# chmod 750 /etc/init.d/dbora
Tell Linux to autostart/stop the service
# chkconfig --add dbora
# chkconfig dbora on
Edit /etc/oratab
In /etc/oratab, change the autostart field from N to Y for any databases that you want autostarted.
Starting / Stopping the DB
The DB will start and stop at machine boot and shutdown.
Or it can be manually controlled with:
# service dbora start
and
# service dbora stop
Starting Oracle Database 12c Multitenant PDBs
To also start all pluggable databases when the container database starts, you can do: connect / as sysdba
create or replace trigger sys.after_startup
after startup on database
begin
execute immediate 'alter pluggable database all open';
end after_startup;
/
sudo /sbin/ldconfig -v
#
# chkconfig: 2345 80 05
# description: start and stop Oracle Database Enterprise Edition on Oracle Linux 5 and 6
#
# In /etc/oratab, change the autostart field from N to Y for any
# databases that you want autostarted.
#
# Create this file as /etc/init.d/dbora and execute:
# chmod 750 /etc/init.d/dbora
# chkconfig --add dbora
# chkconfig dbora on
# Note: Change the value of ORACLE_HOME to specify the correct Oracle home
# directory for your installation.
ORACLE_HOME=/u01/app/oracle/
#ORACLE_HOME=/home/oracle/app/oracle/product/12.1.0/dbhome_1
#
# Note: Change the value of ORACLE to the login name of the oracle owner
ORACLE=oracle
PATH=${PATH}:$ORACLE_HOME/bin
HOST=`hostname`
PLATFORM=`uname`
export ORACLE_HOME PATH
case $1 in
'start')
echo -n $"Starting Oracle: "
su $ORACLE -c "$ORACLE_HOME/bin/lsnrctl start" &
su $ORACLE -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" &
;;
'stop')
echo -n $"Shutting down Oracle: "
su $ORACLE -c "$ORACLE_HOME/bin/lsnrctl stop" &
su $ORACLE -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" &
;;
'restart')
echo -n $"Shutting down Oracle: "
su $ORACLE -c "$ORACLE_HOME/bin/lsnrctl stop" &
su $ORACLE -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" &
;;
I:q
'restart')
echo -n $"Shutting down Oracle: "
su $ORACLE -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" &
sleep 5
echo -n $"Starting Oracle: "
su $ORACLE -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" &
;;
*)
echo "usage: $0 {start|stop|restart}"
exit
;;
esac
exit
Set permissions on the script
# chmod 750 /etc/init.d/dbora
Tell Linux to autostart/stop the service
# chkconfig --add dbora
# chkconfig dbora on
Edit /etc/oratab
In /etc/oratab, change the autostart field from N to Y for any databases that you want autostarted.
Starting / Stopping the DB
The DB will start and stop at machine boot and shutdown.
Or it can be manually controlled with:
# service dbora start
and
# service dbora stop
Starting Oracle Database 12c Multitenant PDBs
To also start all pluggable databases when the container database starts, you can do: connect / as sysdba
create or replace trigger sys.after_startup
after startup on database
begin
execute immediate 'alter pluggable database all open';
end after_startup;
/
sudo /sbin/ldconfig -v
-----------------------------------------------------------------------------------
Siang tadi saya mencoba mengakses server yang diisi dengan Solaris 10 dari PC saya (Ubuntu 7.04). Ini contoh tampilan terminal saya tadi setelah sukses belajar SSH X Forwarding.
tedy@tedy-desktop:~$ xhost + access control disabled, clients can connect from any host tedy@tedy-desktop:~$ ssh -X root@172.16.209.121 Password: Last login: Tue Jul 31 16:01:32 2007 from 172.16.209.33 Sun Microsystems Inc. SunOS 5.10 Generic January 2005 You have new mail. # set DISPLAY 172.16.209.33=:0.0 # export DISPLAY # /usr/sfw/bin/mozilla |
Perintah di atas sukses menampilkan program yang berjalan di server, lihat tampilannya ini :
Beberapa langkahnya secara umum adalah :
- Di PC yang kita pakai (local computer), jalankan perintah berikut :
# xhost +
Perintah ini membuat X server yang ada di PC bisa menerima paket dari host manapun. - Jalankan SSH Forwarding dengan perintah :
# ssh -X user@server
User dan server adalah nama login anda pada server yang dituju. - Setelah masuk ke dalam server lewat SSH, jalankan perintah :
# set DISPLAY local-computer=:0.0
# export DISPLAY
Perintah di atas akan membuat semua tampilan grafis dari perintah yang dijalankan akan ditampilkan pada local computer. - Silakan coba aplikasi berbasis grafis. Pada kasus saya di atas, saya coba buka Mozilla web browser.
Kurang lebih seperti itu, cara bodoh-bodohan saja ya….n
--------------------------------------------------------------------------------------------------------------------------
Jika ssh Error
Within Xwin.exe I run the following and get the error:-
$ ssh -XY root@192.168.246.130
root@192.168.247.131's password:
X11 forwarding request failed on channel 0
Last login: Tue Jun 2 20:40:44 2015 from 192.168.246.10
Tidak ada komentar:
Posting Komentar