Syntax with main( ) re: int

I’m using Cloud9 for my IDE and compiler to learn the C Programming Language.

Going through Schildt’s “Teach yourself C” which is copyrighted 1989. I’m thinking there has been a syntax update. When I entered the following code, I received an error.

Code

#include “stdio.h”
main( )
{
printf(“This is a short C program.”);
}

Response with error:

warning: return type defaults to ‘int’ [enabled by default]
main( )
^
This is a short C program.

Issue:

The program did run and displayed “This is a short C program.”, but looks like it added “int” in front of main ( ) for me.

Adding int in front of main ( )

#include “stdio.h”
int main( )
{
printf(“This is a short C program.”);
}

Running program again with no errors:

This is a short C program.

Process exited with code: 0

Followup needed:

Q: What change has happened since book was published?

Installing OracleDB on CentOS7

Note: I already have MariaDB and Apache Tomcat installed on CentOS7 server. Now I’ll be adding the free version of OracleDB.
Note: I followed these instructions: http://www.tecmint.com/oracle-database-11g-release-2-installation-in-linux/

cd /etc/yum.repos.d (Change directory)
wget http://public-yum.oracle.com/public-yum-ol6.repo (Get the file)
yum install oracle-rdbms-server-11gR2-preinstall (Install the file I downloaded)

Note: I saw for most part success with the install, except for:
–> Finished Dependency Resolution
Error: Package: kernel-uek-2.6.39-400.264.13.el6uek.x86_64 (ol6_UEK_latest)
Requires: ql23xx-firmware
Available: ql23xx-firmware-3.03.27-3.1.el6.noarch (ol6_latest)
ql23xx-firmware = 3.03.27-3.1.el6
You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest

Q: How to create a FQDN for the server?
A: Within /etc/hosts Went into VI and added this:
10.0.0.50 centos.pg.com

Q: How to set the hostname?
A: Within /etc/sysconfig/network I went into VI and added:
HOSTNAME=centos.pg.com

Q: How to set the hosts files
Note: I already added in 10.0.0.50 for centos.pg.com, but then went back in and added oracle
Note: It now looks like:
10.0.0.50 centos.pg.com oracle

Q: How to restart the network?
A: /etc/init.d/network restart

Q: How to add a user account for Oracle?
A: adduser oracle

Q: How to change password for the new account Oracle?
A: passwd oracle – made it redwood123

Q: How to add for 90-nproc.conf?
A: Add the entry to file “/etc/security/limits.d/90-nproc.conf” as described below.
A: With this entry:
# Default limit for number of user’s processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.

* soft nproc 1024
# To this
* – nproc 16384

Q: How to change for SELinux
Note: It was originally set for “enforcing” and I changed to “permissive”
A: /etc/selinux/config
A: Changed from enforcing to permissive

Note: After rebooting, log-in as oracle (this is the new account I just created)

When I do PWD is returns /home/oracle

Q: How to modify the .bash_profile file?
A: vi .bash_profile
A: Add this in and modify the FQDN to centos.pg.com
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=centos.pg.com; export ORACLE_HOSTNAME
ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=DB11G; export ORACLE_SID
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/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH export PATH

SQL within 1and1 databases – basic commands

Access the database within 1and1 using Putty and SSH – this is the easy part, and I’m into SQL Monitor where the prompt is: mysql>

Note: 1and1 is using Oracle, which is convenient for learning and I can create a bunch of different databases.

Q: How to know the names of the tables within the database?
A: show tables from ;
A: Below:
mysql> show tables from db610639204;

+————————-+
| Tables_in_db610639204 |
+————————-+
| accessprofile |
| accessright |
| accessscope |
| action |
| activity |
| activityprice |
| affectation |
| alert |
| approver |
| assignment |
| attachment |
| audit |
| auditsummary |
| bill |
| billline |
| calendar |
| calendardefinition |
| checklist |
| checklistable |
| checklistdefinition |
| checklistdefinitionline |
| checklistline |
| client |
| collapsed |
| columnselector |
| command |
| context |
| contexttype |
| copyable |
| criticality |
| decision |
| delay |
| delayunit |
| deliverymode |
| dependable |
| dependency |
| document |
| documentdirectory |
| documentversion |
| efficiency |
| event |
| expense |
| expensedetail |
| expensedetailtype |
| favorite |
| favoriteparameter |
| feasibility |
| filter |
| filtercriteria |
| habilitation |
| habilitationother |
| habilitationreport |
| health |
| history |
| importable |
| importlog |
| indicator |
| indicatorable |
| indicatorableindicator |
| indicatordefinition |
| indicatorvalue |
| issue |
| likelihood |
| link |
| linkable |
| list |
| mail |
| mailable |
| measureunit |
| meeting |
| menu |
| menuselector |
| message |
| milestone |
| mutex |
| note |
| opportunity |
| origin |
| originable |
| otherversion |
| overallprogress |
| parameter |
| payment |
| paymentdelay |
| paymentmode |
| periodicity |
| periodicmeeting |
| plannedwork |
| planningelement |
| planningmode |
| plugin |
| predefinedtext |
| priority |
| privacy |
| product |
| profile |
| project |
| projecthistory |
| quality |
| question |
| quotation |
| recipient |
| referencable |
| report |
| reportcategory |
| reportparameter |
| requirement |
| resource |
| resourcecost |
| risk |
| risklevel |
| role |
| runstatus |
| severity |
| sla |
| status |
| statusmail |
| team |
| tempupdate |
| term |
| testcase |
| testcaserun |
| testsession |
| textable |
| ticket |
| today |
| todayparameter |
| trend |
| type |
| urgency |
| version |
| versionproject |
| visibilityscope |
| work |
| workelement |
| workflow |
| workflowstatus |
| workperiod |
+————————-+
138 rows in set (0.15 sec)

Note: This is the Projeqtor database, which is quite commprehensive

Q: How to know the fields within a table? In this case, the table is called “Client”
A: show columns from client;
A: This comes back with information within each of these colunns, at the field level:
Field | Type | Null | Key | Default | Extra

Installing Oracle Database 11g Express Edition

Desired Outcome:

Installation of Oracle’s Database, which maybe premature considering I’ve just installed MariaDB. Hopefully, I can have both systems running at the same time. Strategically good to learn Oracle first.

This is the main web-site for information and downloads:
http://www.oracle.com/technetwork/database/database-technologies/express-edition/overview/index.html

This is the main site for documentation:
http://docs.oracle.com/cd/E17781_01/index.htm

This is the readme info for documentation:
http://docs.oracle.com/cd/E17781_01/doc.112/e21743/toc.htm
Note: Nothing much of importance

This is the Installation Guide for Linux:
http://docs.oracle.com/cd/E17781_01/install.112/e18802/toc.htm

MariaDB – Admin – Primer1 – Intro

This is the index for the Primer
XREF to: https://mariadb.com/kb/en/mariadb/a-mariadb-primer-01-intro/

Basic overview of this intro-level primer into access the mysql prompts and modifying a database

Note: I have everything they’re needing for the primer — functioning MariaDB system

When I run (logged in as root): mysql -u root -p
This happens: Access denied for user ‘root’@’localhost’ (using password: YES)
Note: I don’t get why I now cannot load the MariaDB console
Answer: When I was entering the password, I was entering the root password and not for the MariaDB

MariaDB [(none)]>
Note: This tell me that the MariaDB monitor is running without a database loaded

Various commands to learn in MariaDB:
https://mariadb.com/kb/en/mariadb/a-mariadb-primer-04-inserting/

Compilation of interests, thoughts and musings…