LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-02-2011, 02:19 PM   #1
logbearer
LQ Newbie
 
Registered: Aug 2006
Posts: 8

Rep: Reputation: 0
Need help setting up CentOS VMWare server on Windows Vista box


I'm trying to learn Linux and have created a VMWare guest operating system using CentOS 4.8. I expect the next step is to install ssh in order to transfer files to the server but as of yet I haven't figured out how to assign it a host name or how to effect a transfer. Brand new at Linux so what may seem obvious is eluding me.
thanks, Amy
 
Old 06-02-2011, 02:32 PM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello Amy and Welcome to LinuxQuestions,

Did you set up CentOS with the graphical environment or terminal only? I don't have much experience with the GUI myself for CentOS but at this site you'll find a pretty complete manual. If you've set your server up with terminal only then let me know and I'll post what you need to change/configure to get your system up and running. In order to do so you'll need to provide some more information. Will you connect to your router/gateway using DHCP or do you want to set up a static IP? If static then provide the network address and the gateway address. Have fun with Linux.

Kind regards,

Eric
 
Old 06-03-2011, 10:12 AM   #3
logbearer
LQ Newbie
 
Registered: Aug 2006
Posts: 8

Original Poster
Rep: Reputation: 0
At this point I'm using terminal only. I don't know the pros and cons of DHCP or static IP, so I don't have a preference - don't know if it matters but I work from home so am limited to a commercial ISP. Right now I have the network adapter set to bridged. The etc/sysconfig/networking/devices folder is empty so I may be missing some configuration steps that need to take place before I can set up network access.
 
Old 06-03-2011, 01:54 PM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello Amy,

On my virtual machines I don't have anything in /etc/sysconfig/networking/devices so I wouldn't worry about that. But look in /etc/sysconfig/network-scripts if you have file(s) in there that begin with ifcfg-. Those are the files you need to configure your devices. You can also run:
Code:
lspci
to find out if your NIC(s) has(ve) been detected correctly. Let me know what you encounter and we'll take it from there.

Kind regards,

Eric
 
Old 06-03-2011, 02:18 PM   #5
logbearer
LQ Newbie
 
Registered: Aug 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks Eric.
ifcfg file exist (2), and the lspci command returns Host Bridge, PCI Bridge, ISA Bridge, IDE interface, Bridge, VGA compatible controller, SCSI storage controller, and Ethernet Controller.
Amy
 
Old 06-03-2011, 02:59 PM   #6
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

You're welcome

Now that you know where the configuration files are you can try the following, which is the simplest. When logged in use your preferred editor (vi, vim, joe, nano, ...) to open the ifcfg-eth0 file and put the following content in there:
Code:
BOOTPROTO=dhcp
ONBOOT=yes
if not in there already. If you're not sure, post the contents of that file here. Normally it should already contain something like these lines:
Code:
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=E2:72:CA:BC:4B:9C
ONBOOT=yes
Also post the contents of /etc/sysconfig/network and the output of the following command:
Code:
ifconfig
as root or preceded by sudo if you're running as a normal user.

Kind regards,

Eric
 
Old 06-03-2011, 08:41 PM   #7
logbearer
LQ Newbie
 
Registered: Aug 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Hi Eric,
There is no HWADDR in ifcfg-eth0, but there is Type=ethernet. All else is as you specified.

/etc/sysconfig/network contains:
NETWORKING=yes
HOSTNAME=localhost,.localdomain
eth0
Link encap:Ethernet HWaddr 00:0C:29:FC:80:8C
inet addr:192.168.1.5 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80:20c:29ff:fefc:808c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packest:3032 errors:0 dropped:0 overruns:0 frame:0
TX packest:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1196808 (1.1 MiB) TX bytes:1388 (1.3 KiB)
Interrupt:177 Base address:0x1424
lo
Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:20 errors:0 dropped:0 overruns:0 frame:0
TX packets:20 errors dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1160 (1.1 KiB) TX bytes:1160 (1.1 KiB)
Sorry to take so long to respond, I spent most of the afternoon trying (unsuccessfully) to cut and paste.
 
Old 06-04-2011, 02:23 AM   #8
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

Don't worry that there's no hardware address in the config file(s). Looking at your output it seems that you are connected and have IP 192.168.1.5 assigned. You can test connectivity by trying a ping to your gateway, which I assume is 192.168.0.1. Just execute:
Code:
ping 192.168.0.1
You'll also need to check your /etc/resolv.conf file to see if your search domain and DNS server(s) have been set up correctly and if not, change them. Can you post the output of that file please?

You could try directly by pinging one of the DNS IP of Google:
Code:
ping 8.8.8.8
If that gives you a result then you are connected and can update your server, transfer files, install services like for example a web or ftp server on your CentOS and try them out. If you only want to transfer files from your Windows host to your virtual Linux server, you could use a program like Putty, SSH Secure Shell, or others which have a SecureFTP client included that allow you copying files over SSH protocol without the need to install additional server software on your virtual Linux box.

