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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-22-2003, 01:19 PM
|
#1
|
Member
Registered: Jul 2003
Location: oregon coast
Distribution: Fedora Core 3
Posts: 280
Rep:
|
newbie webserver queries.
Hey, I just did a search for this and didn't find anything answering this, so please don't crucify me .
I'm interested in starting the process required to have my computer be a webserver (hosting my small 30mb website). A few questions though.
1). I've heard that before you can have your computer be a webserver (at least for a website) you have to have 2 static IP's from your ISP. Is this true? Would I be okay with just the one I have now? I am running cable 'net.
2). Is there a tutorial for starting a webserver that I don't know of because I haven't been in the linux community very long?
3). How rabid must one be in securing the server? Would a firewall work or is there lots more that goes into the process?
well those are my questions, hoping someone can answer one or all or at the very least provide me with url's.....
thank you,
trinity
|
|
|
08-22-2003, 01:31 PM
|
#2
|
Member
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313
Rep:
|
1). I've heard that before you can have your computer be a webserver (at least for a website) you have to have 2 static IP's from your ISP. Is this true? Would I be okay with just the one I have now? I am running cable 'net.
You need one IP. It helps if it is static. If have a cable modem, you may already have a static IP. You can go into your router setup and click on 'refresh DHCP' which will cause the router to hot the cable company and try to get a new number. If it comes back the same number. You probably have a static IP. Cable companies say they dont give static IP's. But this is a legal issue. Mine has ben the same for 4 years.
If you dont have a router, check you IP and the lease time on it using IFCONFIG. When the lease time is up, check to see if it renews to be the same number. If so, you may have a static IP. Unless the cable company claims it to be static, they can change it at any time without telling you so its up to you to deal with that.
2). Is there a tutorial for starting a webserver that I don't know of because I haven't been in the linux community very long?
The webserver you will find the most documentation on is Apache. O'Reilly has a very easy to read primer on Apache that is writen for newbies. It is called, strangely enough, Apache. www.oreilly.com. You can find tons of info by googling apache as well. http://www.apache.org/
3). How rabid must one be in securing the server? Would a firewall work or is there lots more that goes into the process?
A firewall helps keep the box from getting hacked. It does nothing for the webserver. Ask yourself, if the box got hacked, what is the worst that could happen. For me the answer is I would havce to reload to OS and reinstall all my backup files such as configurations which I have on CD. Not bad. So I dont sweat it too much. If you have personnal or damaging info on the box, you cannot take security too seriously. The book Maximum Linux Security is a newbie to intermediate level book that will teach you tons about OS's, Linux, and also security.
|
|
|
08-22-2003, 01:38 PM
|
#3
|
Member
Registered: Apr 2003
Distribution: Gentoo 1.4
Posts: 290
Rep:
|
this should help TONS. it doesnt explain much, like other tutorials, but it is straight and to the point, only a page long. It deals with configuring a LAMP setup on your webserver.
LAMP=Linux, Apache, MySQL, PHP
All of which you will need, I'm assuming
http://www.mkaz.com/reference/php/setup_linux.html
also, you only need one static IP, and as long as you open port 80 to your box through a router (again, asssuming you have one), the world will be able to see your page.
About security...DONT be a fool and use your main desktop/laptop/workstation for a webserver. If you did, chances are a hacker would have a LOT more to exploit and fiddle with, e.g. mounted drives, other networked computers, etc. jdruin was right, think "what is the worst that can happen?"
|
|
|
08-22-2003, 01:53 PM
|
#4
|
Member
Registered: Jul 2003
Location: oregon coast
Distribution: Fedora Core 3
Posts: 280
Original Poster
Rep:
|
thank you for the help so far
well i only have one computer so yeah i was hoping to turn this computer into one to host my page or at least host more files. is the security particularly hard to learn or implement? i'm not afraid of hard work, just that saving $100+ a year in webhosting fees is a tempting lure.
okay here's an extreme newbie question, how would i go into router config or even run IFCONFIG. I tried in the command line just for kicks and got nothing so i'm literally scratching my head.
and what is a router? I'm connected to the net via Ethernet and my Webstar cable modem.
trinity
|
|
|
08-22-2003, 02:44 PM
|
#5
|
Member
Registered: Feb 2002
Location: Virginia USA
Distribution: Slackware, CentOS, Fedora
Posts: 342
Rep:
|
Quote:
Originally posted by Trinity22
and what is a router? I'm connected to the net via Ethernet and my Webstar cable modem.
trinity
|
Then there is no router between you and the ISP.
A router (in very easy to understand words) is a device that comunicates or directs network trafic. In other words a router helps you get from point A (your house) to Point B (maybe www.linuxquestions.org) in the internet .
Routers are used to connect private LANs (Local Area Networks; example is a home network) to the internet. In this case they are also called a "gateway" because it is the point where all the traffic has to go through to be able to acces the internet or another networks.
In very basic words, a router conects networks together.
You can go to CompUSA and buy a cheap router (Linksys, Netgear); set up two or three computers at home in a Network, and be able to share the internet connection between them with the router.
Hope this helps
Figa
|
|
|
08-22-2003, 03:04 PM
|
#6
|
Member
Registered: Jul 2003
Location: Louisville aka Derby City
Distribution: WinXP SP2 and SP3, W2K Server, Ubuntu
Posts: 313
Rep:
|
I'm connected to the net via Ethernet and my Webstar cable modem.
In that case you do not have a router. Routers are cheap and come in good brands like Linksys and DLink but they require that you learn basic networking priciples to use them effectively. Basically they allow you to direct all web request to one particular computer thus securing the computers from a central point. Since you only have one computer, a router is not neccesary (but would still be useful)
how would i go into router config or even run IFCONFIG. I tried in the command line just for kicks and got nothing so i'm literally scratching my head.
ifconfig is probably not coming up because the path is not set. The path is the location of the executable program. To find out what the path is for ifconfig do:
find / -name ifconfig
THis will produce a result (or more) something like:
/sbin/ifconfig
You can type in the entire path to run the command.
To permanently set a path (in RedHat), make a backup of
/etc/profile
by:
cp /etc/profile /etc/profile.backup
and open the /etc/profile file in a text editor such as pico (ie pico /etc/profile) and add the lines:
pathmunge .
pathmunge /usr/bin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
Put this before the line 'unset pathmunge' (about line 23 or so)
Save the file. Exit and login again. Test by using ifconfig but without the path (so just type ifconfig, not /sbin/ifconfig) and see if the shell finds it.
Good luck
|
|
|
All times are GMT -5. The time now is 03:39 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|