null 2.0

Slackware Linux, Oracle, Programming

linux ftp server cnfiguration – vsftpd

http://www.linuxfocus.org/English/July2004/article341.shtml#341lfindex3

Advertisements

kernel version and system information

type:
uname -a

touchpad on slackware 13

to see what options are turned on or off
symclient -l

make some script to autostart with kde and put it into ~/.kde/Autostart

multiple database instances

1.) start dbca (it’s GUI app so it needs $DISPLAY to be set)
# dbca

2.) change /etc/oratab so it has “Y” at the end of all lines representing instances

3.) in startup script:
a) delete ORACLE_SID, it’s not needed any more and
b) add new variable ORAENV_ASK=”YES” – it’s not nessesary to export this variable,
– ORAENV_ASK variable means that oracle won’t look at ORACLE_SID but it’ll search in oratab for instance names

oracle database 11g memory_target

problems with memory_max_target or memory_target, ORA-27101, :
find spfileORCL.ora (ORCL = oracle SID)
– it should be in $ORACLE_HOME/dbs/ directory
edit the file and find line:
*.memory_target=635437056

recently, i reduced RAM size on my database hardware from 2GB to 1GB and had problems with memory_target as it was set on 800MB, so i reduced it to 600MB and it works after that
– note: i have 2GB of swap on that system, but looks like ot doesn’t help

– after this i had problems with pfile as there was no initORCL.ora file on my system (i have no idea how it worked before) so i coppied init.ora to initORCL.ora and made some modification with that too:
db_name=ORCL
shared_pool_size = 102341017 # this is what oracle asked for as minimum
– and control files were messed up in init.ora – i found real values in spfileORCL.ora and copy/pasted them

– i even disabled swap file and the database kept working
– i’ll see if there are changes in performance, but this is single user database

change database service name

in file (XXX = oracle SID)
$ORACLE_HOME/dbs/spfileXXX.ora
find lines
*.db.domain=”
*.db_name=’XXX’

besides that, in sqlplus as sysdba:
update global_name set global_name = 'YYY';

– there may be more

oracle database 11g on Slackware 12.2

mostly taken from
http://roqet.org/oracle_on_slackware.html

Note: Oracle database needs X environment for installation procedure

1.) Create Oracle user and install and management groups (as root):

groupadd dba
groupadd oinstall
adduser oracle #make the initial group oinstall, and additional groups dba,users

2.) unzip and run Oracle Installer (I skipped part with checking system prerequisites and modifying ~/.profile – we’ll see if it works)
– in installer – advanced installation
– enterprize database
– all groups set to dba
– I ran Installer without any parameters so installer failed when checking type of system – it didn’t recognize Slackware linux, but I clicked install anyway so installation continued
– all directories are set to be in /home/oracle/
– got error: “Error in invoking target ‘all_no_orcl’ of makefile ‘/home/oracle/app/oracle/product/11.1.0/db_1/rdbms/lib/ins_rdbms.mk'” and clicked Continue
– there were more errors, but in the end it seems that database runs ok, but now I miss that configuration script in .profiles file, e.g.PATH is not set, but judging by enterprize manager it looks like the database is running
– I even managed to connect to database with TOAD – everything looks fine
– but after restart, database was not started – I have to make a startup script and call it after boot

Errors:
– runInstaller: line 88: /home/oracle/database/install/.oui: Permission denied
#  chmod +x database/install/.oui
– database/install/unzip: Permission denied
# chmod +x database/install/unzip

3.) startup scripts
– /etc/oratab – change N to Y at the end of database path (the end of file) – dbstart starts only those instances with ‘Y’ entry
– set environment variables before calling dbstart:
– make startup script like this:
$ nano ~/start_oracle.sh
– and put these lines in it:
ORACLE_HOME=/home/oracle/app/oracle/product/11.1.0/db_1
ORACLE_SID=orcl
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib
export ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH
$ORACLE_HOME/bin/dbstart $ORACLE_HOME

– next make that script executable:
$ chmod +x ~/start_oracle.sh
– and change rc.local so it starts after boot (this must be done as root)
$ echo su - oracle -c /home/oracle/start_oracle.sh >> /etc/rc.d/rc.local

4.) optional – set PATH variable to ease running oracle tools:
$ echo ORACLE_HOME=/home/oracle/app/oracle/product/11.1.0/db_1 >> ~/.bashrc
$ echo PATH=$PATH:$ORACLE_HOME/bin >> ~/.bashrc
$ echo export ORACLE_HOME PATH >> ~/.bashrc

that’s it,
reboot and Oracle Database 11g should be up and running :))

99.) troubleshooting
a) TNS-12555 – listener cannot start – permission denied
– change file permissions for all Oracle binaries
– or for all oracle files:
$ chown oracle:dba $ORACLE_HOME

X over ssh

Server side /etc/ssh/sshd_config file:
AllowTcpForwarding yes
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

do not forget to run:
/etc/rc.d/rc.sshd restart

Client side /etc/ssh/ssh_config file:
ForwardAgent yes
ForwardX11 yes

Start ssh session:
ssh -Y yourname@remotemachine

After logging in check that the DISPLAY variable is not empty:
$ echo $DISPLAY
localhost:10.0

change ip address, hostname and/or interface

hostname:
/etc/HOSTNAME

ip address:
/etc/rc.d/rc.inet1.conf:
# Config information for eth0:
IPADDR[0]=”192.168.1.1″
NETMASK[0]=”255.255.255.0″
USE_DHCP[0]=””
DHCP_HOSTNAME[0]=””

hostname and ip address:
/etc/hosts

for switching eht0/eth1 check last variable NAME=”eth1″ in:
/etc/udev/rules.d/70-persistent-net.rules
note: if that file is deleted it will be recreated during the boot process.

oracle on text-based linux

taken from ow to install Oracle on a text-mode Linux box

How to install Oracle on a text-mode Linux box

The environment:
1) Computer 1: my Fedora 7 linux. Installed in text-mode only. No X-server, no-gnome and no-kde.
Computer 1 IP: 192.168.1.9
2) Computer 2: some computer with X-server capability. In my case I used CYGWIN on a WinXP machine.
Computer 2 IP: 192.168.1.79

HowTO:
a) Setup Fedora 7 as usual:

==========================================================================================
under /home/oracle… unpack oracle 10.2.0.1
unzip 10201_database_linux32.zip
and it will create a folder called “database”
and to install oracle we run: (after all the below setup be finished)
cd database
./runInstaller &

————————————————————–

/etc/sysctl.conf file:

kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144

————————————————————–

/sbin/sysctl -p

————————————————————–

/etc/security/limits.conf

*               soft    nproc   2047
*               hard    nproc   16384
*               soft    nofile  1024
*               hard    nofile  65536

————————————————————–

/etc/pam.d/login

session    required     /lib/security/pam_limits.so

————————————————————–

/etc/selinux/config

SELINUX=disabled

————————————————————–

# From Fedora 7 DVD
cd /media/dvd/Fedora
rpm -Uvh setarch-*
rpm -Uvh –force tcl-*
rpm -Uvh compat-db-*
rpm -Uvh –force libXau-devel-*
rpm -ivh gcc (install all the dependences… starting from kernel-header)

yum install libXp libaio

————————————————————–

groupadd oinstall
groupadd dba
groupadd oper

useradd -g oinstall -G dba oracle
passwd oracle

mkdir -p /u01/app/oracle/product/10.2.0/db_1
chown -R oracle.oinstall /u01

————————————————————–

/etc/redhat-release

redhat-4

————————————————————–

.bash_profile (oracle user)

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=TSH1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
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/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

==========================================================================================

b) On CYGWIN (X-Server box)
In my case… in WinXP… I ran:

Start -> Run -> “C:\cygwin\usr\X11R6\bin\startxwin.bat”

It will open a terminal screen:
==> you must authorize linux box (192.168.1.9) to connect onto this X-server:
==> run: xhost +192.168.1.9

mson77@192.168.1.79 ~
$ ssh oracle@192.168.1.9
The authenticity of host ‘192.168.1.9 (192.168.1.9)’ can’t be established.
RSA key fingerprint is 7a:43:73:7d:3c:a2:05:9a:4a:7f:6f:c1:23:08:f1:55.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘192.168.1.9’ (RSA) to the list of known hosts.
oracle@192.168.1.9’s password:
[oracle@f7vmware ~]$ ll
total 4
drwxr-xr-x 6 root root 4096 2005-07-02 14:09 database
[oracle@f7vmware ~]$ DISPLAY=192.168.1.79:0.0; export DISPLAY
[oracle@f7vmware ~]$ cd database/
[oracle@f7vmware database]$ ./runInstaller &
[1] 1594
[oracle@f7vmware database]$ Starting Oracle Universal Installer…

(by the way… f7vmware is 192.168.1.9… is a F7 host under VMware, in my case)

==========================================================================================

If this helps you… and you want to see my wish list.. maybe you can visit:
http://www.livrariacultura.com.br/scripts/home/wishlist/basketwish.asp?cp=DJDGID

Thank you,

mson77