Isher的学习笔记

平时用到的一些技术积累,可以合成解决方案将放置在www.acnis.com中。

星期三, 十二月 13, 2006

Apache + php+mysql下载地址

这是在我去baidu知道上面,我回答的一个人的问题

这个人问的
Apache 2.0+php5.0.5或5.1.0+mysql5.0下载地址,我觉得这对我的帮助很大,我帮他找了,同时让我找到了很多资源列表,以及快速下载这些自原的地点

apache下载,根据你的操作系统自己选择
http://httpd.apache.org/download.cgi

php 5.05下载
http://cn2.php.net/releases/index.php
5.0.5
Released: 05 Sep 2005
Announcement: None
ChangeLog
Download: Source (tar.gz), Windows binary, Windows installer Collection of PECL modules for PHP 5.0.5

各版本都有
===============================
MYSQL 5.0下载
http://dev.mysql.com/downloads/mysql/5.0.html

爱克尼斯极致网络解决方案中心
http://www.acnis.com/
共享让技术更自由

星期二, 十二月 12, 2006

linux下安装mysql方法

mysql各版本下载
http://dev.mysql.com/downloads/mysql/5.0.html

找tar.gz或tar.gz2的包

此文章为转载,转自地址忘了~~

这里的mysql用的不是standard的版本,用的是src源码版本,名为mysql-5.0.18

标准半本只要tar开即可用,源码版本需要编译以及指定服务器默认编码,因为我要修改编码,所以正好用上~

shell> ./configure --with-charset=CHARSET

