NFS Share on EC2
I secured a domain that I manage through GoDaddy, if I go to the DNS management and add an "A" record for the hostname to IP address. This will put the server in your domain similar to
anyhost.fatcat.com
I used this to give my servers domain names
Changing hostname on OEL 7
Hostname change on RHEL
Additional Hostname Domain Stuff
In this post we will see how we can change the hostname on Linux 7 host. This article is demonstrated on Oracle Enterprise Linux 7.1 – 64 Bit.
Check the existing hostname:
We can use command “hostnamectl” to check the existing hostname.
[root@localhost ~]# hostnamectl status
Static hostname: localhost.localdomain
Icon name: computer
Chassis: n/a
Machine ID: fc456ff1ece743cfb79756356feaca35
Boot ID: c120fe1a556d4cf78f0cfe548800bb65
Virtualization: oracle
Operating System: Oracle Linux Server 7.1
CPE OS Name: cpe:/o:oracle:linux:7:1
Kernel: Linux 3.8.13-55.1.6.el7uek.x86_64
Architecture: x86_64
[root@localhost ~]#
It will read the value of static hostname from file “/etc/hostname”.
Update hostname in “/etc/hostname” file:
[root@localhost ~]# cat /etc/hostname
oraerp1
[root@localhost ~]# cat /etc/hostname.bkp
localhost.localdomain
[root@localhost ~]#
[root@localhost ~]# hostnamectl status
Static hostname: oraerp1
Icon name: computer
Chassis: n/a
Machine ID: fc456ff1ece743cfb79756356feaca35
Boot ID: c120fe1a556d4cf78f0cfe548800bb65
Virtualization: oracle
Operating System: Oracle Linux Server 7.1
CPE OS Name: cpe:/o:oracle:linux:7:1
Kernel: Linux 3.8.13-55.1.6.el7uek.x86_64
Architecture: x86_64
Verify the new hostname:
After connecting with the new session then new hostname will be reflected.
[root@localhost ~]# su -
Last login: Tue Nov 10 00:55:45 AST 2015 on pts/0
[root@oraerp1 ~]#
VIDEO
Download MobaXterm or use putty
Set up EC2 instance using OL7.2-x86_64-HVM-2015-12-10 Amazon Machine Image (AMI) with three additional volumes of 5, 8 and 10 gb (this will make your life easier). I use additional sizes to accommodate increase in volume workload.
When setting up on EC2 the base use to login with is EC2
Login via MobaXterm as ec2-user and change password
Install packages needed for instance
sudo yum install wget zip unzip -y
sudo yum install perl-libwww-perl.noarch -y
sudo yum install oracle-rdbms-server-12cR1-preinstall -y
sudo yum install oracle-database
Mount volumes, format disks, mkdir
sudo mkfs -t ext4 /dev/xvdb (be super careful here)
sudo mkfs -t ext4 /dev/xvdc (be super careful here)
sudo mkdir -p /swapfile1
sudo mount /dev/xvdb /swapfile1 (swap file)
sudo mkdir -p /u01/software
sudo mount /dev/xvdf /u01/software (zip files)
sudo mkdir -p /u01/app/oracle/oradata/orcl
sudo mount /dev/xvdc /u01/app/oracle/oradata/orcl (data files)
Add swap file
sudo dd if=/dev/zero of=/swapfile1/swapfile bs=1024 count=3145728 (creates 3G swapfile)
sudo chown root:root /swapfile1/swapfile
sudo chmod 0600 /swapfile1/swapfile
sudo mkswap /swapfile1/swapfile
sudo swapon /swapfile1/swapfile
free -m
Make fstab entries
lsblk (gives names of volumes)
sudo cp /etc/fstab /etc/fstab.orig (back up fstab)
sudo vi /etc/fstab
/swapfile1 none swap sw 0 0
/dev/xvdc /u01/app/oracle/oradata/orcl ext4 defaults 0 0
/dev/xvdf /u01/software ext4 defaults 0 0
sudo mount -a (remount everything to make sure it worked)
Give oracle user ownership of directories
sudo chown -R oracle.oinstall /u01/app/oracle/oradata/orcl
sudo chown -R oracle.oinstall /u01/software
sudo chown -R oracle.oinstall /u01
Change hostfile for instance by adding hostname to localhost
hostname
sudo vi /etc/hosts
Change password for oracle user and make it possible for user to connect remotely (Managing User Accounts on Your Linux Instance )
sudo passwd oracle
su oracle (switch to oracle user)
cd ~(make sure your are in oracle user home)
mkdir .ssh (create location for key file)
chmod 700 .ssh (set permissions)
touch .ssh/authorized_keys (create file)
chmod 600 .ssh/authorized_keys (set permissions)
“GET http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key> ;.ssh/authorized_keys” (copy public key to file)
log out and login as oracle user
Upload database zip files into /u01/software (this takes a while)
Unzip files
cd /u01/software
unzip linuxamd64_12102_database_1of2.zip
unzip linuxamd64_12102_database_2of2.zip
Start install
cd /ora_software/database
./runInstaller
Run scripts as root (careful here you need to open separate instance of MobaXterm)
sudo /u01/app/oraInventory/orainstRoot.sh
sudo /u01/app/oracle/product/12.1.0/dbhome_1/root.sh
Say OK to run dbca to create a database
Update tnsnames.ora , listener.ora files by replacing localhost with actual host name
cd /u01
find -name tnsnames.ora
find -name listener.ora
hostname
vi ./app/oracle/product/12.1.0/dbhome_1/network/admin/tnsnames.ora
vi ./app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora
Restart listener and database
. oraenv
lsnrctl stop
lsnrctl start
sqlplus sys as sysdba
shutdown immediate;
startup;
At this point you should be able to connect to your database remotely with SQL Developer or your favorite tool, remember if you are shutting down your EC2 instance to first stop the listener and the database.
Here is a great resource as the A-Team within Oracle is the top-level technical resources as it relates to GoldenGate. This is a link to many of their published articles. A-Team Index of articles
Oracle GoldenGate Extract Recovery
OGG Security Best Practices
Oracle GoldenGate Best Practices: Configuring Downstream Integrated Extract
SQL Svr 2 SQL Svr GG
EC2 config GG hub
GoldenGate Cloud Service (GGCS) Replication from Amazon RDS Oracle Database to Oracle DBCS
Setting Up WordPress on EC2
If your are setting up your own VPC this is a a good setup to use for WP setup in the cloud service.
Fiverr Install