And don't worry about taking long to respond. I'm assuming you were trying to copy from VMWare console to your browser in Windows. Try one of the programs mentioned above (Putty for example) and you'll be able to connect using SSH instead of working on the VMWare console window. Using a SSH client allows you to copy / paste text.

On hint: when posting code (configuration files etc.) it's advisable to put that code between [ CODE ] [ /CODE ] tags (without the spaces) for readability.

Kind regards,

Eric
 
Old 06-04-2011, 08:59 AM   #9
logbearer
LQ Newbie
 
Registered: Aug 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks again, Eric.
My original question arose from being unable to access the linux server from putty, which I would definitely prefer over the VMWare console window.

Contents of the /etc/resolv.conf are as follows:
Code:
; generated by /sbin/dhclient-script
search home
nameserver 192.168.1.1
nameserver 71.252.0.12
I am able to ping the following:
8.8.8.8
192.168.1.5
192.168.1.1
but not
192.168.0.1

When I try to access the linux server via putty using 192.169.1.5, the connection times out.
 
Old 06-04-2011, 09:07 AM   #10
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

OK, so you don't have any problem with your network connection. My first impression would be that you don't have the SSH server installed. Check with the following command:
Code:
rpm -q openssh-server
which should return something like this:
Code:
[root@ci-iso-builder ~]# rpm -q openssh-server
openssh-server-4.3p2-72.el5_6.3
[root@ci-iso-builder ~]#
(maybe different version but that's not that important. If nothing is shown then you'll need to install the SSH server with:
Code:
yum install openssh-server
Also, check if you don't have any IPTABLES configured that might be blocking your access with:
Code:
iptables -L
Kind regards,

Eric
 
Old 06-04-2011, 11:23 AM   #11
logbearer
LQ Newbie
 
Registered: Aug 2006
Posts: 8

Original Poster
Rep: Reputation: 0
I thought I submitted a reply which I don't see now, so please excuse if this information is redundant.
openssh-server-3.9pl-11.e14_7 is installed.
iptables shows
many targets, including RH-Firewall-1-INPUT
many ACCEPT listings, including icmp, ipv6-crypt, ipv6-auth, and udp
one REJECT all listing - reject-with icmp-host-prohibited
Please let me know if I should provide all details of the iptables output and if this output should also be included in the code brackets.
thanks, Amy
 
Old 06-04-2011, 12:08 PM   #12
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

You can simply try by flushing iptables temporarily. Just run:
Code:
iptables -F
and try to connect from Putty again. If that works then you'll have to add a rule to allow SSH. In order to do that open /etc/sysconfig/iptables and add just before the line that says COMMIT, the following:
Code:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
Then restart iptables with either of the following:
Code:
/etc/init.d/iptables restart
service iptables restart
Kind regards,

Eric
 
Old 06-04-2011, 01:21 PM   #13
logbearer
LQ Newbie
 
Registered: Aug 2006
Posts: 8

Original Poster
Rep: Reputation: 0
thanks, but still not able to access putty. Is this a problem with my firewall?
 
Old 06-04-2011, 02:59 PM   #14
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

Did you try connecting with the iptables rules flushed (iptables -F)? Check if the SSH daemon is running and listening on port 22.
Code:
service sshd status
You can also check on your VMWare console by trying to SSH to localhost:
Code:
ssh localhost
If that works than your SSH daemon is working and the problem exists with your firewall. Try turning it off for the moment with:
Code:
service iptables stop
and try again.
To what firewall are you referring in your last post? You have selected SSH (port 22) in Putty, right?

Kind regards,

Eric
 
Old 06-04-2011, 05:31 PM   #15
logbearer
LQ Newbie
 
Registered: Aug 2006
Posts: 8

Original Poster
Rep: Reputation: 0
Response to the first command was:
ssh: unrecognized service
But I was able to ssh as localhost
My firewall is not such in the true sense of the word, but Norton 360 Firewall protection is enabled.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
red hat through VMware player on windows vista sparshbhardwaj Linux - General 2 10-08-2009 01:44 PM
Setting up CentOS 5.3 Linux Box into Router tdog89 Linux - Networking 9 05-05-2009 09:36 PM
LXer: Setting Up a SME Server Test Environment with Virtual Box on Vista LXer Syndicated Linux News 0 02-03-2009 10:00 AM
file sharing from centos 5.2 with windows xp and vista zeus-dice Red Hat 6 08-21-2008 04:11 AM
Setting up a network with a Suse box & a Windows box flatstan SUSE / openSUSE 21 03-15-2007 08:11 AM


All times are GMT -5. The time now is 04:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration