Install VNCServer on RHEL 7 Minimal

After long time search on google and support from RHEL, finally we can install and configure vncserver on Redhat Enterprise Linux/Oracle Enterprise Linux 7 with gnome-terminal. We using same way xterm in RHEL 6.

Pre-requirement:

Configure VNC server with xterm follow steps:

1. Install bellow packages:
# yum install gnome-terminal gnu*font* tigervnc-server
2. Replace configure xstartup with content:
# vi $HOME/.vnc/xstartup
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
gnome-terminal &
exec gnome-session &
3. Add execute mode for xstartup file and restart vncserver services.
# chmod +x $HOME/.vnc/xstartup
# service vncserver restart

 

4. Add vncserver session (optional)

cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service

vi /etc/systemd/system/vncserver@\:1.service
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service]
Type=forking
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l my_user -c "/usr/bin/vncserver %i -geometry 1280x1024"
PIDFile=/home/my_user/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'

[Install]
WantedBy=multi-user.target

Cannot access EM Express on DB 12c

After install and configure database 12c successfully, you cannot access EM Express 12c. You can check steps below to resolve this issue:
1. Check listener to ensure current listener has EM Express port (Ex: 5500)
lsnrctl status |grep HTTP
It should be return:
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=yourhost.yourdomain)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/product/12.1/db_1/admin/PROD/xdb_wallet))(Presentation=HTTP)(Session=RAW))

2. Check port 5500 by telnet client
telnet 5500

3. Check permission in xdb_wallet folder:
cd /u01/app/oracle/product/12.1/db_1/admin/PROD/xdb_wallet
ls -l
-rw——- 1 oracle oinstall 3862 Sep 6 19:47 cwallet.sso
-rw——- 1 oracle oinstall 3817 Sep 6 19:47 ewallet.p12
It is not correct permission. You need to change mode for these files.
chmod 640 *
Check again:
ls -l
-rw-r—– 1 oracle oinstall 3862 Sep 6 19:47 cwallet.sso
-rw-r—– 1 oracle oinstall 3817 Sep 6 19:47 ewallet.p12

Try to connect EM Express 12c from web browser has Flash installed. It should be connect successful.

Reference: Troubleshooting Why EM Express is not Working (Doc ID 1604062.1)

Topic: 10- Wallet file permissions when RDBMS sits on top of GI with role separation:

Configure SSH using key files

Configuration Guide
Configure SSH Key Authentication Linux Server

Subject(s): This document guideline for System Administrator to configure SSH Key Authentication when new installation Linux Server to secure OS system.

Grade/Level: Basic Administration

Tools: Putty, Puttygen

Time Allotment: 10 mins

Learning Context

SSH Key Authentication in Linux system replace password authentication make system more secure. Who has private key can access to server only. No need remember password. It is same method with public cloud providers (AWS, GCE, …) are using to secure your Linux servers.

Procedure

  • Install Linux OS
  • Connect SSH to Linux OS (default port 22 is opened without stop firewall, iptables).

Using Putty/SSH client to connect to server with root account and password.

  • Configure SSH Key from Client.

From client (Desktop, Laptop), Open puttygen to generate private-public SSH key.

  1. Click to Generate button
  2. Move mouse on blank region to generate public key.
  3. Click to Save private key, save file as *.ppk
  4. Select all public key, right click ->  copy

Copy public SSH Key to Server

  • In SSH session from root account, create new user: #useradd -m <username>
  • Switch to user created, create directory .ssh: mkdir -p /home/<username>.ssh
  • Create file: authorized_keys. Paste content public key to this file.
  • Save file
  • Change permission to file authorized_keys to 600: chmod 600 authorized_keys
  • Change permission to directory .ssh: chmod 744 /home/<username>/.ssh

Update SSH configure in Server

  • From root account, edit file: /etc/ssh/sshd_config
  • Uncomment line: PubkeyAuthentication yes
  • Comment line: #PermitRootLogin yes
  • Change line: PasswordAuthentication yes to PasswordAuthentication no
  • Save file

Restart ssh service:

  • Linux 4,5,6: service sshd restart
  • Linux 7: systemctl restart sshd

Using putty connect to server with your key 

  • Using putty, create new session to connect to server with username and private key file.

Using postfix send email through AWS SES in Google Cloud Compute

To send email using AWS SES in Google Cloud Compute:

  1. Install Postfix (default installed) when you create GCE instance. We need install package:

#yum install cyrus-sasl-plain

2. Add lines to /etc/postfix/main.cf

#vi /etc/postfix/main.cf

