Solved

Static host name in Amazon EC2 Linux

Posted on 2013-02-04
4
358 Views
Last Modified: 2014-07-25
Hello,
I have Linux image on Amazon EC2. The problem that I am facing is that when I install Oracle products, they use the private DNS and the next time I would restart the image it will not work.
I would like to setup a permanent host name.
I tried the option of Elastic ip address and the result remain the same.

Regards,
Tamir
0
Comment
Question by:tamirmilo
  • 2
4 Comments
 
LVL 32

Accepted Solution

by:
shalomc earned 500 total points
ID: 38854111
You need to set up the ORACLE_HOSTNAME environment variable at boot time.

export ORACLE_HOSTNAME=`wget -q -O - http://169.254.169.254/latest/meta-data/public-hostname`  

add this to your startup script and see if this helps
0
 

Author Comment

by:tamirmilo
ID: 38854844
Thank you very mach.
Before I try quick question: isn't the result of the expression above will result in a different value since the host name is different on every reboot?
Thank you.
0
 
LVL 3

Expert Comment

by:mpilarczyk
ID: 39420937
If you'll use elastic ip it stays the same after reboot. As well as public hostname.
0
 

Author Comment

by:tamirmilo
ID: 40220424
I've requested that this question be deleted for the following reason:

cxxcxc
0

Featured Post

Do email signature updates give you a headache?

Do you feel like you are constantly making changes to email signatures? Are the images not formatting how you want them to? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today.

Join & Write a Comment

Moving your enterprise fax infrastructure from in-house fax machines and servers to the cloud makes sense — from both an efficiency and productivity standpoint. But does migrating to a cloud fax solution mean you will no longer be able to send or re…
Steve Terp was featured in a video created by CRN about how "Channel Is Crucial To Market Disruption". Click on View source to see the video and article
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now