# cd /etc/sysconfig/network-scripts/??
Hello
I have installed CENTOS 6 I have and can LOG On with root. I am trying to SET the IP for my sever....( default ) I was reading this blog http://blog.roozbehk.com/post/351568...dd-network-eth and it says to RUN this command, # cd /etc/sysconfig/network-scripts/ but when I do, it opens a BLANK SCREEN with INSERT on the bottom then I try vi ifcfg-eth0 ( maybe that one was the black screen with insert ) I also get a line that says "NEWFILE" How do I go from here? What am I missing Thanks in advance, |
The "#" is the root prompt. Don't type that, it makes that whole line a comment. When you then try to edit the file, you are in the wrong directory, where there is no existing file with that name.
|
Quote:
Thank you, I am not typing the # and I an getting [newfile] What does that mean? Thanks in advance |
Please post the output of the following:
Code:
ls -l /etc/sysconfig/network-scripts/ Code:
ifconfig -a |
the first command
ls -l https://s32.postimg.org/pfnxnxy1x/ls_l.jpg The second command ifconfig -a No command found Thank you for all of your help! |
Looks like your ethernet adapters are called "eno1" and "eno2" rather than "eth0", so those are the files you'll want to edit. Which one to edit depends on which port your ethernet cable is attached to.
I thought CentOS 6 came with net-tools installed by default? Are you sure this isn't CentOS 7? "eno1" is also a CentOS 7 style name. You can verify the distro with: Code:
uname -a Code:
cat /etc/*release* |
As a regular user you need to specify the complete path i.e.
/sbin/ifconfig However, the ifconfig command is being deprecated and replaced by the ip command. You can see the same information although in a different format ip a You indicate that you installed CentOS 6 but from the posted image it looks like CentOS 7. Predictive names en01 and en01 replaced eth0 and eth1. You will find there are a lot of websites that have outdated information since version 7 has some major changes since 6. If running a desktop the easiest method would be to use networkmanager applet at the upper right or the nmtui. |
Quote:
Oh man, It is 7 . I meant to install 6.. Will Centos 7 work with cpanel and if not how do I default to 6? Thank you for all the help How do I change the eth0? |
Quote:
I have this on a DELL 1920 QUAD core web server and trying to set up my first web server Thanks for the help and how do I change the ETH0? YOU were right . its 7 ;) |
No idea about cpanel, you'd have to look at their documentation. You would need to download the ISO for CentOS 6 and reinstall if you want to switch.
You don't have an eth0, you have eno1 and eno2, those are your two ethernet ports on the server, and ifcfg-eno1 and ifcfg-eno2 are their configuration files. |
Will this work?
/sbin/ip link set eno1 down /sbin/ip link set eno1 name eth0 /sbin/ip link set eth0 up |
Why do you want it to be called eth0? Do you have some program or something that has "eth0" hard-coded into it and your network interface has to match? If not, just leave it at the default name or you'll likely break something.
|
Quote:
I am just asking for help or a command line that will fix my problem Thank you and so sorry for my misspeaking |
so like this ?
Thank you for all the help ;) /sbin/ip link set eth1 down /sbin/ip link set eth1 name eno1 /sbin/ip link set eno1 up is that correct? |
I assume network manager is installed and running. If nmtui does not work will do it manually.
http://www.krizna.com/centos/setup-network-centos-7/ |
All times are GMT -5. The time now is 10:55 AM. |