Странице

Ознаке

уторак, 23. април 2013.

Linux Runlevels

Linux Standard Base specification

IDNameDescription
0HaltShuts down the system.
1Single-user ModeMode for administrative tasks.
2Multi-user ModeDoes not configure network interfaces and does not export networks services.
3Multi-user Mode with NetworkingStarts the system normally.
4Not used/User-definableFor special purposes.
5Start the system normally with appropriate display manager. ( with GUI )As runlevel 3 + display manager.
6RebootReboots the system.


Debian GNU/Linux
IDDescription
SOnly run on boot (replaces /etc/rc.boot)
0Halt
1Single-user mode
2-5Full Multi-user with console logins and display manager if installed
6Reboot
Red Hat Linux and Fedora
CodeInformation
0Halt
1Single-user mode
2Multi-user mode console logins only (without networking)
3Multi-user mode, console logins only
4Not used/User-definable
5Multi-user mode, with display manager as well as console logins (X11)
6Reboot
SUSE Linux
IDDescription
0Halt
1 or SSingle-user mode
2Multi-user mode without networking
3Multi-user mode, console logins only
4Not used/User-definable
5Multi-user mode with display manager
6Reboot
Slackware Linux
IDDescription
0Halt
1Single-user mode
2Unused but configured the same as runlevel 3
3Multi-user mode without display manager
4Multi-user mode with display manager
5Unused but configured the same as runlevel 3
6Reboot
Arch Linux
IDDescription
0Halt
1Single-user (Maintenance Mode)
2Not used
3Multi-user
4Not used
5Multi-user with X11
6Reboot
Gentoo Linux
IDDescription
0Halt
1 or SSingle-user mode
2Multi-user mode without networking
3Multi-user mode
4Aliased for runlevel 3
5Aliased for runlevel 3
6Reboot
Unix:
System V Releases 3 and 4
IDDescription
0Shut down system, power-off if hardware supports it (only available from the console)
1Single-user mode, all filesystems unmounted but root, all processes except console processes killed
2Multi-user mode
3Multi-user mode with RFS (and NFS in Release 4) filesystems exported
4Multi-user, User-definable
5Halt the operating system, go to firmware
6Reboot
s, SIdentical to 1, except current terminal acts as the system console
Solaris
IDDescription
0Operating system halted; (SPARC only) drop to OpenBoot prompt
SSingle-user mode with only root filesystem mounted (as read-only) -- Solaris 10+: svc:/milestone/single-user
1Single-user mode with all local filesystems mounted (read-write)
2Multi-user mode with most daemons started – Solaris 10+: svc:/milestone/multi-user
3Multi-user mode; identical to 2 (runlevel 3 runs both /sbin/rc2 and /sbin/rc3), with filesystems exported, plus some other network services started. -- Solaris 10+: svc:/milestone/multi-user-server
4Alternative Multi-user mode, User-definable
5Shut down, power-off if hardware supports it
6Reboot
HP-UX
IDDescription
0System halted
SSingle-user mode, booted to system console only, with only root filesystem mounted (as read-only)
sSingle-user mode, identical to S except the current terminal acts as the system console
1Single-user mode with local filesystems mounted (read-write)
2Multi-user mode with most daemons started and Common Desktop Environment launched
3Identical to runlevel 2 with NFS exported
4Multi-user mode with VUE started instead of CDE
56Not used/User-definable
AIX
IDNameDescription
0reserved
1reserved
2Normal Multi-user modedefault mode


Oracle 11g DB preparation of installation on Oracle linux

I assume that Oracle linux with SELINUX=permissive(/etc/selinux/config) is already installed and that Oracle DB software package is already downloaded.

1. Edit hosts file
<IP-address>  <fully-qualified-machine-name>  <machine-name>
192.168.138.125 ocpserver.com ocpserver
2.Add public YUM repo(For Oracle Linux 6)
cd /etc/yum.repos.d
wget http://public-yum.oracle.com/public-yum-ol6.repo
3.Setup Oracle preriquisites automatically
yum install oracle-rdbms-server-11gR2-preinstall
This package is installing packages, create users and change parameters

4. Or manually...
Oracle recommend the following minimum parameter settings.
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
The current values can be tested using the following command.
/sbin/sysctl -a | grep <param-name>

Add or amend the following lines in the "/etc/sysctl.conf" file.
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
Run the following command to change the current kernel parameters.
/sbin/sysctl -p
Add the following lines to the "/etc/security/limits.conf" file.
oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  4096
oracle              hard    nofile  65536
oracle              soft    stack   10240
5. Check if the following packages are present, if not install them
rpm -Uvh binutils-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh compat-libstdc++-33*.i386.rpm
rpm -Uvh elfutils-libelf*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh ksh*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libgomp-4.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh make-3.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*
rpm -Uvh numactl-devel-*
6. Create groups and users
groupadd oinstall
groupadd dba
groupadd oper
groupadd asmadmin
useradd -g oinstall -G dba,oper,asmadmin oracle
passwd oracle
7. Create software directories
mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
8. As oracle user add to .bash_profile.scr. Of course adapt to your configuration.
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=ocpserver.com; export ORACLE_HOSTNAME
ORACLE_UNQNAME=ocp; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=ocp; export ORACLE_SID
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
 9. As root user run
xhost +
10. Login as oracle user and start installation
./runInstaller
11. Install Oracle DB!

12. Edit /etc/oratab file
OCP:/u01/app/oracle/product/11.2.0/db_1:Y

понедељак, 22. април 2013.

Enable Database EM Console in Oracle EBS R12

Everythin explained in How to Enable Enterprise Manager on the Oracle E-Business Suite Release 12 [ID 458533.1]

in short....

1. Source db env variable
2.Create a password file(check the [Note 358201.1])
orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=passw0rd entries=5
3.Create the Enterprise Manager repository
emca -config dbcontrol db -repos create
note: If for some reason you want to drop repository(check the [Note 278100.1])
emca -deconfig dbcontrol db -repos drop
regards,
S

петак, 5. април 2013.

Change host name in xenserver

Command to change host name in xenserver
xe host-set-hostname-live host-uuid=INSERTUUIDHERE host-name=INSERTHOSTNAMEHERE