relayhost = [email-smtp.us-west-2.amazonaws.com]:2587
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_use_tls = yes
smtp_tls_security_level = encrypt
smtp_tls_note_starttls_offer = yes
smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.crt

3. Create file /etc/postfix/sasl_passwd

#vi /etc/postfix/sasl_password

[email-smtp.us-west-2.amazonaws.com]:2587 SES_USERNAME:SES_PASSWORD

4. Postmap hash sasl_password file

#postmap hash:/etc/postfix/sasl_passwd

5. Secure Postfix

#rm -rf /etc/postfix/sasl_passwd

#chmod 600 /etc/postfix/sasl_passwd.db

6. Restart Postfix server and test send email through SES

#service postfix restart

#sendmail -f from@example.com to@example.com

FROM: from@example.com

Subject: TEST

TEST EMAIL FROM GCE USING AWS SES.

.

7. Check log at /var/log/maillog

 

Configure SSO between Oracle Cloud Services and Google Apps

In this post, I will introduction step by step to configure SSO between Google Apps vs Oracle Cloud Services.

Requirement:

  1. Google Apps account
  2. Registed Oracle Public cloud services at https://cloud.oracle.com

(In some countries cannot get mobile request code, just chat to oracle support to get verify code  while you registration).

Configuration:

  • At Google Apps:
  • At Oracle Cloud Services:
Login to Admin Console in Google Apps  Login to My Services in Oracle Cloud Services.
In Admin console, search SAML in Google Search, it will return Apps to configure SAML 2.0  Click to Users, SSO Configuration tab
In Apps > SAML apps, click “+” to  to create new apps.
In SAML configure screen, choose Setup My own custom app
In next steps, choose Option 2, Download IDP metadata. You will get xml file has SAML v2.0 information. Click Next to continue.  Import IDP metadata to which you download from Google Apps
In next step you can enter any information you want, click Next to continue   After configure SSO, we have some URL to configure in Google Apps.
Using URL in Configure SSO in Oracle Cloud Services

ACS URL:  Copy value of Assertion Consumer Service URL in Oracle SSO.

Entity ID: Copy value of  Provider Id URL in Oracle SSO.

Start URL: Copy value of Logout Service Endpoint URL in Oracle SSO.

Name ID: Basic information and Primary Email

Name ID Format: EMAIL

Click Next to continue

You completed configure SAML apps for Oracle Cloud Services in Google Apps.

You need turn on SSO for user in Google Apps

After configured and turned on SSO in Google Apps. We can test SSO in Oracle cloud service.

Click to Test button in Test your SSO

 Click to Start SSO to begin test SSO.
 Check SSO Operation Result. It shoud be Authentication Successful
 Enable SSO for user
 Enable Sign in to Oracle cloud Services with Identity Domain credentials
Next, you can add user account in Oracle Cloud Services has email in Google Apps Account to SSO.

Click to Users tab, Click to Add button

Enter user information and add Roles for user.

 User can access to Oracle cloud services from Google Apps

You can view full document with images here

Cannot add exception site list in java 8

When you update java 8 (jre8).
To login Oracle EBS R12 form with JRE 8, you need add exception site list in java control panel.

But when you open java control panel, You can not add exception site list because add button be disabled.

To resolve this issue, you simple delete folder “Sun” in %appdata%

Start -> Run -> %appdata%
(C:\Users\\AppData\Roaming).

Delete folder Sun

Re-open java in control panel to add site to exception site list.
Done.

OTRS for Android App

Current I publish  my OTRS for Android App. It is very helpful for everyone to manage tickets from Android smart phone. You can download from Google Play

Base on iPhone handle module, we announces the stable release of the HelpDesk 1.12 for android devices.
We updated next release version 1.12 on 13-Mar-2015.

Release Details

  • Release name: Android Help Desk 1.12
  • Required OTRS release: OTRS Help Desk 3.2.1 or higher
  • Recommended OTRS release: OTRS Help Desk 3.2.1 or higher
  • Release date: Mar 13, 2015
  • Release type: Stable

What news:

  • Store your credential and auto login to OTRS.
  • You can change setting to sort by, order by attribute: Age, Owner, Reponsile, Customer, …
  • Fix bugs: connection timeout.

Features

  • Monitor tickets on OTRS Help Desk system.
  • Create new phone ticket.
  • Add Note.
  • Update, Reply ticket.
  • Move to another queue.
  • Change ticket states (include close ticket).

Cannot login to OTRS after update to OTRS 4

Symptom: Upgrade OTRS 3 to OTRS 4.

Problem:

After update to OTRS 4, I cannot login with agent role. Website address: http://server:port/otrs/index.pl

Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.

Solution:

Check log file of apache in the system to understand what is the problem.

Example:

