installation av tomcat strular..

Här diskuteras programmering och utveckling
Boko101
Inlägg: 12
Blev medlem: 03 apr 2008, 12:49
OS: Ubuntu
Utgåva: 12.04 Precise Pangolin LTS

installation av tomcat strular..

Inlägg av Boko101 »

Hej,

till början med kul att man har hittat ett vettigt forum.

Jo jag håller på med ett examensarbete där vi skall bygga klientprogram i Java micro edition. För sony ericsson modeller. För att kunna göra det, så behöver man enligt sonyericsson developer instruktioner bl.a :

* Apache - tomcat
* Apache - axis
* Apache - ANT
* SDK från ericsson inklusive deras API

Jag hittade en sk. guidline under denna http://www.howtogeek.com/howto/linux/in ... on-ubuntu/ länk.

Jag har följt instruktionerna fram till:

***************************************************'
Installation

Now we'll download and extract Tomcat from the apache site. You should check to make sure there's not another version and adjust accordingly.

wget http://apache.hoxt.com/tomcat/tomcat-6/ ... .14.tar.gz

tar xvzf apache-tomcat-6.0.14.tar.gz

The best thing to do is move the tomcat folder to a permanent location. I chose /usr/local/tomcat, but you could move it somewhere else if you wanted to.

sudo mv apache-tomcat-6.0.14 /usr/local/tomcat
************************************************************

Men sen nästa steg efter detta fattar jag inte riktigt hur detta skall gå till...

Tomcat requires setting the JAVA_HOME variable. The best way to do this is to set it in your .bashrc file. You could also edit your startup.sh file if you so chose.

The better method is editing your .bashrc file and adding the bolded line there. You'll have to logout of the shell for the change to take effect.

vi ~/.bashrc

Add the following line:

export JAVA_HOME=/usr/lib/jvm/java-6-sun

At this point you can start tomcat by just executing the startup.sh script in the tomcat/bin folder.

Jag skrev in vi ~/.bashrc och fick upp detta:

se bild 1-->
bild1
bild1
bild1.png (63.39 KiB) Visad 611 gånger
därefter får jag upp detta:

# ~/.bashrc: executed by bash(2) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups
# ... and ignore same sucessive entries.
export HISTCONTROL=ignoreboth

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color)
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
;;
*)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
;;
esac

# Comment in the above and uncomment this below for a color prompt
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
;;
*)
;;
esac
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

#if [ -f ~/.bash_aliases ]; then
# . ~/.bash_aliases
#fi

# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
#alias dir='ls --color=auto --format=vertical'
#alias vdir='ls --color=auto --format=long'
fi

# some more ls aliases
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi

enligt instruktionerna skall jag lägga till detta kommando någonstans---> export JAVA_HOME=/usr/lib/jvm/java-6-sun

Fattar inte riktig vad eller hur man skall gå tillväga med det hela.. Är det någon som har ett bra tips? Så är jag evigt tacksam.

mvh

Bosse

Återgå till "Programmering och webbdesign"