Connect a linux server to network and access it from another computer browser

2

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)

user1732451

Posted 2012-10-09T17:11:39.440

Reputation:

1What OS is the server? – None – 2012-10-09T17:20:26.930

how do I check what OS is in the server? – None – 2012-10-09T19:24:52.567

@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 – 2012-10-09T23:18:26.930

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.
  • < – None – 2012-10-10T08:32:57.633

Answers

1

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.

Arcymag

Posted 2012-10-09T17:11:39.440

Reputation: 143

Its help , but not quite... I Don't know how the find out what is exactly is my problem... – None – 2012-10-09T17:23:53.000

1

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

user1732451

Posted 2012-10-09T17:11:39.440

Reputation:

0

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.

Ranjith Ruban

Posted 2012-10-09T17:11:39.440

Reputation: 101

how do I check what OS is in the server? – None – 2012-10-09T18:01:15.340

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.
  • < – None – 2012-10-10T08:34:13.640