现在的位置: 首页 > 综合 > 正文

Eclipse+resin+mysql 安装及环境配置

2018年01月27日 ⁄ 综合 ⁄ 共 5221字 ⁄ 字号 评论关闭

0. 升级windows

1. 安装java开发环境
先从http://java.sun.com下载j2sdk-1_4_2_11-windows-i586-p.exe
安装目录:D:/j2sdk1.4.2_11

设置JAVA_HOME(系统)环境变量:
JAVA_HOME=D:/j2sdk1.4.2_11
设置CLASSPATH(系统)环境变量:
CLASSPATH=.
另外在(系统)环境变量Path的最后加入:
;%JAVA_HOME%/bin

2. 安装tomcat5.0.28
下载文件:jakarta-tomcat-5.0.28.exe
点击此文件,开始安装
配置:
8080
wyts/pass

测试:
在浏览器地址栏内输入:http://localhost:8080/,出现带cat标志的页面。

3. 安装apache及php5
下载如下文件:apache_2.0.58-win32-x86-no_ssl.msi 及 php-5.1.4-Win32.zip
点击apache_2.0.58-win32-x86-no_ssl.msi开始安装
设置server info: wyts.com / 192.168.2.11 / wyb@wyts.com / for all users
安装类型:typical

测试:在浏览器地址栏内输入http://localhost ==> it works

安装php5:
将php-5.1.4-Win32.zip解压缩到d:/php5
编辑环境变量,在path中加入d:/php5
设置系统环境变量PHPRC为d:/php5
复制php.ini-recommended到php.ini
编辑文件php.ini,加入
doc_root = "D:/Program Files/Apache Group/Apache2/htdocs"
找到extension_dir = "./" 改为 extension_dir = "d:/php/ext"
找到
;extension=php_mysql.dll
将';'去掉改为
extension=php_mysql.dll
找到
;session.save_path = "/tmp"
将';'去掉 设置你保存session的目录,如
session.save_path = "D:/php/session_temp";

复制文件php5ts.dll, libmysql.dll到c:/winnt/system32目录下 
<打开Apache2conf文件夹下面的httpd.conf配置文件到最后加入LoadFile c:/php/php5ts.dll //加载php5ts.dll>

复制 php.ini 到winnt目录下

协同apache配置:
编辑D:/Program Files/Apache Group/Apache2/conf/httpd.conf文件
找到 #LoadModule ssl_module modules/mod_ssl.so 这行,在此行后加入一行
LoadModule php5_module "d:/php5/php5apache2.dll"
找到 AddType application/x-gzip .gz .tgz 这行,在此行后加入一行
AddType application/x-httpd-php .php

另外,找到DirectoryIndex修改为

DirectoryIndex index.html index.php

重新启动apache服务

4. 安装mysql
运行setup.exe
选择安装类型:custom
安装目录:d:/MySQL/MySQL Server 5.0/

config mysql server:
instance type: developer machine
multifunctional
tablespace: installation path

default charset: gbk
as windows service(not auto start)

password for root:

5. 安装phpMyAdmin
解压缩文件phpMyAdmin-2.8.0.3.zip到d:/tmp/
移动目录d:/tmp/phpMyAdmin-2.8.0.3到
%DocumentRoot%/phpMyAdmin

phpmyadmin的安装配置

将phpMyAdmin-2.5.7.zip解压到WEB根目录中去,重命名文件夹为phpmyadmin或其它
打开phpmyadmin 目录中的 config.inc.php      <改libraries目录config.default.php>
找到
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'wyts';
分别填上你mysql的用户和密码即可

如不是本地使用,最好加上验证

测试连接:
在浏览器的地址栏内输入http://localhost/phpMyAdmin/,出现管理界面。

增加用户访问限制:………………

