sexta-feira, 14 de setembro de 2012

MONTAR COMPARTILHAMENTO WINDOWS COM LINUX

sudo apt-get install smbfs

mapear com usuário do domínio

editar /etc/sudoers

ALL ALL=(ALL) NOPASSWD:ALL




#!/bin/bash
mount -t smbfs -o username=foo,password=bar,workgroup=nomedominio,gid=foo,uid=foo //servidor/compartilhamento/ /pontodemontagem

terça-feira, 11 de setembro de 2012

INSTALAÇÃO ORACLE 11G


Manual Instalação oracle 11G Release 2
Sistema Operacional: Red Hat Enterprise 5
Autor: Artur Ferreira da Silva


Asianux Server 3, Oracle
Linux 5, and Red Hat
Enterprise Linux 5


yum install binutils.x86_64 compat-db.x86_64  compat-libstdc++-33.i386 compat-libstdc++-33.x86_64 elfutils-libelf.i386 elfutils-libelf.x86_64 gcc-c++.x86_64 gcc.x86_64 gdbm.x86_64 glibc-devel.i386 glibc-devel.x86_64 glibc-headers.x86_64 glibc.i686 glibc.x86_64 ksh.x86_64 libaio-devel.i386 libaio-devel.x86_64 libaio.i386 libaio.x86_64 libstdc++.i386 libstdc++.x86_64 libXp.i386 libXtst.i386 libXtst.x86_64 make.x86_64 setarch.x86_64 sysstat.x86_64 unixODBC.i386 unixODBC.x86_64 xorg-x11-utils.x86_64





#entrar como root e criar os grupos e usuários

useradd oracle
groupadd dba
groupadd oinstall
usermod -g oinstall -G dba oracle


2. configurar parametos do kernel

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 = 1048576

você precisa reiniciar ou sysctl -p

Edit the /etc/pam.d/login file and add following line:
session required pam_limits.so

Edit the /etc/security/limits.conf file and add following lines:

oracle    soft  nproc  2047
oracle    hard  nproc  16384
oracle    soft  nofile 1024
oracle    hard  nofile 65536
oracle    soft  stack  10240



# mkdir -p /u01/app/
# chown -R oracle:oinstall /u01/app/
# chmod -R 775 /u01/app/



3. Creating oracle directories
# mkdir /opt/oracle
# chown -R oracle:dba /opt/oracle

4. Setting Oracle Enviroment
Edit the /home/oracle/.bash_profile file and add following lines:

ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/112
ORACLE_SID=crmdsv
LD_LIBRARY_PATH=$ORACLE_HOME/lib
PATH=$PATH:$ORACLE_HOME/bin



export ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH PATH

Save the .bash_profile and execute following commands for load new enviroment:
cd /home/oracle
. .bash_profile

Check current status of SELinux:
/usr/sbin/getenforce

If output is "Enforcing" then change mode to "Permissive" using following command:
/usr/sbin/setenforce 0

To prevent Enforcing mode restore after next reboots or to disable SELinux modify the /etc/sysconfig/selinux change value of SELINUX variable to permissive or disabled:
SELINUX=permissive


Important steps/workarounds for Centos 5 only!
# cp /etc/redhat-release /etc/redhat-release.old
# echo "Red Hat Enterprise Linux Server release 5 (Tikanga)" > /etc/redhat-release
#Â cp /etc/issue /etc/issue.old
# echo "Red Hat Enterprise Linux Server release 5 (Tikanga)" > /etc/issue
# echo "Kernel \r on an \m" >> /etc/issue
# echo "" >> /etc/issue
# echo "redhat-release-5Server-5" > /tmp/.linux_release