# How to install software per user for user from ports?



## bryn1u (Jul 10, 2014)

Hello,

I was wondering how to install software for only a few users with their own configuration files when I use  ports? Example: when I install irssi, the main configuration file is in /usr/local/etc but I want to give the possibility to the user to modify the configuration files in their own directory. How can I do that or is it even possible?

Cheers.


----------



## ondra_knezour (Jul 11, 2014)

*Re: How to install software per user for user from ports ?*

Maybe the PREFIX variable may help you? See in the Porters Handbook.


----------



## SirDice (Jul 11, 2014)

*Re: How to install software per user for user from ports ?*

Irssi can use configuration files in the user's home directory. You don't need to do anything.


```
dice@vps-2417-1:~> ll .irssi/
total 26
-rw-------  1 dice  dice  6954 Mar  5  2013 away.log
-rw-r-----  1 dice  dice  7444 Mar  6  2013 config
-rw-r-----  1 dice  dice  8472 Nov 30  2011 default.theme
```

irssi(1):

```
--config=FILE
              use FILE instead of ~/.irssi/config.
```


----------



## bryn1u (Jul 11, 2014)

*Re: How to install software per user for user from ports ?*

Maybe another question. What about psybnc per user, teamspeak per user, ventrilo per user, from ports?


----------



## Jimmy (Jul 15, 2014)

Perhaps you could use jails to achieve what you are attempting? 

http://www.freebsd.org/doc/en_US.ISO885 ... jails.html


----------



## SirDice (Jul 15, 2014)

*Re: How to install software per user for user from ports ?*



			
				bryn1u said:
			
		

> Maybe another question. What about psybnc per user, teamspeak per user, ventrilo per user, from ports?


Read their respective documentation. Most applications allow per user settings.


----------



## bryn1u (Sep 12, 2014)

Hey,

I did something like below:

```
mkdir -p ~/ports-build/build/bin ~/ports-build/build/sbin\
~/ports-build/build/etc/rc.d ~/ports-build/build/man/man8\
~/ports-build/build/share/pixmaps
export USER_PORTS_DIR=/usr/home/bryn1u/ports-build
cd /usr/ports/cat/port/;
make SHAREOWN=`whoami` SHAREGRP=1000 BINOWN=`whoami` BINGRP=1000 MANOWN=`whoami` MANGRP=1000 BUILD_AS_USER=1 \
INSTALL_AS_USER=1 PREFIX=${USER_PORTS_DIR}/build PORT_DBDIR=${USER_PORTS_DIR}/options \
DISTDIR=${USER_PORTS_DIR}/distfiles WRKDIR=${USER_PORTS_DIR}/work GROUPS="" NO_PKG_REGISTER=1 install
```
Port has been installed very well but i don't know how to use by user bryn1u. I want to install software only for me in my home directory, not for whole system and users. Someone can help me ?


----------

