Ubuntu 13.04 – Install Jetty 9

来源:互联网 发布:带租约商铺 知乎 编辑:程序博客网 时间:2024/05/22 07:58

注:如果需要将jetty安装,并作为服务启动运行,请参考以下帖子:

http://pietervogelaar.nl/ubuntu-12-04-install-jetty-9/


下面我主要介绍作为jetty作为绿色版本在ubuntu13.04上的安装过程:

Java

请参考以下帖子,安装配置java。

Ubuntu 11.04 下安装配置 JDK 7   


Download the latest Jetty distribution (9.x).

从下面的网站下载最新版本jetty,并解压。
http://download.eclipse.org/jetty/stable-9/dist/

Settings

将jetty安装目录加入到环境变量中,例如:将下面语句加入.bashrc文件末尾

运行以下命令使bashrc文件生效
source  ~/.bashrc


Start /Stop

在终端切换到jetty安装目录,通过jetty.sh 脚本启动或者关闭jetty。
snowdream@ubuntu:~/bin/jetty-9/bin$ cd ~/bin/jetty-9/bin/snowdream@ubuntu:~/bin/jetty-9/bin$ ./jetty.sh startStarting Jetty: 2013-08-07 11:08:21.134:WARN::main: test-realm is deployed. DO NOT USE IN PRODUCTION!2013-08-07 11:08:21.264:INFO::main: Redirecting stderr/stdout to /home/snowdream/bin/jetty-9/logs/2013_08_07.stderrout.log. OK Wed Aug  7 11:08:27 CST 2013snowdream@ubuntu:~/bin/jetty-9/bin$ ./jetty.sh stopStopping Jetty: OK


最后,有关jetty更多知识,请参考以下两个网站:
1、jetty官方网站:http://www.eclipse.org/jetty/
2、jetty官方博客:http://webtide.intalio.com/

截图: