Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Static host name in Amazon EC2 Linux

Posted on 2013-02-04
4
Medium Priority
?
385 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 33

Accepted Solution

by:
shalomc earned 2000 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

Turn your laptop into a mobile console!

The CV211 Laptop USB Console Adapter provides a direct Laptop-to-Computer connection for fast and easy remote desktop access with no software to install.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn how the use of a bunch of disparate tools requiring a lot of manual attention led to a series of unfortunate backup events for one company.
You deserve ‘straight talk’ from your cloud provider about your risk, your costs, security, uptime and the processes that are in place to protect your mission-critical applications.
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…
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, f…

719 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