Oracle Linux

From the Command Line into the to the Oracle Cloud – the ORACLE-DBCS-CLI Utility

The Oracle ORACLE-DBCS-CLI utility is a command-line interface tool to manage the lifecycle of your Database as as Service instances in cloud.oracle.com. You can create and delete instances, verify and apply patches, scale your instances up and down and many more. The advantage is that you can work with configuration files. And I like to work with such files, if I need 10 instances with the same shape, I have only to search and replace the instance name – fire!

The ORACLE-DBCS-CLI utility is available for Unix platforms at the moment. I have installed ORACLE-DBCS-CLI on a Oracle Linux 6.5, JDK version 1.7 or higher is required.

Download and Documents

The software can be downloaded here: http://www.oracle.com/technetwork/database/database-cloud/public/downloads/index.html

The  ORACLE-DBCS-CLI documentation starts here: https://docs.oracle.com/cloud/latest/dbcs_dbaas/CSDBI/GUID-E9F2219D-EBDC-44B3-BE22-BEED6C2BAB74.htm#CSDBI-GUID-E9F2219D-EBDC-44B3-BE22-BEED6C2BAB74

Installation

After download the software has to be extracted on target server. My install directory is /u00/app/oracle/tools/dbcs-cli/ – take care about the release number.

What you get:

The dboplan.dat.tmpl is a template file which contains all required variables for working with cloud.oracle.com. For some actions you only need a subset of them.

Get Domain Information

To gather information about your created instances, you need this four parameters.

sm_url Endpoint URL – Attention: for EMEA it’s https://dbcs.emea.oraclecloud.com/paas/service/dbcs/api/v1.1/instances and not https://dbaas.oraclecloud.com/paas/service/dbcs/api/v1.1/instances as written in the documentation
user_name Your cloud.oracle.com user name
password Your cloud.oracle.com password
identity domain Your identity domain – e.g. trivadis4703

 

For this action, I have created a small configuration file which contains these four lines:

Now I can execute ORACLE-DBCS-CLI with the configuration file, all my instances in the specified domain are listed:

Get Patch Information

For this action you need your cloud SSH key and the host, IP does also work if the host name is not resolved by DNS, /etc/hosts etc.

Creating a new Instance

It is very easy to create a new instance, but here you need the full content from the configuration template. I have created my own template called cloud10.dat to create an instance with shape OC3 and no backup, a new ssh key will be created and uploaded by the ORACLE-DBCS-CLI. I have specified these parameters, all other I let them on default values:

sm_url Endpoint URL – Attention: for EMEA it’s https://dbcs.emea.oraclecloud.com/paas/service/dbcs/api/v1.1/instances and not https://dbaas.oraclecloud.com/paas/service/dbcs/api/v1.1/instances as written in the documentation
user_name Your cloud.oracle.com user name
password Your cloud.oracle.com password
identity domain Your identity domain – e.g. trivadis4703
vm_name Your new instance name – e.g. CLOUD10
vm_shape Your shape – e.g. OC3
db_sid Your SID – e.g. cloud10
db_dbname Your DB name – e.g. cloud10
db_passwd Your SYS password – it have to contain a numer, a # or a _ character
db_bkup_disk Backup = No

 

Executing ORACLE-DBCS-CLI with my Configuration File cloud04.dat

Unfortunately there is no logfile available, but If you have set a wrong shape or a too simple password, you will get an error.

That’s all folks – in cloud.oracle.com you can see now that your instance will be created immediately.

cloud04

My Template cloud04.dat

Summary

The ORACLE-DBCS-CLI Utility is a great tool to manage the lifecycle of your Oracle cloud instances in th CLI. With a small set of templates and configuration files, you are able to manage your cloud instances without any browser.

Do you need a Mailserver for Testing Purposes? Communigate Pro!

When I am testing Oracle and other software, I want to verify functions like sending alert mails. On Linux systems it’s easy. The most distributions have packages like sendmail already preconfigured and ready to use. But for example on Windows systems, there is no built-in solution. The goal was to have a small virtual machine running as mailserver which can be used for all my test cases.

CommuniGate Pro

CommuniGate Pro is a groupware which supports a lot of solutions like SMTP, POP3, Webmail and many more. In this post I describe how you can easy install the software and configure the SMTP component in Oracle Enterprise Linux 6.

