LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need help setting up CentOS VMWare server on Windows Vista box (https://www.linuxquestions.org/questions/linux-newbie-8/need-help-setting-up-centos-vmware-server-on-windows-vista-box-884182/)

logbearer 06-02-2011 01:19 PM

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

EricTRA 06-02-2011 01:32 PM

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

logbearer 06-03-2011 09:12 AM

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.

EricTRA 06-03-2011 12:54 PM

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

logbearer 06-03-2011 01:18 PM

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

EricTRA 06-03-2011 01:59 PM

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

logbearer 06-03-2011 07:41 PM

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:o 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.

EricTRA 06-04-2011 01:23 AM

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

logbearer 06-04-2011 07:59 AM

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.

EricTRA 06-04-2011 08:07 AM

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

logbearer 06-04-2011 10:23 AM

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

EricTRA 06-04-2011 11:08 AM

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

logbearer 06-04-2011 12:21 PM

thanks, but still not able to access putty. Is this a problem with my firewall?

EricTRA 06-04-2011 01:59 PM

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

logbearer 06-04-2011 04:31 PM

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.


All times are GMT -5. The time now is 08:34 PM.