Category Archives: Oracle Enterprise Linux

Fixing Authentication is requried to set the network proxy used for download packages

Fixing Authentication is requried to set the network proxy used for download packages

Non-root users

Step 1: Launch a Terminal Console and type

# gnome-session-properties

Step 2: Uncheck PackageKit Update Applet .

Root User

Step 1: Disabled /etc/yum/pluginconf.d

# vim /etc/yum/pluginconf.d/refresh-packagekit.conf

[main]
enabled=0

Subversion Repository Quickguide

Op de Subversion server

su root

Creeer template

mkdir svn.repos
cd svn.repos
mkdir trunk
mkdir tags
mkdir branches
echo "SVN Repository" > readme.txt
echo "Trunk" > trunk/readme.txt
echo "Tags" > tags/readme.txt
echo "Branches" > branches/readme.txt

Creeer repository

svnadmin create /var/www/svn/samplerepos
svn import svn.repos/ file:///var/www/svn/samplerepos
chown -R apache:apache /var/www/svn/samplerepos

## If you have SELinux enabled (you can check it with "sestatus" command) ##
## then change SELinux security context with chcon command ##

chcon -R -t httpd_sys_content_t /var/www/svn/samplerepos

## Following enables commits over http ##
chcon -R -t httpd_sys_rw_content_t /var/www/svn/samplerepos

Initiele checkout om een working copy van de repository te maken.

svn checkout http://shunyo.xs4all.nl/svn/samplerepos/trunk projectname

Inchecken werk.

cd projectname
svn add filename
svn commit -m "Commit Message" 

CTW on Oracle Linux

mv expdat.expdp.BRV11T2.sonder.N4TOST2.B3.0_C1.13 /home/oracle/app/oracle/admin/satu/dpdump/expdat.dmp
impdp

Zegt zelf wel waar hij problemen mee heeft. Mekkert over users, table spaces en niet genoeg ruimte in de table space.

sqlplus /nolog

connect / as SYSDBA

create user N4TOST2 identified by S3marang;

create tablespace N4TOST2 DATAFILE '/home/oracle/app/oracle/oradata/satu/n4tost2.dbf' size 1G extent management local autoallocate;

alter database datafile '/home/oracle/app/oracle/oradata/satu/n4tost2.dbf' resize 10G;

select dbms_metadata.get_ddl('TABLESPACE','N4TOST2' ) from dual;

=== TNSNAMES ===
[oracle@burung ~]$ tnsping satu

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 24-JUL-2013 14:53:14

Copyright (c) 1997, 2009, Oracle. All rights reserved.

Used parameter files:

TNS-03505: Failed to resolve name

[oracle@burung ~]$ vi ./app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora

[oracle@burung ~]$ tnsping satu

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 24-JUL-2013 15:05:32

Copyright (c) 1997, 2009, Oracle. All rights reserved.

Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = burung.mcint.local) (PORT=1521))) (CONNECT_DATA = (SERVICE_NAME = satu)))
OK (20 msec)

Install Oracle Enterprise Linux van USB

Op Windows maak een bootable USB stick
* 8gb USB drive
* Download OEL distributie .iso van Oracle
* Download bootable USB: http://unetbootin.sourceforge.net/
* Format usb drive, label met USB
* Open Unetbootin.exe,
* kies .iso, kies USB, start creatie
* Wacht totdat unetbootin klaar is,
* open usb drive, kopieer .iso naar usb
* Installeer USB is nu klaar.

OEL desktop installatie

* stop Usb in computer, start computer
* kies HDD, /dev/sdb, directory containg .iso : /

ISSUE op MAC OS X

Er is een Guide op ORN die zegt dat je een bootable disk vanuit een OEL machine moet maken. Als je deze volgt in een VMware Fusion OEL op Mac OS X dan werkt de bootable disk niet. De procedure met unetbootin op een Mac OS X werkt ook niet. In het eerste geval blijft zegt de PC dat de USB disk niet bootable is. In het tweede geval start de PC helemaal niet vanaf USB.

Configuring VNC Server on Linux

Configuring VNC Server on Linux

Firewall

Open port OEL 7 :

# firewall-cmd --zone=public --add-port=portnumber/tcp --permanent
#firewall-cmd --reload 

 

systemd

Install the VNC Server.

# yum install tigervnc-server

Create a new configuration file for each of the display numbers you want to enable. In the following case, I am setting up the display number “:3”. Notice how the display number is included in the configuration file name.

# cp /lib/systemd/system/vncserver@.service /lib/systemd/system/vncserver@:3.service

Edit the new configuration file, amending the user and startup arguments as necessary. An example of the changed lines is shown below. All other lines should be unmodified.

User=oracle
ExecStart=/usr/bin/vncserver %i -geometry 1280x1024
 The vncserver service unit file
#
# Quick HowTo:
# 1. Copy this file to /etc/systemd/system/vncserver@:.service
# 2. Edit root and vncserver parameters appropriately
#   ("runuser -l root -c /usr/bin/vncserver %i -arg1 -arg2")
# 3. Run `systemctl daemon-reload`
# 4. Run `systemctl enable vncserver@:.service`
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted!  For a secure way of using VNC, you should
# limit connections to the local host and then tunnel from
# the machine you want to view VNC on (host A) to the machine
# whose VNC output you want to view (host B)
#
# [user@hostA ~]$ ssh -v -C -L 590N:localhost:590M hostB
#
# this will open a connection on port 590N of your hostA to hostB's port 590M
# (in fact, it ssh-connects to hostB and then connects to localhost (on hostB).
# See the ssh man page for details on port forwarding)
#
# You can then point a VNC client on hostA at vncdisplay N of localhost and with
# the help of ssh, you end up seeing what hostB makes available on port 590M
#
# Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.
#
# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel.  See the "-via" option in the
# `man vncviewer' manual page.


[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service]
Type=simple
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l username  -c "/usr/bin/vncserver %i -geometry 1280x1024"
PIDFile=/home/root/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'

[Install]
WantedBy=multi-user.target

Run the following command.

# systemctl daemon-reload

Set the VNC password for the user defined in the new configuration file.

# su - oracle
$ vncpasswd
Password:
Verify:
$ exit
logout
#

Enable the service for autostart and start the service.

# systemctl enable vncserver@:3.service
# systemctl start vncserver@:3.service

You should now be able to use a VNC viewer to connect to system using the display number and password defined.

Use the following commands to stop the service and disable autostart.

# systemctl stop vncserver@:3.service
# systemctl disable vncserver@:3.service

VNC Clients

Once your VNC server is configured, you can connect to it from any VNC server. On Linux this will often be TigerVNC, installed using the following command.

# yum install tigervnc

Connect to a VNC server using the following command.

# vncviewer machine-name:port

# vncviewer maggie.localdomain:3
# vncviewer 192.168.0.4:3
Fedora 18  gets an “Oh no. Something has gone wrong” message in the VNC Client when trying to connect.

This is bug 896648 in the Red Hat bugzilla. According to comment 15 you can fix it by:

  • Add -session optional pam_systemd.so to /etc/pam.d/runuser-l; the whole file should look like:
    auth            include         runuser
    session         optional        pam_keyinit.so force revoke
    -session        optional        pam_systemd.so
    session         include         runuser
    
  • Edit vncserver@:<display>.service
    • Change Type to simple
    • Add an -fg parameter to the vncserver command in ExecStart
    • Comment out the ExecStop line

Oracle 11g on Oracle Enterprise Linux

How I Simplified Oracle Database 12c and 11g Installations on Oracle Linux 6

by Ginny Henningsen; updated by Michele Casey

How to simplify the installation of Oracle Database 12c or 11g on Oracle Linux 6 by installing the oracle-rdbms-server-12cR1-preinstall or oracle-rdbms-server-11gR2-preinstall RPM package, which automatically performs a number of tasks, such as installing required software packages, resolving package dependencies, and modifying kernel parameters.

http://www.oracle.com/technetwork/articles/servers-storage-admin/ginnydbinstallonlinux-488779.html

 

As root perform pre-installation script that also creates user:group oracle:oinstall

# cd /etc/yum.repos.d
# wget http://public-yum.oracle.com/public-yum-ol6.repo
# vi public-yum-ol6.repo
# yum install oracle-rdbms-server-11gR2-preinstall
# cd /home
# mkdir OraDB11g
# chown oracle:oinstall OraDB11g
# cd OraDB11g
# unzip linux.x64_11gR2_database_1of2.zip
# unzip linux.x64_11gR2_database_2of2.zip
# yum -y install unixODBC-devel

As root activate user oracle by setting password

 
# passwd oracle

As root modify hosts file otherwise listener won’t work.

# vi /etc/hosts
host-ip  oraclehost.domain  oraclehost

Log in as the user oracle. Change directory to the database directory and enter the following command to run the Oracle Universal Installer:

# cd /home/OraDB11g/database
# ./runInstaller

no email
no security updates [Yes]
(*) database software only
(*) Single instance database installation
Language := English
(*) Enterprise Edition
Oracle base [/home/oracle/app/oracle]
Oracle home [/home/oracle/app/oracle/product/11.2.0/dbhome_1]
Oracle inventory [/home/oracle/app.oraInventory]
Oracle invetory groupname [oinstall]
OSDBA DBA Group [dba]
OSOPER Operator Group [oninstall]

Installer asks to run two installation scripts as root

[root@burung oracle]# /home/oracle/app/oraInventory/orainstRoot.sh
[root@burung oracle]# /home/oracle/app/oracle/product/11.2.0/dbhome_1/root.sh

Create user specific environment and startup programs

vi .bash_profile

PATH=$PATH:$HOME/bin:$HOME/app/oracle/product/11.2.0/dbhome_1/bin/
export PATH
export ORACLE_BASE=$HOME/app/oracle
export ORACLE_HOME=$HOME/app/oracle/product/11.2.0/dbhome_1

Start Oracle Listener

[oracle@burung ~]# lsnrctl start
[oracle@burung ~]# lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 22-JUL-2013 14:36:53

Copyright (c) 1991, 2009, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 22-JUL-2013 14:36:33
Uptime 0 days 0 hr. 0 min. 20 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /home/oracle/app/oracle/diag/tnslsnr/burung/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=burung.mcint.local)(PORT=1521)))
The listener supports no services
The command completed successfully

As user oracle create a database. You need to login oracle owned GUI/VNC session!!
(start GUI duurt lang voordat de GUI tevoorschijn komt)
(Follow Oracle for dummies)

# dbca

Now you can start sqlplus

# export ORACLE_SID=sid
# sqlplus / as sysdba

startup
..
..
shutdown

# lsnrctl stop LISTENER

Enterprise manager is at: https://localhost:1158/em, but nobody cares anyway.

# emctl start
...
..
# emctl stop