View previous topic :: View next topic |
Author |
Message |
kramerkeller Apprentice
Joined: 20 Jun 2005 Posts: 179
|
Posted: Sat Jul 09, 2005 5:23 am Post subject: NOOB VS. HOMENETWORK |
|
|
I am a noob with a general question regarding servers. I was just wondering where I could look up information or what server program I should use. If I could at least "emerge" a server program I could look into it further from the man. However, I would love a detailed guide on how to set up a server.
U guys are the best thanks in advance
Last edited by kramerkeller on Tue Jul 12, 2005 6:49 pm; edited 1 time in total |
|
Back to top |
|
|
John5788 Advocate
Joined: 06 Apr 2004 Posts: 2140 Location: 127.0.0.1
|
Posted: Sat Jul 09, 2005 5:35 am Post subject: |
|
|
it depends what kind of server. if you want a webserver, install apache, php, mysql and anything else you need for it. if you want email server, you can install courier-imap, postfix, or exim or whatever you want. what kind of server were you planning on making? _________________ John5788 |
|
Back to top |
|
|
kramerkeller Apprentice
Joined: 20 Jun 2005 Posts: 179
|
Posted: Sat Jul 09, 2005 5:45 am Post subject: |
|
|
I have done the PHP triad in windows, so I probably should do that. How do I install what I need for PHP APache and MYSQL and is there a visual environment to work with or will I have to use all programs form the terminal. I have gotten pretty far with gentoo and have done some linux, but and pretty newbish, but I do know how to work with the triad in windows. How do I get the stuff working and what programming environments are available? |
|
Back to top |
|
|
John5788 Advocate
Joined: 06 Apr 2004 Posts: 2140 Location: 127.0.0.1
|
Posted: Sat Jul 09, 2005 6:22 am Post subject: |
|
|
i dont run a gentoo webserver, but I would assume you emerge apache, php, mysql and anything else you need. I'm not familiar with this triad program you mentioned, but you can use any editor you want, whether it be a graphical one like scite or from terminal like nano. _________________ John5788 |
|
Back to top |
|
|
Suicidal l33t
Joined: 30 Jul 2003 Posts: 959 Location: /dev/null
|
Posted: Sat Jul 09, 2005 6:34 am Post subject: |
|
|
For a simple web server with mysql and php for starters i would:
Code: | emerge apache mod_php mysql |
Check out the docs section on the main gentoo.org page; sure there is alot more detailed info there. |
|
Back to top |
|
|
kramerkeller Apprentice
Joined: 20 Jun 2005 Posts: 179
|
Posted: Sat Jul 09, 2005 6:09 pm Post subject: |
|
|
Okay so I ran the command
emerge apache mod_php mysql
and um...although I have worked with this stuff in windows I gues I dont' know what to do. Can I just right a file in nano or something and then it will work in mozilla or something. hmm
Also I have heard about SSH
I would like to remotely access my linux box from school and other areas in the house. SHould I use SSH or do you guys have any other suggestions. Also - what the emerge coomand be? |
|
Back to top |
|
|
John5788 Advocate
Joined: 06 Apr 2004 Posts: 2140 Location: 127.0.0.1
|
Posted: Sat Jul 09, 2005 7:27 pm Post subject: |
|
|
you probably already have ssh installed. just start it up like this:
# /etc/init.d/sshd start
you can add it to your startup process like this
# rc-update add sshd default
For apache, you need to edit the httpd.conf file and then start it up probably using the init.d scripts as well. _________________ John5788 |
|
Back to top |
|
|
kramerkeller Apprentice
Joined: 20 Jun 2005 Posts: 179
|
Posted: Sat Jul 09, 2005 7:56 pm Post subject: |
|
|
I have a job that allows me a lot of time on the computer. I guess I have ssh I started it up. How would I go about accessing it from another computer. It would be great if I could work on gentoo linux while at work!!!! |
|
Back to top |
|
|
statwizard n00b
Joined: 05 Jul 2005 Posts: 5
|
Posted: Sat Jul 09, 2005 8:20 pm Post subject: ssh to your box |
|
|
You'll need to know your IP address, and hopefully it stays relatively constant. (My cable provider will occasionally change mine every several months.) If your PC is directly connected to your service provider (no router) you can get your IP address by running "ifconfig" and reading the line for your ethernet interface. If your PC is connected through some sort of a router (example: a wireless router), you will need to see the router's documentation for two things: 1) finding out what your real (external) IP address is, and 2) how to do a "port forward" to your Gentoo box -- you'll need to make it so that a connection to your router's port 22 passes on to your Gentoo box, port 22.
Once you get the local stuff taken care of, try going to a remote computer (like the one at work). Use a secure shell program and open a connection to your IP address. From a Windows system, I usually use PuTTY -- a google search for "putty download" will get the program for you. If everything is set up right, you'll get a terminal window on your box at home.
Now, if you need more than a terminal window, you're going to need to look in to more advanced programs (out of my league). |
|
Back to top |
|
|
bonbons Apprentice
Joined: 04 Sep 2004 Posts: 250
|
Posted: Sat Jul 09, 2005 8:20 pm Post subject: |
|
|
kramerkeller wrote: | I have a job that allows me a lot of time on the computer. I guess I have ssh I started it up. How would I go about accessing it from another computer. It would be great if I could work on gentoo linux while at work!!!! |
Code: | ssh gentoo-box.domain | . If your box has a public IP and your company has port 22 open to outside world, then it's as easy.
If you have your gentoo box behind a NAT router, then you have to forward port 22 from the router to your gentoo box. Eventually remapping the port may be useful if you work behind a restrictive firewall. |
|
Back to top |
|
|
kramerkeller Apprentice
Joined: 20 Jun 2005 Posts: 179
|
Posted: Sat Jul 09, 2005 9:33 pm Post subject: |
|
|
Okay so I have SSH running. I am loving this stuff. Anyway. I also have a roomate with a mac and I have a sepearte windows pc. He was able to log into my machine with ssh. From my windows machine I was able to log in with putty. Of course I was using the local area network. I don't know if anyone has ever used putty, but now I am trying to login from work. I know I need to use um ssh gentoo-box.domain I guess to get the adress. My roomate is at home getting it right now. However, we do have a router. So if I get the address taht cox-cable provides (i know it changes but we have it for 3 days at least) and then of course I have my local address. What would I type into putty? Anyone know?
right now we are using kyle@168.192.0.7, but I don't know where I put the address the router has? OR how I go from the router to the pc to log in.
Anyone with some putty help -THANKS AGAIN in advance. |
|
Back to top |
|
|
kramerkeller Apprentice
Joined: 20 Jun 2005 Posts: 179
|
Posted: Sat Jul 09, 2005 9:41 pm Post subject: |
|
|
This is what I got
ssh gentoo-box.domain
Name or service not known
so....yeah I don't know |
|
Back to top |
|
|
kramerkeller Apprentice
Joined: 20 Jun 2005 Posts: 179
|
Posted: Sun Jul 10, 2005 4:26 am Post subject: |
|
|
So I set up a port forward on my router to forward anything on port 999 to 192.168.0.7 (my linux machine). The linux machine is running ssh. I used putty to go to my ip address (the router) and then the port of course thinking it would go to the IP address find my router and then forward from port 999 to the linux box at 192.168.0.7. It must have worked because it said
10.16 Network error: Connection refused
Which I looked up to mean
This error means that the network connection PuTTY tried to make to your server was rejected by the server. Usually this happens because the server does not provide the service which PuTTY is trying to access.
Check that you are connecting with the correct protocol (SSH, Telnet or Rlogin), and check that the port number is correct. If that fails, consult the administrator of your server.
So it seems to be trying to connect and getting to my machine (as it did not get to the other machines in the house), but maybe there is something wrong or something I need to set up on SSH? |
|
Back to top |
|
|
Felly n00b
Joined: 28 Sep 2004 Posts: 34 Location: Belgium
|
Posted: Sun Jul 10, 2005 4:33 am Post subject: |
|
|
Are you routing to the correct port (22) ?
Also, for general information about setting up a server with Gentoo, check out the Gentoo Wiki. Lots of excellent stuff there. |
|
Back to top |
|
|
kramerkeller Apprentice
Joined: 20 Jun 2005 Posts: 179
|
Posted: Sun Jul 10, 2005 4:49 am Post subject: |
|
|
okay, well I see how it says port 22. My router takes a port number and forwards it, so if I forwarded 999 to the local address. I gues I could change it to 22, but then what do I do when I want the router to forward to other local machines.
I don't know if this makes sence, but basically from my netgear router screen I specifty that
port 999 forwards to 192.168.0.7
port 1000 forwards to 192.168.0.8
So if I change the linux box so its
port 22 forwards to 192.168.0.22
Then what do I do for my other machine? Or am I tottally on the wrong track? |
|
Back to top |
|
|
John5788 Advocate
Joined: 06 Apr 2004 Posts: 2140 Location: 127.0.0.1
|
Posted: Sun Jul 10, 2005 4:53 am Post subject: |
|
|
take port 22 at your router and forward it to port 22 on your computer. _________________ John5788 |
|
Back to top |
|
|
kramerkeller Apprentice
Joined: 20 Jun 2005 Posts: 179
|
Posted: Sun Jul 10, 2005 4:58 am Post subject: |
|
|
So I take port 22 on the router and then route it to 192.168.0.7:22 and then my other computer which is 192.168.0.1 cannot then get forwarded from 22. In putty it lets you change the ports
Could I send to port 1000 on the router and then forward it to port 22 on the linux box?
Or am I missing something altogether here. Maybe I need a little lesson on ports and what requires port 22 SSH or Putty? |
|
Back to top |
|
|
xbmodder Guru
Joined: 25 Feb 2004 Posts: 404
|
Posted: Sun Jul 10, 2005 5:25 am Post subject: |
|
|
Ok! SSH runs on port 22!
Diagram time:
Code: |
w00t!
============ ____________
| Kyle's box | | router | ______
| IP: | <-----------------> | IP: XXX.XXX| <----------|Internet| ----------->|office| |
|192.168.0.7 | port 22 | <--------------| port22 ----------
---------------- ------------------ _________________ http://xbmodder.us/ |
|
Back to top |
|
|
kramerkeller Apprentice
Joined: 20 Jun 2005 Posts: 179
|
Posted: Sun Jul 10, 2005 5:44 am Post subject: |
|
|
Honestly, I have no clue what that diagram is saying. Is that forward port 22 to port 22 on 192.168.0.7 and if so how does that resolve the problem of needing to forward to other PC's that may be on the router other than 192.168.0.7
However, only port 22 for SSH then?
I just don't get the reply too much at all. |
|
Back to top |
|
|
John5788 Advocate
Joined: 06 Apr 2004 Posts: 2140 Location: 127.0.0.1
|
Posted: Sun Jul 10, 2005 7:05 am Post subject: |
|
|
if you need SSH to be port forwarded to other computers, just port forward say port 50022 to port 22 on the other computer that needs ssh and use putty to connect to port 50022. _________________ John5788 |
|
Back to top |
|
|
kramerkeller Apprentice
Joined: 20 Jun 2005 Posts: 179
|
Posted: Sun Jul 10, 2005 8:01 am Post subject: |
|
|
Okay so maybe my router just sucks, but most the stuff I looked up shows the same thing.
# Service Name Start Port End Port Server IP Address
1 LINUX 22 22 192.168.0.7
2 Login 23 23 192.168.0.8
So port 22 works and gets me to the 7 machine
Now I would use something different like port 23, but then how do I get it to route to 192.168.0.8
THe start and end port have to be either the same or a range. The start point does not forward to the end port. It is just a range. SO you see I don't know how I could hope to log into more than one machine if the only port I can use is 22. I also tried adding :22 at the end of the local IP, but it won't fit
So I am on my linux box, but am not sure how I could get onto my other linux box and mac and god forbid, Windows |
|
Back to top |
|
|
xbmodder Guru
Joined: 25 Feb 2004 Posts: 404
|
Posted: Sun Jul 10, 2005 8:10 pm Post subject: |
|
|
There are ways to do this:
You can set the port SSHD listens on. For .7 we make it 22. for .8 we make it 23, so on!
you can set this by editing:
/etc/ssh/sshd_config
and the Port line _________________ http://xbmodder.us/ |
|
Back to top |
|
|
kramerkeller Apprentice
Joined: 20 Jun 2005 Posts: 179
|
Posted: Sun Jul 10, 2005 10:38 pm Post subject: |
|
|
All it shows as far as ports go is
#Port 22
Protocol 2
#ListenAddress 0.0.0.0
#ListenAddress ::
So I think the Port 22 part is commented, but maybe Protocol 2 means port 22, how can I change it to port 23?
Since my router forwards 22 to my 168.192.0.7 and I would like my router to forward 23 to 168.192.0.8
WOuld I change the ListenAddress to 23 or something.
Also, is there a way to just access my whole home network? Like instead of logging into each machine, a way to just set my router or go through a machine to browse my home network and all the computers on it? |
|
Back to top |
|
|
xbmodder Guru
Joined: 25 Feb 2004 Posts: 404
|
Posted: Mon Jul 11, 2005 4:52 am Post subject: |
|
|
uncomment "port 22" as it is the default and replace it with "Port 23" _________________ http://xbmodder.us/ |
|
Back to top |
|
|
ikke Apprentice
Joined: 14 Jan 2005 Posts: 225 Location: Belgium
|
Posted: Mon Jul 11, 2005 8:52 am Post subject: |
|
|
Dont port forward, use an SSH tunnel to some remote server to access your box, much safer. _________________ Working day and night to enhance your Linux Desktop experience
Blog |
|
Back to top |
|
|
|