The goal is to use CommuniGate Pro for the Enterprise Manager 13c to send mail alerts. Note: If you want to use CommunigatePro in your company, then you have to license it.

Software Download

The Software is available for the most platforms here: http://www.communigate.com/main/purchase/download.html
Link to the installations guides: https://www.communigate.com/communigatepro/Install.html

Installation

I use the rpm file which I have already transferred to my server olten.trivadistraining.com into directory /tmp. The installation has to be done as user root.

The software is now installed in directory /opt

The installation routine creates the runlevel startup script that the software will be started automatically during server boot.

If you have already mail solutions like sendmail or postfix up and running, you have to stop and disable it.

Oracle Linux 6 – Stop postfix

Oracle Linux 6 –  Stop Sendmail

Start CommuniGate Pro

You can a) reboot your server or b) start it manually:

Web Access Configuration – Step by Step

Initial Configuration: https://www.communigate.com/communigatepro/Install.html#Config
Quick Start: https://www.communigate.com/communigatepro/QuickStart.html

When the server is started, you can now access the web GUI by server URL and Port 8010.

Step 1 – Master Password

Set master password for user postmaster – I agree.

communigate_01

Step 2 – Server Name and Interface Mode

Verify server name and language, set interface mode to Advanced –  Update.

communigate_02

Step 3 – Create Account

Tab Users – insert new account name –  Create Account.

communigate_03

Step 4  – Set Real Name and Password

Set the Real Name and the CommuniGate Password for the new created user – Update.

communigate_04

Step 5 – Add Client IP

In tab Settings – Network – Client IPs add your client ip address or address range – Update.

communigate_05

Configure Client – for Example Oracle Enterprise Manager 13c

Set Host, User Name and PasswordOK.

communigate_06

Now you will receive the messages from EM13c.

 

communigate_07

Troubleshooting

With telnet you can verify if the correct SMTP service is running on port 25 and if the firewall is open.

Wrong Service

Right Service

Summary

Communigate Pro offers you an easy to configure SMTP platform. I have configured a small virtual machine which I start whenever I want to test some email functions.

Sure, this software can do much more. But all I want is to send emails from my test servers – Mission accomplished!

Hostname in Oracle Enterprise Linux 7 anpassen – hostnamectl

In Oracle Enterprise Linux 6 konnte man den Hostname beispielsweise mit Tools wie system-config-network oder durch editieren vom /etc/sysconfig/network File anpassen. In der Version 7 kann der Hostname mit dem Tool hostnamectl geändert werden. Ein Editieren vom Network-File funktioniert nicht mehr, der Hostname wird aus dem File /etc/hostname abgeleitet.

Auszug aus den Oracle Enterprise Linux 7 Release Notes – https://docs.oracle.com/cd/E52668_01/E53499/html/section-bbw-bzj-4n.html:

hostname

Nebst hostnamectl gibt es mit Tools für den NetworkManager wie nmtui und nmcli weitere Möglichkeiten, den Hostname anzupassen.

Anzeigen vom Hostname mit hostnamectl

Neben dem eigentlichen Hostname werden noch Zusatzinformationen der Plattform angezeigt. Das gute alte hostname Kommando funktioniert natürlich weiterhin.

Ändern vom Hostname Online

Der Hostname kann online geändert werden, nach einem erneuten Login wird auch der Prompt richtig angezeigt. Ist der Hostname in /etc/hosts eingetragen, so muss dieser Eintrag auch angepasst werden !

Variante 1: hostnamectl set-hostname – ändert den Hostname ein /etc/hostname

Anzeige vom alten Hostname:

Setzen vom neuen Hostname:

Das File /etc/hostname wurde angepasst:

Der neue Hostname ist ab sofort gültig, nach dem erneuten Login wird der Prompt und der neue Hostname angezeigt:

Variante 2: Editieren vom File /etc/hostname und Service neu starten

Anzeigen vom neuen Hostname im geänderten /etc/hostname:

Neustart vom Service:

Der neue Hostname ist ab sofort gültig, nach dem erneuten Login wird der Prompt und der neue Hostname angezeigt:

 Links

Redhat – CONFIGURING HOST NAMES USING HOSTNAMECTL

My Oracle Support – How to Configure hostname in Oracle Linux 7 (Doc ID 2049221.1)