Een directiry aan PATH toevoegen

Pagina: 1
Acties:
  • 49 views sinds 30-01-2008

  • Hark
  • Registratie: Februari 2001
  • Laatst online: 08-07-2025
Ik heb RedHAt 8.0. Ik heb Java JRE 1.4.1 geinstalleerd (RPM). Ik heb ook LimeWire geinstalleerd, maar telkens als ik deze opstart kan hij java niet vinden. Na het intypen van "export PATH=/usr/java/j2re1.4.1_01/bin/" vindt hij Java wel. Maar het is natuurlijk ook mogelijk om dit automatisch te doen bij het opstarten. Maar in welk bestand moet ik dat dan zetten? Ik heb het echt niet kunnen vinden, zelfs niet in de PATH Howto.

  • moto-moi
  • Registratie: Juli 2001
  • Laatst online: 09-06-2011

moto-moi

Ja, ik haat jou ook :w

/etc/profile als je het bij iedereen wilt veranderen,
~/.profile als je het alleen bij jezelf wilt veranderen.
/etc/skel/.profile als je het alleen bij nieuw aangemaakte users wilt hebben.

God, root, what is difference? | Talga Vassternich | IBM zuigt


  • odysseus
  • Registratie: Augustus 2000
  • Laatst online: 14:23

odysseus

Debian GNU/Linux Sid

Als je geen ~/.profile hebt, dan kun je kijken naar ~/.bash_profile om het voor inlog-shells te regelen en ~/.bashrc om het voor non-login shells te regelen.

Leven is het meervoud van lef | In order to make an apple pie from scratch, you must first create the universe.


  • Hark
  • Registratie: Februari 2001
  • Laatst online: 08-07-2025
Dit staat er in /etc/profile:

# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}

# Path manipulation
if [ `id -u` = 0 ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi

pathmunge /usr/X11R6/bin after

unset pathmunge

# No core files by default
ulimit -S -c 0 > /dev/null 2>&1

USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"

HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
. $i
fi
done

unset i

Moet ik gewoon ergens bovenaan zetten PATH=/usr/java/j2re1.4.1_01/bin?

  • Erkens
  • Registratie: December 2001
  • Niet online

Erkens

Fotograaf

Hark schreef op 02 november 2002 @ 13:01:
Dit staat er in /etc/profile:

# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}

# Path manipulation
if [ `id -u` = 0 ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi

pathmunge /usr/X11R6/bin after

pathmunge /usr/java/j2re1.4.1_01/bin after

unset pathmunge

# No core files by default
ulimit -S -c 0 > /dev/null 2>&1

USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"

HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
. $i
fi
done

unset i

Moet ik gewoon ergens bovenaan zetten PATH=/usr/java/j2re1.4.1_01/bin?

  • Jordi
  • Registratie: Januari 2000
  • Niet online

Jordi

#1#1

Hmm. Ik wil niet vervelend zijn, maar dit is wel aardig common sense... en als je het niet weet, kan je het altijd nog in de handleiding opzoeken. Dit is basic stuff. Dat is niet erg. Het is gemakkelijk te vinden. Dat dan weer wel ;)

Het zal wel niet, maar het zou maar wel.

Pagina: 1

Dit topic is gesloten.