Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I had a server in a hosting company and I took it home. I need to connect him to a local network (not wifi) and access to the server from another computer in the network via browser, like I did it when it was in the hosting company. I don't have any knowledge in linux, I just know how to type in the command line :) I thinks all the IP configuration of the server is one big mess, because it passed from more then one hosting company to another...

I tried a lot of tutorials that I found in the web, but nothing works - mainly because I don't know how to check if I did something wrong.

I just need to know how to connect to local network ( D-Link router) and then access the server from another computer browser. thanks

update: the server os is: CentOS release 4.8 (Final)

share|improve this question

migrated from stackoverflow.com Oct 23 '12 at 14:16

This question came from our site for professional and enthusiast programmers.

1  
What OS is the server? –  jeffatrackaid Oct 9 '12 at 17:20
    
how do I check what OS is in the server? –  user1732451 Oct 9 '12 at 19:24
    
@user1732451 turn it on with a monitor connected and watch the boot process; no matter what OS it's running, you'll need an admin or root account. If you know that it's Linux, just google for "which linux version" and you'll see plenty of instructions on how to determine what distro/version you're running –  ernie Oct 9 '12 at 23:18
    
The server is connected to a monitor and I have the username and password of the root account. I typed 'uname -a' and got: Linux sql1.fav.co.il 2.6.9-89.0.15.ELsmp #1 smp Fri Oct 23 17:25:31 EDT 2009 i686 i686 i386 GNU/Linux - 'sql1.fav.co.il' it's the hostname when the server was in the hosting company. –  user1732451 Oct 10 '12 at 8:32

3 Answers 3

In short, you need:

  1. The ability to use the server to access the internet (e.g. if you connect a monitor and keyboard to it)
  2. The ability, on the server, to access the server application. E.g. browsing to http://localhost and seeing a web server
  3. You want the server to be in the same IP subnet as the other computers on the network. This should be easy if it's a home router, and all IP's will start with 192.168.1 or 192.168.0
  4. You want to go to http://IP-Of-Server (in the case of a web server) from the other computer.

If your main problem is #1, you want to loop up how to re-enable DHCP on your machine to get an Ip address If your main problem is #2, then you may need to restart the server process If your main problem is #4, then you might have a firewall issue.

Hope that helps.

share|improve this answer
    
Its help , but not quite... I Don't know how the find out what is exactly is my problem... –  user1732451 Oct 9 '12 at 17:23

Solved:

$ vi /etc/sysconfig/network

NETWORKING=yes

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

DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes

$ /etc/init.d/network restart

$ ifconfig eth0

$ route -n

$ ping 10.0.0.138

$ vi /etc/httpd/conf/httpd.conf

Allow from all

$ service httpd restart
share|improve this answer

use below to setup ip address

http://www.cyberciti.biz/faq/linux-configure-a-static-ip-address-tutorial/

without knowing what Os is in the server it will be hard to give you exact commands.

share|improve this answer
    
how do I check what OS is in the server? –  user1732451 Oct 9 '12 at 18:01
    
I typed 'uname -a' and got: Linux sql1.fav.co.il 2.6.9-89.0.15.ELsmp #1 smp Fri Oct 23 17:25:31 EDT 2009 i686 i686 i386 GNU/Linux - 'sql1.fav.co.il' it's the hostname when the server was in the hosting company. –  user1732451 Oct 10 '12 at 8:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.