# DHCP ports?



## cebra (Nov 30, 2012)

Hello,

I am discovering FreeBSD thanks to my school and i have to configure a server DHCP and i've already a problem about installing of the port..

I didn't find the name of the port DHCP so i used "sysinstall".(If you could tell me, anyway, the name of the port, it would be kind because when i use the name of sysinstall, it doesn't work)

Moreover, once installed thanks to "sysinstall" i didn't find not anymore the "dhcpd.conf", Is it normal ?

Thanks for your reading and maybe answering

Sorry for my english, i'm french..


----------



## chatwizrd (Nov 30, 2012)

You should not be using sysinstall to install things. Read the FreeBSD handbook on how to install things. Use freshports.org to search for packages by name.

To install a dhcp server you might want to try this one.


----------



## wblock@ (Nov 30, 2012)

Another way:

```
# cd /usr/ports
# make search key=dhcp | less
```

That will show all the ports with the keyword dhcp.  The standard one is net/isc-dhcp42-server.


----------



## cebra (Nov 30, 2012)

Oh thank you very much, i am looking for a website as freshports.org which give the commands.

And why don't use sysinstall ? Is it unreliable ?


----------



## Beeblebrox (Nov 30, 2012)

@chatwizard: If you use "["port"]"<portname>"[/"port"]" format, the link will automagically direct to relevant page in http://www.freshports.org, and will look like net/isc-dhcp42-server.

@cebra: config files for everything installed through ports structure will be located under /usr/local/etc and not in /etc.


----------



## cebra (Nov 30, 2012)

wblock@ said:
			
		

> Another way:
> 
> ```
> # cd /usr/ports
> ...



Ah ok, it's good to know 

Thank you for your helping ^^


----------



## wblock@ (Nov 30, 2012)

cebra said:
			
		

> Oh thank you very much, i am looking for a website as freshports.org which give the commands.



The Handbook section on ports shows how to install ports in general, and is well worth reading.  The ports(7) man page is also useful.



> And why don't use sysinstall ? Is it unreliable ?



Since FreeBSD 9, there is a new installer, and the old sysinstall(8) has options that do not work any more.  Some of them did not work before.


----------



## cebra (Nov 30, 2012)

wblock@ said:
			
		

> Another way:
> 
> ```
> # cd /usr/ports
> ...



In my configuration "/usr" exist but not "/ports"


----------



## cebra (Nov 30, 2012)

chatwizrd said:
			
		

> You should not be using sysinstall to install things. Read the FreeBSD handbook on how to install things. Use freshports.org to search for packages by name.
> 
> To install a dhcp server you might want to try this one.




It's very strange ! I succeed to install "dhcp 4.2" but I don't find the file dhcpd.conf..Is it in a special directory because when I did :

`# emacs /usr/local/etc/dhcpd.conf`

FreeBSD finds a file but there is nothing in the file.


----------



## chatwizrd (Nov 30, 2012)

Beeblebrox said:
			
		

> @chatwizard: If you use "["port"]"<portname>"[/"port"]" format, the link will automagically direct to relevant page in http://www.freshports.org, and will look like net/isc-dhcp42-server.



Ok thanks for the information. I didn't know about that before.


----------



## wblock@ (Nov 30, 2012)

cebra said:
			
		

> In my configuration "/usr" exist but not "/ports"



Please read http://forums.freebsd.org/showthread.php?t=8816 about using tags.  They will make it easier to read and answer your questions.

No, /ports should not exist (note the leading /).  /usr/ports will exist if you have installed the ports tree, or "Ports Collection" as it is called in the Handbook.

If /usr/ports is not present, you were not installing ports, but packages.  And consequently, many of the answers to your questions do not apply.


----------



## wblock@ (Nov 30, 2012)

cebra said:
			
		

> It's very strange ! I succeed to install "dhcp 4.2" but I don't find the file dhcpd.conf..Is it in a special directory because when I did :
> 
> `# emacs /usr/local/etc/dhcpd.conf`
> 
> FreeBSD finds a file but there is nothing in the file.



Yes, some ports do not install a config file.  Instead, they install a sample file, with a filename ending in .sample.  The user is expected to copy that file to the correct name and modify it for their needs.


----------

