Subject: RE: A few simple (I hope...) questions
To: 'Bill Studenmund' <wrstuden@netbsd.org>
From: Tristan Celder <tristan@unpure.net>
List: port-macppc
Date: 10/18/2002 03:48:31
Thanks for the reply. Still seems not to work though.

This is how my hosts file looks (without the comments) after following
your suggestions.

----------------

::1		localhost.subdomain.domain.tld localhost
127.0.0.1	localhost

127.0.0.1	localhost #added by netbsd sysinst
127.0.0.1	zappy

----------------

Should probably take out one of the duplicating 127.0.0.1 localhost
lines maybe? I've called the machine zappy.

Apache still throws out the "could not determine the servers fully
qualified domain name" response. Is this because I have a firewall on my
router? Or is it because I've got something set wrong? I've tried
looking in the documentation, but its going over my head in my unix
experience infancy!

I've enabled SSH via rc.conf, and can see it start when I reboot (first
time it created its keys too!). However, I still can't login using the
machines private ip from within the network. Is there a default firewall
in place I need to turn off?

I've heeded all your other advice. Thanks!

Tristan

-----Original Message-----
From: Bill Studenmund [mailto:wrstuden@netbsd.org] 
Sent: Friday, October 18, 2002 2:40 AM
To: Tristan Celder
Cc: port-macppc@netbsd.org
Subject: Re: A few simple (I hope...) questions

On Fri, 18 Oct 2002, Tristan Celder wrote:

> Hi all,
>
> I've installed NetBSD on my 7600/120! :) All seems to be running
> relatively smoothly... touch wood. I do have some really dumb newbie
> questions however, and I'd be thankful to whoever can take the time to
> answer them. First, some background on my set-up. I have installed
> apache using the SUP pkgsrc system. I found the httpd binary, ran it,
> and I could see the page across my local network (I'm pretty proud of
> myself!). The real praise should go to the SUP package installer, a
> wonder which shows the brilliance of Unix, or NetBSD if it's NetBSD
> unique. Well done to those involved!

Note: sup and pkgsrc are two differnt things, though you can use sup to
get pkgsrc. sup is a tool for retrieving source trees, and it is good at
obtaining NetBSD source, and pkgsrc sources.

pkgsrc is a framework for making software not maintained as part of the
NetBSD source.

> The questions...
>
> 1. I hear talk of adding things to your 'path'. I assume this means I
> would be able to type 'httpd start' without having to put the
directory
> in as I do currently. How is this done? What file do I need to change?

Don't do that.

Your path is the contents of the PATH environment variable. If you use
sh
or ksh or bash as your shell, "PATH=...; export PATH" is how you set it.
For csh and tcsh, "setenv PATH ...". If you want to add something to
your
path, do something like "PATH=$PATH:/new/dir/to/add".

But don't do that to start httpd. You don't need to start it often, and
I
doubt you want to start it by mistake.

> 2. What file do I need to change to start it at boot?

Not sure. Used to be you'd add something like:

if [ -f /usr/pkg/sbin/apachectl ]; then
       /usr/pkg/sbin/apachectl start
fi

to /etc/rc.local, but I think there's been work on making packages use
the
rc.d system.

> 3. When I do start apache, I get the message...
>
> 	"[alert] httpd: Could not determine the server's fully qualified
> domain name, using 127.0.0.1"
>
> I assume I have to add some things to the hosts file, but what? I am
at
> a loss.

change "localhost" to "localhost.your.domain.name localhost". The second
localhost is so when you type just localhost, the right thing happens.

> 4. I can't access the machine via telnet. I've looked at so many pages
> regarding ifconfig.mc0 to try and turn off the firewall. But so far
all
> the files I have found bare no resemblance to what I see when I open
my
> copy of the file. I'm doing something wrong... but I don't know!

ifconfig.mc0 should look something like "inet <your_ip> netmask
<your_netmask>".

Don't use telnet, it's not secure. Use ssh.

To enable ssh, add "sshd=YES" to rc.conf, and reboot.

> The following may help to diagnose any of the problems... I'm running
> the server on a private ip, behind an internet firewall and router
> (Intertex IX66) it is on a hub with other plain jane machines, I wish
to
> set-up the router to forward port 80 requests to the NetBSD server,
and
> possibly telnet (or ssh?) also. Would also be good to assign a domain
> for my static IP (which is pointing to the the router) so I can be the
> authority for my domain and control it via BIND on NetBSD, and set-up
> sub-domains. Is this possible? It DOES have a sub-domain already
> assigned to the ip, does this affect anything?

Take care,

Bill