Install Tomcat Debian
- font size decrease font size increase font size
- Print Email
摘自 http://easwy.com/blog/archives/install-apache-tomcat-on-debian-lenny/
以下主要参考了文章How to setup Apache Tomcat 5.5 on Debian Etch。
首先,需要安装java JDK。可以直接到sun的网站上下载(现在应该叫Oracle了,最近这些天的事,Sigh!),也可以在Debian仓库中下载。本文介绍由Debian仓库下载的方法。
打开/etc/apt/sources.list文件,在此文件中加入下面的源:
# for sun-java packages in unstable
deb http://ftp.debian.org/debian/ unstable non-free
deb-src http://ftp.debian.org/debian/ unstable non-free
保存并退出,然后用下面的命令更新一下源:
aptitude update
然后就可以下载java JDK6了:
aptitude install sun-java6-jdk
关于Apache web server的安装方法就不再描述了,可以参考文章在Debian Lenny上安装Apache2,PHP5,MySQL5, WordPress…。接下来我们安装tomcat:
aptitude install tomcat5.5 tomcat5.5-admin tomcat5.5-webapps
安装完后,在浏览器中输入http://localhost:8180/,如果你能看到Apache Tomcat/5.5的页面,说明你的tomcat已经安装好了。我在输入上述地址时,有时会出现访问异常,不过刷新一下又可以访问了,还不清楚是什么原因。
接下来,我们需要一个用户,使之具有admin和manager权限,在本例中我们把admin和manager权限赋予用户tomcat。
首先停用tomcat服务:
/etc/init.d/tomcat5.5 stop
接下来编辑文件 /var/lib/tomcat5.5/conf/tomcat-users.xml ,修改文件内容如下:
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="admin"/>
<role rolename="manager"/>
<role rolename="tomcat"/>
<user username="tomcat" password=”tomcatpassword” roles="tomcat,admin,manager"/>
</tomcat-users>
保存退出后,重新启动tomcat服务:
/etc/init.d/tomcat5.5 start
现在,就可以访问http://localhost:8180/manager/html来管理tomcat了,用户名为tomcat,密码为tomcatpassword。
( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0011 | 413192 | {main}( ) | .../index.php:0 |
2 | 0.0915 | 4263112 | Joomla\CMS\Application\SiteApplication->execute( ) | .../index.php:49 |
3 | 0.0915 | 4263112 | Joomla\CMS\Application\SiteApplication->doExecute( ) | .../CMSApplication.php:196 |
4 | 0.3357 | 11454128 | Joomla\CMS\Application\SiteApplication->dispatch( ) | .../SiteApplication.php:233 |
5 | 0.3364 | 11478408 | Joomla\CMS\Component\ComponentHelper::renderComponent( ) | .../SiteApplication.php:194 |
6 | 0.3371 | 11533736 | Joomla\CMS\Component\ComponentHelper::executeComponent( ) | .../ComponentHelper.php:377 |
7 | 0.3379 | 11561136 | require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ) | .../ComponentHelper.php:402 |
8 | 0.3489 | 11960768 | K2ControllerItem->execute( ) | .../k2.php:64 |
9 | 0.3489 | 11960768 | K2ControllerItem->display( ) | .../BaseController.php:710 |
10 | 0.3598 | 12611472 | K2ControllerItem->display( ) | .../item.php:78 |
11 | 0.3598 | 12611472 | K2ControllerItem->display( ) | .../controller.php:19 |
12 | 0.3643 | 12982512 | Joomla\CMS\Cache\Controller\ViewController->get( ) | .../BaseController.php:663 |
13 | 0.3662 | 13002880 | K2ViewItem->display( ) | .../ViewController.php:102 |
14 | 0.4416 | 15829920 | K2ViewItem->display( ) | .../view.html.php:742 |
15 | 0.4416 | 15829920 | K2ViewItem->loadTemplate( ) | .../HtmlView.php:230 |
16 | 0.4437 | 16002856 | include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ) | .../HtmlView.php:701 |
- Published in Debian
- Read 2192 times
( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478 | ||||
---|---|---|---|---|
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0011 | 413192 | {main}( ) | .../index.php:0 |
2 | 0.0915 | 4263112 | Joomla\CMS\Application\SiteApplication->execute( ) | .../index.php:49 |
3 | 0.0915 | 4263112 | Joomla\CMS\Application\SiteApplication->doExecute( ) | .../CMSApplication.php:196 |
4 | 0.3357 | 11454128 | Joomla\CMS\Application\SiteApplication->dispatch( ) | .../SiteApplication.php:233 |
5 | 0.3364 | 11478408 | Joomla\CMS\Component\ComponentHelper::renderComponent( ) | .../SiteApplication.php:194 |
6 | 0.3371 | 11533736 | Joomla\CMS\Component\ComponentHelper::executeComponent( ) | .../ComponentHelper.php:377 |
7 | 0.3379 | 11561136 | require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ) | .../ComponentHelper.php:402 |
8 | 0.3489 | 11960768 | K2ControllerItem->execute( ) | .../k2.php:64 |
9 | 0.3489 | 11960768 | K2ControllerItem->display( ) | .../BaseController.php:710 |
10 | 0.3598 | 12611472 | K2ControllerItem->display( ) | .../item.php:78 |
11 | 0.3598 | 12611472 | K2ControllerItem->display( ) | .../controller.php:19 |
12 | 0.3643 | 12982512 | Joomla\CMS\Cache\Controller\ViewController->get( ) | .../BaseController.php:663 |
13 | 0.3662 | 13002880 | K2ViewItem->display( ) | .../ViewController.php:102 |
14 | 0.4416 | 15829920 | K2ViewItem->display( ) | .../view.html.php:742 |
15 | 0.4416 | 15829920 | K2ViewItem->loadTemplate( ) | .../HtmlView.php:230 |
16 | 0.4437 | 16002856 | include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ) | .../HtmlView.php:701 |