changing IP and hostname

I want to change hostname and IP address for my Linux Fedora 10 server, I have already changed /etc/hosts file, but it does not work, it still show me the same host i.e: local.server insted of my_host.server wich I wanna set up.
LVL 2
latorreconsultoresAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

tkutherCommented:
system-config-network is your friend here.

Or you can edit

/etc/sysconfig/network

and

/etc/sysconfig/network-scripts/ifcfg-eth0

manually, followed by a

service network restart
0
latorreconsultoresAuthor Commented:
tkuter:

may you show me how I must to define:

/etc/sysconfig/network

and

/etc/sysconfig/network-scripts/ifcfg-eth0

thanks
0
tkutherCommented:
To change the hostname, edit the HOSTNAME value in /etc/sysconfig/network.

To change the IP edit the IPADDR value in /etc/sysconfig/network-scripts/ifcfg-eth0.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

latorreconsultoresAuthor Commented:
tkuther:

Im gonna check ur recomendations and Im gonna tell u what happend.
thanks
0
Monis MontherSystem ArchitectCommented:
To change the hostname do the following

1- from command line

#hostname new.server.name

2- edit /etc/sysconfig/network

#vim /etc/sysconfig/network and change the line (if not available type it)

HOSTNAME=new.server.name

3- change the /etc/hosts file to reflect your new name

Note: to make sure the hostname changed type the command

#hostname



Now to configure your IP address

system-config-netwrok          This is a GUI tool or

#vim /etc/sysconfig/network-scripts/ifcfg-eth0     I am assuming your interface is eth0

IPADDR=a.b.c.d
NETMASK=255.255.255.x   or what ever you mask is
GATEWAY=w.x.y.z


Note: type case sensitive as I did above


Finally you need to restart your network service

#service network restart


Good Luck
0
latorreconsultoresAuthor Commented:
thank u so much 4 ur useful help
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.