下一步,修改目录访问限制:
编辑httpd.conf文件  conf/httpd.conf,加入:
<Directory "C:/sp/phpMyAdmin">
    AuthType Basic
    AuthName "myPhpAdmin for wyts"
    AuthUserFile "D:/Program Files/Apache Group/Apache2/bin/admin.pwd"
    require valid-user
   
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

6. 安装eclipse开发环境
下载eclipse-SDK-3.0.1-win32.zip
解压缩eclipse-SDK-3.0.1-win32.zip文件到d:/eclipse目录

现安装语言包然后再启动eclipse
启动:直接点击d:/eclipse/eclipse.exe,出现IDE界面

插件安装:
emf-sdo-runtime-2.0.1.zip
NLpack-eclipse-SDK-3.0.x-win32.zip
org.objectweb.lomboz_3.0.1.N20050106.zip
tomcatPluginV3.zip
将以上文件解压缩到相应的eclipse的features或plugins目录之下

配置eclipse:

7. 安装resin
http://www.caucho.com/download/下载文件resin-3.0.18.zip到本地
解压缩resin-3.0.18.zip文件到d:/resin-3.0.18
设置系统环境变量RESIN_HOME为:d:/resin-3.0.18
启动resin的httpd
测试连接:
http://localhost:8080/

设置resin与apache协同工作:
运行resin根目录下的setup.exe,选择resin及apache的目录即可完成配置

8. 安装mysql-connector-java-3.1.11-bin.jar
从网上下载mysql-connector-java-3.1.11-bin.jar文件,将其复制到resin的lib目录下

9. 配置resin使用mysql的jdbc来连接MYSQL数据库
编辑resin.conf文件,在相应部分加入:

修改 user password jdbc-driver

10. resin plugin for eclipse 安装

启动eclipse: 帮助->软件更新->查找并安装->搜索要安装的新功能部件->resin 

找到更新站点的url填入,然后自动更新。

Improve Eclipse Resin Plugin
is a free open-source (Common Public License Version 0.5) plugin developed by Improve (http://www.improve-technologies.com).
-------------------------------------------

This plugin has 2 functionnalities:
ResinLauncher: launch resin 2.x or 3.x within eclipse to let you debug jsp or servlet.
ResinProjectWizard: create default webapp directory structure and classpath. You can also convert an existing into a resin project

You must have resin installed to use this plugin (http://www.caucho.com/download/)
This plugin was tested with windows NT4 SP6, jdk 1.4, eclipse F3 , resin 2.1

HOW TO:
First go to Window => Preferences => Resin
Specify your resin home directory
Specify the java compiler (javac) you wish resin to use to compile jsp
You will usually find it under pathTojdk/bin/javac.
You can leave this blank is you launch resin with a jdk instead of a jre.

Create a new Resin project using the resinProjectWizard.

To start resin use the run or debug button(menu) => Run As => Resin launcher. This is it.
point your browser to http://localhost:8080/projectName

or use the run or debug button (or menu) => Run => chose resin => new
There you can chose the config File you want to use to start resin.
If you chose a file that does not exist the plugin will create a simple config file for you.
This config will have a webapp configured for your project. You should be able to access your webapp at
http://localhost:8080/projectName
You can later modify this file as you wish.

By default resin will be launched using the classpath of your eclipse project.
Add the classpath and parameter you might need and hit run or debug.
The plugin add to the paramaters: "-conf pathToYourConfigfile"

call your jsp once to let resin compile it.
refresh your project to find the compiled version of your jsp in WEB-INF/work,
set your break point and call your jsp again to debug.

Generate war file
right click on your project chose resin menu => export to war
this will generate a build.xml file to use with ant.

Convert an existing project into a resin project
right click on your project chose resin menu => convert to resin project

-------------------------------------------
Resin 3

If you get this error when starting resin
"Can't load JNI VFS library.  Resin will still run,"
Follow the instruction for unix, for window the easiest way is to copy resin.dll into the windows/system32 directory

-------------------------------------------

 

抱歉!评论已关闭.