CHARSET 可以使下面编码中的一种: `big5', `cp1251', `cp1257', `czech', `danish', `dec8', `dos', `euc_kr', `gb2312', `gbk', `german1', `hebrew', `hp8', `hungarian', `koi8_ru', `koi8_ukr', `latin1',
`latin2', `sjis', `swe7', `tis620', `ujis', `usa7', `win1251ukr'.

默认当前状态为root权限,如果使用其他用户权限,请在每行前面加sudo
安装开始:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip <> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql --with-charset=gb2312
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
(用mysql用户启动很重要。)
shell> bin/mysql -uroot -p
(输入密码,默认密码为空,直接回车即可)
shell> Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
如果出现上面的提示,说明mysql服务没有正常启动,因为mysql服务启动的话,会自动生成mysql.sock文件
shell> killall mysql
杀掉所有mysql进程,重新启动
shell> bin/mysql_install_db --user=mysql
重新启动
shell> bin/mysql -uroot -p

apache2+resin3支持struts和未知扩展名(.do)

让apache+resin支持发布struts架构的程序,以及支持提交未知扩展名和.do的程序的方法,让apache的404页面见鬼去

根据resin和apache的传输模式,和网上类似站点的配置,在resin查到了有关于过滤apache的.do的方案

官方地址:
http://www.caucho.com/resin-3.0/install/plugin-dispatch.xtp#special-servlet-mappings

由于resin站点访问过慢!加上gnome web borrow在保存页面时是从网上再次读取,并非从internet temp中获得页面,所以我就把resin的内容拷贝了下来

When used with another web server, Resin serves JSPs and Servlets and the other web server serves static content like html and images.

The web server plugins (mod_caucho and isapi_srun) have two main tasks:

1. Select urls to dispatch to the Java process
2. Pass the request and retrieve the response from the Java process.

Note: "mod_caucho" is used to mean all the plugins. All of the plugins work the same, so "mod_caucho" is just a shorthand for "mod_caucho and isapi_srun".

1. ResinConfigServer
2. servlet-mapping selects URLs
1. url-pattern
2. url-regexp
3. special servlet-mappings
4.
5.
3. /caucho-status shows mod_caucho's URLs
4. Dispatching using Apache's http.conf

ResinConfigServer

mod_caucho discovers its configuration by contacting the ResinConfigServer specified in the httpd.conf or resin.ini. The ResinConfigServer can be any Resin server. When a user requests a URL, mod_caucho uses the configuration it has determined from the ResinConfigServer to determine whether Resin or Apache should handle the request. That decision is based on the configuration in the ResinConfigServer's resin.conf.

servlet-mapping selects URLs

The servlet-mapping tag selects the URLs to send to Resin. and group the servlet-mapping tags.
url-pattern

servlet-mapping's url-pattern selects the URLs to pass to Resin. servlet-mapping and url-pattern are part of the Servlet 2.3 standard, so there are many references explaining how it works.

url-pattern can take one of four forms:

* "/" matches all URLs. Use this to pass all requests to Resin.
* "/prefix/url/*" matches any URL starting with /prefix/url, including prefix/url itself. It does not match /prefix/urlfoo because any slash must immediately follow url
* "/exact/path" matches only the exact path. In other words, it will not match /exact/path/bogus.
* "*.ext" matches any URL with the extension ext. Resin allows path-infos, so /foo/bar.ext/path/info will also match.

url-regexp

Note: mod_caucho does not understand regular expressions. If you put regular expressions in your resin.conf, mod_caucho will not send the request to Resin. Apache will handle the request itself.

If you want to use regular expressions in servlet-mapping, web-app, or hosts, you must use Apache-specific configuration to send the request to Resin. You can see this by looking at /caucho-status. /caucho-status will not display any regular expressions.
special servlet-mappings

There are two special servlet-names which only affect the plugins: plugin_match and plugin_ignore.

plugin_match will direct a request to Resin. The servlet engine itself will ignore the plugin_match directive. You can use plugin_match to direct an entire subtree to Resin, e.g. to workaround the regexp limitation, but allow Resin's other servlet-mapping directives to control which servlets are used.

plugin_ignore keeps the request at on the web server. So you could create a directory /static where all documents, including JSPs are served by the web server.


servlet-name='plugin_match'/>


servlet-name='plugin_ignore'/>



web-apps collect servlets and JSP files into separate applications. All the servlet-mappings in a web-app apply only to the URL suffix.

In the following example, every URL starting with /prefix/url maps to the web-app. The servlet-mapping only applies to URLs matching the prefix.

...



..

In the exaple, mod_caucho will match any URL matching /prefix/url/*.foo. /prefix/url/bar.foo will match, but /test/bar.foo will not match.

Note: Resin standalone allows a regexp attribute instead of an id. Because mod_caucho does not understand regexps, it will ignore any web-app with a regexp attribute.

Note: web.xml files and war files are treated exactly the same as web-apps in the resin.conf.


host blocks configure virtual hosts . There's a bit of extra work for virtual hosts that we'll ignore here. (Basically, you need to add Apache ServerName directives so Resin knows the name of the virtual host.)

For dispatching, a host block gathers a set of web-apps. Each host will match a different set of URLs, depending on the web-app configuration. The default host matches any host not matched by a specific rule.

As usual, /caucho-status will show the URLs matched for each host.

Note: mod_caucho does not understand the host regexp attribute. It will ignore all hosts using regexp. To get around this, you can either configure Apache directly (see below), or configure the default host with the same set of servlet-mappings. Since mod_caucho will use the default host if no others match, it will send the right requests to Resin.

/caucho-status shows mod_caucho's URLs

The special URL /caucho-status is invaluable in debugging Resin configurations. /caucho-status displays all the resin.conf patterns, so you can easily scan it to see which URLs mod_caucho is sending to Resin and which ones are handled by Apache.

Dispatching using Apache's http.conf

You can configure Apache directly, instead of letting mod_caucho dispatch from the resin.conf file. If you use this method, you need to make sure you match the Apache configuration with the Resin configuration.

Note: This technique uses Apache-specific features, so it's not directly applicable to IIS or iPlanet.

Apache's Location and SetHandler directives send requests to Resin. The mod_caucho handler is caucho-request.

httpd.conf

LoadModule caucho_module libexec/mod_caucho.so
AddModule mod_caucho.c

CauchoHost localhost 6802
AddHandler caucho-request jsp

SetHandler caucho-request


Because Apache's SetHandler is external to mod_caucho, /caucho-status will not show any SetHandler dispatching.


依照以上文章,在apache的conf文件内,过滤内容为所有servlet目录下的所有内容全部题交给resin,那我们可以具体定义我们要过滤的内容,如下

AddHandler caucho-request jsp

SetHandler caucho-request

如果这样定义,证明在resin发布的/(根)目录,所有的.do的文件都将会题交给resin。这样就做到了让resin去处理而不会在出现404 apache找不到页面的问题了

星期一, 十二月 11, 2006

找一个过时的linux下的weblogic还真不容易

1个月前还在emule上找到了weblogic8.12_linux.bin 现在几乎在weblogic上找不到任何linux版本8.x的源,郁闷,风康搜google都找不到,迫不得已去了baidu的知道,还算是搜索到了,谢天谢地

http://commerce.bea.com/showallversions.jsp?family=WLS
从社区进入,选择上面的download,选择你要下载的软件,然后选择 All Versions 不是没有,就是提供net install 瘋了

platform平台 & Server服务器
8.X
英文版
http://download2.bea.com/pub/platform/81/platform815_win32.exe
http://download2.bea.com/pub/platform/81/platform815_linux32.bin (linux)
中文版
http://download2.bea.com/pub/platform/81/platform812_zh_CN_win32.exe
http://download2.bea.com/pub/platform/81/platform813_zh_CN_linux32.bin
http://download2.bea.com/pub/platform/81/platform814_zh_CN_win32.exe
http://download2.bea.com/pub/platform/81/platform815_zh_CN_win32.exe
http://download2.bea.com/pub/platform/81/platform815_zh_CN_hpux32.bin (hp_unix)

9.X
英文版
http://download2.bea.com/pub/platform/90/server900_win32.exe
http://download2.bea.com/pub/platform/90/server900_linux32.bin
http://download2.bea.com/pub/platform/90/server900_hpux32.bin (hpux)
http://download2.bea.com/pub/platform/90/server900_solaris32.bin (solaris)
http://download2.bea.com/pub/platform/91/server910_win32.exe
http://download2.bea.com/pub/platform/91/server910_linux32.bin (linux)
http://download2.bea.com/pub/platform/91/server910_hpux32.bin (hpux)
http://download2.bea.com/pub/platform/91/server910_solaris32.bin (solaris)
中文版
http://download2.bea.com/pub/platform/90/server900_zh_CN_win32.exe
http://download2.bea.com/pub/platform/90/server900_zh_CN_linux32.bin (hp_uxix)
http://download2.bea.com/pub/platform/90/server900_zh_CN_hpux32.bin (hp_uxix)
http://download2.bea.com/pub/platform/90/server900_zh_CN_solaris32.bin (Solaris(8\9\10)版)
http://download2.bea.com/pub/platform/90/server910_zh_CN_win32.exe
http://download2.bea.com/pub/platform/90/server910_zh_CN_linux32.bin (linux32)
http://download2.bea.com/pub/platform/90/server910_zh_CN_hpux32.bin (hp_uxix)
http://download2.bea.com/pub/platform/90/server910_zh_CN_solaris32.bin (Solaris(8\9\10)版)

==============需要注册的下载==========
1.在哪里下得着中文版的
http://commerce.bea.com/index.jsp
进去后,点击
International
Versions
然后就会到
http://commerce.bea.com/products/intl_versions.jsp
再选简体中文就OK了。
2.下载所有英文版本地址:
http://commerce.bea.com/showallversions.jsp?family=WLP
3.下载所有中文版本地址:
http://commerce.bea.com/showallversions.jsp?family=WLPCH

直接下载wls的地址,可以用flashget等多线程工具来下:
windows版:
http://download2.bea.com/pub/platform/90/server900_win32.exe
http://download2.bea.com/pub/platform/90/server900_zh_CN_win32.exe
http://download2.bea.com/pub/platform/81/platform815_win32.exe
http://download2.bea.com/pub/platform/81/platform814_zh_CN_win32.exe
http://download2.bea.com/pub/platform/81/platform812_zh_CN_win32.exe
linux版:
http://download2.bea.com/pub/platform/81/platform815_linux32.bin
http://download2.bea.com/pub/platform/90/server900_linux32.bin

8.15中文版
下载地址:
windows版:
http://download2.bea.com/pub/platform/81/platform815_zh_CN_win32.exe
hp_unix版:
http://download2.bea.com/pub/platform/81/platform815_zh_CN_hpux32.bin
Linux版:(暂无)
详细请访问:
http://commerce.bea.com/showallversions.jsp?family=WLPCH


hp_ux版 http://download2.bea.com/pub/platform/90/server900_zh_CN_hpux32.bin
Sun Solaris(8\9\10)版 http://download2.bea.com/pub/platform/90/server900_zh_CN_solaris32.bin

weblogic server 9.1下载:
http://download2.bea.com/pub/platform/91/server910_win32.exe
http://download2.bea.com/pub/platform/91/server910_linux32.bin
http://download2.bea.com/pub/platform/91/server910_hpux32.bin
http://download2.bea.com/pub/platform/91/server910_solaris32.bin

http://download2.bea.com/pub/platform/91/server910_zh_CN_win32.exe
http://download2.bea.com/pub/platform/91/server910_zh_CN_linux32.bin
http://download2.bea.com/pub/platform/91/server910_zh_CN_hpux32.bin
http://download2.bea.com/pub/platform/91/server910_zh_CN_solaris32.bin


WebLogic Platform 8.1 永不过期的开发版license
下载地址为:

http://dev2dev.bea.com.cn/bbs/servlet/D2DServlet/download/81-8992-44196-240/license.bea

使用方式:

替换c:\bea目录下的这个文件,这样就可以使WebLogic Platform用不过期

原文地址:

http://dev2dev.bea.com.cn/bbs/thread.jspa?forumID=81&threadID=8992&tstart=0&quint=true

星期四, 十二月 07, 2006

ubuntu下安装weblogic9.1 配置及注意

1、必须使用当前文件所有者权限的xwindows安装,否则自动默认在命令行模式安装
2、安装后默认用户名密码均为 weblogic
3、创建新域
使用方法一, /server/weblogic/weblogic91/common/bin/quickstart.sh
Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
Unable to create graphical environment for QuickStartFrame.
Please use a console that supports a Java based GUI.

查询bea论坛得到解决方法,对于weblogic9.1未成功,方法如下
java -jar /opt/bea/weblogic81/common/lib/config.jar -mode=console
(从以上命令看到此方法在weblogic8.1上是可行的,9.1至此没有彻底测试)


使用方法二,/server/weblogic/weblogic91/common/bin/config.sh
1、Create a new Weblogic domain
2,Choose Weblogic Platform components
3,enter
4,配置新的域的信息,一个类似表格的东东,输入1-3,按回车
5,选择开发模式还是程序模式
6,选择使用那种java环境,如果本机装了,可以采用3,然后输入本地的jvm路径
我用了apt-get install jdkxxx安装了jdk1.5.06(08其实已经出了很久了~)
你可以在/usr/lib/jvm/java-1.5.0-sun的link文件以及java文件夹,确定后我们把路径填写在 "JVM Directory"=里面
7,定制作为默认的样例,默认是否
8,Select the target domain directory for this domain: 如果按回车默认当前显示路径,你也可以输入新的路径
/server/weblogic/user_projects/whaty
9,输入域的名字:whatydemo 确认后会提示你更改和重新输入,继续按回车即可进入配制过程。

完成

ok,现在去
weblogic@isher-ubuntu:/server/weblogic/user_projects/下看看,可以看到
weblogic@isher-ubuntu:/server/weblogic/user_projects/whaty/whatydemo$ 路径满足,新的域已经创建