ubuntu server 10.04 搭建JSP环境
来源:互联网 发布:淘宝开店卖什么比较好 编辑:程序博客网 时间:2024/05/20 23:07
sudo apt-get install sun-java6-jdk sun-java6-fonts sun-java6-plugin
可能会先要求装jre,装就是了
sudo update-java-alternatives -s java-6-sun
2 环境变量
sudo vim /etc/environment
加入 JAVA_HOME=/usr/lib/jvm/java-6-openjdk/
PATH改为如下
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-6-openjdk/bin/"
3 安装apache
sudo apt-get install apache2
然后 sudo /etc/init.d/apache2 start/stop/restart 可以进行启动之类的
启动后看看浏览器地址栏输入127.0.0.1看结果
其中/etc/init.d/apache2和/usr/sbin/apachectl 作用是相同的, 只是在/etc/init.d会自动执行
而有任何要改动的设定, 加在/etc/apache2/httpd.conf中
4 安装tomcat
sudo apt-get install tomcat6 tomcat6-common tomcat6-docs tomcat6-examples libtomcat6-java
同样/etc/init.d/tomcat6 start/stop/restart 进行启动
5 mod_jk的安裝
如此一来,apache跟tomcat应该都可以正常运行了,只是两者互不认识,要把他們连在一起还要個mod_jk.
sudo apt-get install libapache2-mod-jk
/usr/lib/apache2/modules/mod_jk.so就是让负责apache将request交给tomcat处理的module.
然后将/usr/share/doc/libapache2-mod-jk/httpd_example_apache2.con内容直接copy到/etc/apache2/httpd.conf,
6 验证
sudo gedit /etc/apache2/httpd.conf
#gedit 吧,你可以直接粘贴到结尾
Alias /examples "/usr/share/tomcat6-examples/examples"
<Directory "/usr/share/tomcat6-examples/examples">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
</Directory>
#/tomcat6-examples/examples 来自 sudo apt-get install tomcat6 tomcat6-examples
重启apache2后浏览器输入http://localhost/examples查看是否成功。
- ubuntu server 10.04 搭建JSP环境
- ubuntu搭建jsp环境
- ubuntu搭建jsp环境
- Ubuntu 搭建JSP 环境
- Ubuntu Server开发环境搭建
- ubuntu pptp server 环境搭建
- Ubuntu-server搭建lamp环境
- Ubuntu Server 16.04 环境搭建
- Ubuntu 7.1 server从无到有搭建jsp/php/rails全能WEB生产环境(一)
- Ubuntu 7.1 server从无到有搭建jsp/php/rails全能WEB生产环境(二)
- Ubuntu 7.1 server从无到有搭建jsp/php/rails全能WEB生产环境(三)
- Ubuntu 7.1 server从无到有搭建jsp/php/rails全能WEB生产环境(四)
- Ubuntu 7.1 server从无到有搭建jsp/php/rails全能WEB生产环境(五)
- Ubuntu 7.1 server从无到有搭建jsp/php/rails全能WEB生产环境(六)
- Ubuntu 7.1 server从无到有搭建jsp/php/rails全能WEB生产环境(七)
- Ubuntu 10.04 LTS(64bit)环境下搭建 SVN SERVER
- Ubuntu 7.04 搭建JSP开发环境
- ubuntu下替换openjdk,搭建jsp环境
- 删除win7 里面的windows.old
- linux驱动开发学习
- Architecture Study(有用的架构实现)
- 基于WINCE6.0+S3C2443的camera驱动
- 图形重叠时的避让问题
- ubuntu server 10.04 搭建JSP环境
- hadoop使用中的几个小细节
- linux与freebsd中tcp协议栈实现之比较
- 位操作(Hacker's Delight)
- [嵌入式]嵌入式应用程序开发模式
- 黑莓偷流量解决办法
- siege 性能测试手记(一)
- 服务器的负载均衡
- 去除wordpress的more标签链接