$tail -f /var/log/httpd/error_log

[Mon Dec 22 16:05:52 2014] -e: (in cleanup) Can’t call method “Get” on an undefined value at /opt/otrs//Kernel/System/AuthSession/FS.pm line 547.
[Mon Dec 22 16:06:09 2014] -e: (in cleanup) Can’t call method “Get” on an undefined value at /opt/otrs//Kernel/System/AuthSession/FS.pm line 547.
[Mon Dec 22 16:06:43 2014] -e: (in cleanup) Can’t call method “Get” on an undefined value at /opt/otrs//Kernel/System/AuthSession/FS.pm line 547.
[Mon Dec 22 16:06:43 2014] [error] [Mon Dec 22 16:06:43 2014] -e: Got no DBObject at /opt/otrs//Kernel/System/Stats/Static/FAQAccess.pm line 26.\n\t(in cleanup) Can’t call method “Get” on an undefined value at /opt/otrs//Kernel/System/AuthSession/FS.pm line 547.\n

It it maybe error on FAQ modules. So I have solution follow

Download lastest FAQ module and install manually, because i cannot login to OTRS web agent with administrative role.

1. Download FAQ 4.0.1 from http://www.otrs.com/homepage/try/

2. Install module manually from root account.

su -c “./otrs.PackageManager.pl -a install -p /tmp/FAQ-4.0.1.opm” -s /bin/bash otrs

3. Try to login again, it will be successfull.

4. After login to web agent, i can remove and install OTRS extension.

How to install/update package from iso file in solaris 11

To install or update package in Solaris 11 from repo file offline just simple follow these steps:

1. Check current repository
#pkg publisher
2. Update current repository point to file repo download.
#pkg set-publisher -G ‘*’ -g ‘file:///file’ ‘solaris’
3. Check repository (should be point to file which we change in step 2).
4. Install/Update package,
#pkg update –accept

If we have iso file, please mount to directory first.
EX: I download iso file has name: sol-11_1_20_5_0-incr-repo.iso
1. mount iso file to mnt
#mount -F hsfs sol-11_1_20_5_0-incr-repo.iso /mnt
(When I check mnt mount point, I see repo directory).
2. set publisher
# pkg set-publisher -G ‘*’ -g ‘file:///mnt/repo’ ‘solaris’
3. update package
# pkg update

Install & Configure barcode fonts in Oracle Report Server

Steps to installation and configuration barcode fonts using oraclebarcode.jar on Oracle Form Report Server 11g.

Steps to installation and configuration barcode fonts using oraclebarcode.jar on Oracle Application Server 10g.

1. Download barcodebeanpaper-133790.zip from www.oracle.com/technetwork/middleware/reports/barcodebeanpaper-133790.zip

2. Extract barcodebeanpaper-133790.zip to a folder.

3. On Client which installed Oracle Report Builder (Windows OS)

3.1 Open registry in windows: Start -> Run -> Regedit

3.2 Find key: HKEY_LOCAL_MACHINE -> SOFTWARE -> ORACLE -> HOME

3.3 In right window, find key: REPORTS_CLASSPATH, edit key and add line follow

                 C:\orant10g\reports\jlib\oraclebarcode.jar; 

With C:\orant10g is folders which you installed Developer Suite 10g.

3.4 Copy file oraclebarcode.jar from unzip folder (scripts subfolder) in step 2 to C:\orant10g\reports\jlib\

3.5 Create report (rdf file) with barcode follow guide in doc subfolder (obr_barcode.pdf).

 4. On Oracle Report Servers (Linux Server).

4.1 Copy file oraclebarcode.jar to $ORACLE_HOME\reports\jlib\ folder.

4.2 Edit configuration file in $ORACLE_HOME/reports/conf/rep_<server_name>.conf

<engine id=”rwEng” class=”oracle.reports.engine.EngineImpl” initEngine=”1″ maxEngine=”1″ minEngine=”0″ engLife=”50″ maxIdle=”30″ callbackTimeOut=”60000″classPath=”/u01/app/frs/reports/jlib/oraclebarcode.jar” jvmOptions=”-Dsun.java2d.pmoffscreen=false”>

4.3 Edit reports.sh file in $ORACLE_HOME/bin/reports.sh

Add 2 lines follow:

DISPLAY=servername:1.0; export DISPLAY
REPORTS_DEFAULT_DISPLAY=NO; export REPORTS_DEFAULT_DISPLAY

4.4 Add 3 lines in bottom of file: /etc/profile to add DISPLAY for every user when login

if [ “$DISPLAY” != “” ]; then
xhost +$(hostname) +$(hostname -f)
fi
5. Run report from report server.