Tag Archives: CentOS

centos install oracle 12

cat /etc/centos-release
CentOS Linux release 7.0.1406 (Core)

ip a | grep inet
inet scope host lo
inet6 ::1/128 scope host
inet brd scope global dynamic eno16777736
inet6 fe80::20c:29ff:fe41:1494/64 scope link

Login as root and add required groups:

groupadd -g 501 oinstall
groupadd -g 502 dba
groupadd -g 503 oper

Add user Oracle:
useradd -u 502 -g oinstall -G dba,oper oracle

Change password for user:
passwd oracle

Add kernel parameters to /etc/sysctl.conf.
kernel.shmmni = 4096
kernel.shmmax = 4398046511104
kernel.shmall = 1073741824
kernel.sem = 250 32000 100 128
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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

Apply kernel parameters:
/sbin/sysctl -p

Add following lines to set shell limits for user oracle in file /etc/security/limits.conf

oracle soft nproc 131072
oracle hard nproc 131072
oracle soft nofile 131072
oracle hard nofile 131072
oracle soft core unlimited
oracle hard core unlimited
oracle soft memlock 50000000
oracle hard memlock 50000000
Edit /etc/hosts file:

cat /etc/hosts localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 ora-c7.unixmen.local

Verify your network settings:
[root@ora-c7 ~]# ping -c 1 O7-unixmen
PING ora-c7.unixmen.local ( 56(84) bytes of data.
64 bytes from ora-c7.unixmen.local ( icmp_seq=1 ttl=64 time=0.017 ms
— ora-c7.unixmen.local ping statistics —
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.017/0.017/0.017/0.000 ms
[root@ora-c7 ~]#

Modify .bash_profile for user oracle in his home directory add at the end file /home/oralce/.bash_profile.
# Oracle Settings
#Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=O7-unixmen
export ORACLE_UNQNAME=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=orcl

export PATH=/usr/sbin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

Check which packages are installed and which are missing.
as root copy this and execute this:
yum groupinstall “GNOME Desktop” -y
yum groupinstall “Development Tools” -y
yum install binutils -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
yum install zlib-devel -y

Create directory structure:
mkdir -p /u01/app/oracle/product/12.1.0
chown -R oracle:oinstall /u01/
chmod 775 /u01/app

Disable selinux by editing the “/etc/selinux/config” file,

Install database software
Let’s start with database software installation as oracle user.
su – oracle

Unzip the database install files:
unzip linuxamd64_12c_database_1of2.zip
unzip linuxamd64_12c_database_2of2.zip

cd database/

Starting Oracle Universal Installer…
Checking Temp space: must be greater than 500 MB. Actual 21246 MB Passed
Checking swap space: must be greater than 150 MB. Actual 2447 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-10-29_05-53-46AM. Please wait ..

XDMCP on Centos OS

yum install tigervnc-server xorg-x11-fonts-Type1 xinetd
vi /etc/gdm/custom.conf


vi /etc/xinetd.d/vncserver
service vncserver
disable = no
socket_type = stream
protocol = tcp
group = tty
wait = no
user = nobody
server = /usr/bin/Xvnc
server_args = -inetd -query localhost -geometry 1024×768 -depth 16 -once -fp /usr/share/X11/fonts/misc -securitytypes=none

vi /etc/services
vncserver 5900/tcp # VNC and GDM

systemctl restart xinetd.service

firewall-cmd –permanent –zone=public –add-port=5900/tcp
firewall-cmd –reload

Connect using some VNC client:

cPanel remove cloudlinux on Centos

yum remove liblve-devel
wget http://repo.cloudlinux.com/cloudlinux/sources/cln/centos2cl
sh centos2cl -c

rpm -e –nodeps kernel-2.6.32-379.5.1.lve1. kernel-headers-2.6.32-379.5.1.lve1. kernel-2.6.32-379.9.1.lve1. kernel-firmware-2.6.32-379.9.1.lve1. kernel-2.6.32-379.9.1.lve1.

yum install kernel kernel-headers
yum update

yum remove lve liblve lve-utils lve-stats
/scripts/easyapache –build

Also I found this script:
/usr/local/cpanel/bin/cloudlinux_system_install -c

centos dmesg timestamps

vi /root/.bashrc

dmesg_with_human_timestamps () {
$(type -P dmesg) "$@" | perl -w -e 'use strict;
my ($uptime) = do { local @ARGV="/proc/uptime";<>}; ($uptime) = ($uptime =~ /^(\d+)\./);
foreach my $line (<>) {
printf( ($line=~/^\[\s*(\d+)\.\d+\](.+)/) ? ( "[%s]%s\n", scalar localtime(time - $uptime + $1), $2 ) : $line )

alias dmesg=dmesg_with_human_timestamps

landscape-sysinfo for Centos OS

I have crated landscape-sysinfo for Centos. Its only beta version. Ans it looks like this:

Hostname: ange.vhost.lt IP address:
CPU load: 1.04 1.73 1.32
Uptime: 1 day, 12:06
Free memory: 811 MB Total memory: 32510 MB
Available updates: system up-to-date

Mail quere length: 48
Proccess number: 507

root pts/1 17:07 8.00s 0.07s 0.07s -bash

and there is landscape-sysinfo-centos script:

#Simple motd script for Centos 5/6
#created by Vitalijus Ryzakovas

b=`tput bold`
n=`tput sgr0`
echo "Checking for system updates:"
while ps aux | grep -e [y]um > /dev/null; do echo -n .;sleep 1; done &
up=`yum -e0 -d0 check-update | awk '{print $1}'`
echo -e "${b}Hostname:${n} `hostname` \t\t IP address: `/sbin/ifconfig venet0:0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}'`"
echo -e "${b}CPU load:${n} `cat /proc/loadavg | cut -d" " -f1-3`"
echo -e "${b}Uptime:${n} `uptime | cut -d" " -f 4-7 | cut -d"," -f1-2`"
echo -e "Free memorry: `cat /proc/meminfo | grep MemFree | awk {'print int($2/1000)'}` MB \t\t Total memory: `cat /proc/meminfo | grep MemTotal | awk {'print int($2/1000)'}` MB"
echo -e "${b}Available updates:${n} `if [[ ! -n "${up}" ]]; then echo "system up-to-date"; else echo $up; fi`\n"
echo -e "Mail quere length: `exim -bpc`"
echo -e "Proccess number: `cat /proc/loadavg | cut -d"/" -f2| cut -d" " -f1`\n"
echo -e "${b}Active sessions:${n} `w | tail -n +2`"

you can create /usr/local/bin/landscape-sysinfo-centos
then just : chmod +x echo /usr/local/bin/landscape-sysinfo-centos >> /root/.bashrc

you can add this before

if [[ $- != *i* ]] ; then
# This will fix scp usage.