LittleCloud's Java World

          Live and learn.
          posts - 18, comments - 29, trackbacks - 0, articles - 1
            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

          運行環境:
          Windows XP, ActivePerl-5.8.8.817-MSWin32-x86-257965.msi

          安裝完畢,
          用記事本打開apache的httpd.conf文件,
          1.搜索cgi-bin,找到ScriptAlias /cgi-bin/
          改成
           ScriptAlias /cgi-bin/ "F:/Apache2/cgi-bin/"
          ,這是存放cgi文件的路徑
          2. 搜索AddHandler  找到AddHandler  cgi-script .cgi ,這是定義可執行cgi文件擴展名,可以把.cgi 改為 .pl 或加上”, .pl” ,成為“AddHandler cgi-script .pl ,.cgi“這樣兩個后綴都可以用了。
          3.更改Options、Allow Override的參數為All。
          改完之后象這樣:
          #
          "F:/Apache2/cgi-bin" should be changed to whatever your ScriptAliased
          # CGI directory exists
          , if you have that configured.
          #
          <Directory 
          "F:/Apache2/cgi-bin">
              AllowOverride All
              Options All
              Order allow
          ,deny
              Allow from all
          </Directory>
           4.建立文件 test.pl , 內容如下:

          #!d:/Perl/bin/perl 
          #
          #   寫成!d:/Perl/bin/perl.exe也可以
          #
          # 注意,如果沒有第一行或寫錯,apache找不到perl解釋器
          #
          # ,會出現500 Internal Server
           
          print "Content-type:text/html\n\n";
          print "CGI執行成功!";

          在F:\phpweb目錄下,建立一個html文件,內容如下:
          <a 5. 重新啟動apache server,然后在瀏覽器打開這個文件,提示 “CGI執行成功!”

          posted @ 2008-02-29 17:57 walkingpig 閱讀(722) | 評論 (0)編輯 收藏

          上一篇windowsxp 下安裝php是為了安裝TestLink而配的,
          TestLink的安裝有兩種方式,一是自動安裝,二是手工安裝的方式。
          我用的是自動安裝

          在上篇配置好的php環境下,按如下步驟安裝TestLink

          1.將TestLink文件夾拷貝到F:\phpweb目錄下。
          2.在瀏覽器輸入訪問地址http://168.68.73.97/testlink/
          若沒有安裝就會自動跳到http://168.68.73.97/testlink/install/index.php安裝頁
          3.選擇new install,在進入的頁面中,輸入登錄MySQL的用戶名和密碼,如root,如果沒有為TestLink新建一個專用的用戶,也可以輸入初始用戶root。但是因為root權限過多,所以,建議為TestLink新建專用的用戶,并為該用戶賦予ALTER、SELECT、INSERT、UPDATE、INDEX、CREATE、DELETE和DROP權限。
          3.提示安裝成功。系統為testlink創建一個默認管理員賬號,用戶名和密碼為:admin/admin。你可以使用這個賬號訪問TestLink

          在自動安裝過程中,安裝程序主要做了以下事情:
          1.檢查web server的參數、php配置、數據庫版本
          2.創建數據庫和表,并導入初始數據
          3.完成安裝

          posted @ 2008-02-29 17:17 walkingpig 閱讀(797) | 評論 (0)編輯 收藏

          我是第一次在xp下配置php
          在網上找了很多資料,按照上面的一步步配,總會在半路出現一些問題,
          以下是我綜合幾個網友的資料配置成功的步驟:

          操作系統:windows xp
          apache_2.2.6-win32-x86-no_ssl.msi  
          http://apache.mirror.phpchina.com/httpd/binaries/win32/apache_2.2.6-win32-x86-openssl-0.9.8e.msi
          php-5.2.5-win32-installer.msi 
          http://cn2.php.net/distributions/php-5.2.5-win32-installer.msi
          PHP 5.2.5 zip package
          http://cn.php.net/get/php-5.2.5-Win32.zip/from/cn2.php.net/mirror(這里面有需要的dll文件)
          mysql-5.0.22-win32_Setup.exe
          http://www.mysql.com/

          開始安裝

          一、安裝Apache2.2.6

          1 運行安裝程序 圖1

           

           

          2 下一步,圖2 安裝協議

           


          3 下一步,圖3 Apache HTTP Server的一些說明

           


          4 下一步,圖4 填寫服務信息

          Network Domain 域名 ,這里填寫 localhostServer Name 服務器名,這里填寫 localhost

          Administrator‘s Email Address 管理員郵箱

           

           

           

          5 安裝類型

          選擇自定義安裝 Custom,圖5

           

           

          6 自定義安裝設置,圖6

           

           

          修改安裝目錄,這里我把目錄修改到F:\Apache2\圖7

           

           

          7 安裝確認,圖8

           

           

          8 開始安裝,圖9

           

           

          安裝最后會出現幾個命令行窗口。

          9 安裝完畢,圖10

           

           

          10 右下角出現圖標,圖11

           

           

          11 雙擊顯示服務器監控信息,圖12

           

           

          12 測試,圖13

          在瀏覽器地址欄輸入 http://localhost,回車顯示 “It works!”。

          如圖,表示安裝成功了!

           

           

          這樣 Apache就安裝完畢了。

          二、安裝PHP5.2.5

          1 拷貝需要的組件

          解壓php-5.2.5-Win32.zip到“G:/PHPTemp”。這里主要是拷貝一些以后需要的組件。

          2 運行安裝程序php-5.2.5-win32-installer.msi

           

           

          3 接受 安裝協議

           

           

          4 選擇安裝目錄,

          選定目錄.我設置的是F:\php\

           

           

          5 選擇服務器設置

           

           

          6 選擇Apache配置文件目錄,按我之前的配置,這里我選的是F:\Apache2\

           

           

          7 安裝設置

           

           

          8 準備安裝

           

           

          9 安裝完畢

           

           

          10 從G:/PHPTemp拷貝libmysql.dll及ext文件夾到F:/PHP
          并在F:/PHP/php.ini中修改成
          ;;;;;;;;;;;;;;;;;;;;;;
          ; Dynamic Extensions ;
          ;;;;;;;;;;;;;;;;;;;;;;
          ;
          ; If you wish to have an extension loaded automatically, use the following
          ; syntax:
          ;
          ;   extension=modulename.extension
          ;
          ; For example, on Windows:
          ;
          ;  extension=msql.dll
             extension=php_mysql.dll
             extension=php_mysqli.dll
          ;
          ; ... or under UNIX:

          將F:/PHP/php.ini文件拷貝到C:\WINDOWS目錄下
          將F:/PHP/libmysql.dll文件拷貝到 C:\WINDOWS\system32目錄下
          將F:/PHP/ext/php_mysql.dll 文件拷貝到 C:\WINDOWS\system32目錄下
          將F:/PHP/ext/php_mysqli.dll文件拷貝到 C:\WINDOWS\system32目錄下

          11 對Apache進行設置

           在F:\下建立phpweb子目錄,即“F:/phpweb”目錄。

          修改目錄F:\Apache2\conf下的文件“ httpd.conf”。

          搜索DocumentRoot "F:/Apache2/htdocs"把冒號中的F:/Apache2/htdocs,替換成“F:/phpweb";

          搜索<Directory "F:/Apache2/htdocs"> 把冒號中的F:/Apache2/htdocs,替換成“F:/phpweb";

          上面這兩行可以不改,那么以后添加的論壇程序就要放在f:/Apache2/htdocs下面,就是以這個目錄作為根目錄。改的目的就是不想把所有網站程序都放在Apache的目錄下面。

          搜索DirectoryIndex index.html 增加為DirectoryIndex index.html index.php

          上面這句為了能夠運行缺省的頁面,這里增加了 index.php作為缺省頁面。

          修改完畢,保存,并重新啟動Apache服務器,也許會啟動不成功,這時要不按Ctrl+Alt+Del刪除Apache相關程序,要不重新啟動計算機。

          12 測試

          在“f:/phpweb”目錄中,創建文件 test.php

           

          <html>
          <
          head
          >
            <
          title>PHP Tes</title
          >
          </
          head
          >
          <
          body
          >
          <?
          php echo "<p>Hello World</p>"; 
          ?>
          </
          body
          >
          </
          html>

           在瀏覽器地址欄中輸入 http://localhost/test.php,顯示如下,

           

          顯示:
          Hello World

          那么你安裝Apache和PHP成功了。

          posted @ 2008-02-29 16:54 walkingpig 閱讀(500) | 評論 (0)編輯 收藏

          最近網站總是打開太慢,到后來干脆就不能打開了,

          進到服務器重啟tomcat服務時,竟然報了jvm內存設置太大

          ps一看,發現了很多mysqld進程,

          占內存,也占了很多CPU,

          我是用的二進制包安裝的mysql,網上一查,有很多朋友說,這屬正常,

          可我擔心過幾天服務器還會出現同樣的問題,怎么辦

          posted @ 2008-02-28 17:21 walkingpig 閱讀(378) | 評論 (0)編輯 收藏

          看了apache+iis+tomcat可以讓asp,jsp同時跑,
          不知道再加個.net,php,cgi的項目站點,
          又該怎么配置呢?

          posted @ 2008-02-27 09:26 walkingpig 閱讀(636) | 評論 (1)編輯 收藏

          ${sessionScope.user}

          這是我在<sturts2權威指南>里看見的語法

          說是jsp2.0的語法, 我用jsp這么久怎么不知道有這樣的語法?
          難道jsp1升級到jsp2后,語法也有改變嗎?
          sturts1升級到struts2后就有很大不同,
          版本升級這么快,感覺自己要是不勤加學習,真的太容易被淘汰掉了.

          posted @ 2008-02-22 11:26 walkingpig 閱讀(382) | 評論 (4)編輯 收藏

          現在還處于自學struts2階段,所以很多文章都是從網上轉了網友的, 呵呵,
          看見好的文章就想自己收藏一份,以備忘.

          原文出處:http://bbs.8isp.cn/simple/index.php?t1002.html

          struts.action.extension
                The URL extension to use to determine if the request is meant for a Struts action
                用URL擴展名來確定是否這個請求是被用作Struts action,其實也就是設置 action的后綴,例如login.do的'do'字。

          struts.configuration
                The org.apache.struts2.config.Configuration implementation class
                  org.apache.struts2.config.Configuration接口名

          struts.configuration.files
                A list of configuration files automatically loaded by Struts
                struts自動加載的一個配置文件列表

          struts.configuration.xml.reload
                Whether to reload the XML configuration or not
                是否加載xml配置(true,false)

          struts.continuations.package
                The package containing actions that use Rife continuations
                含有actions的完整連續的package名稱

          struts.custom.i18n.resources
                Location of additional localization properties files to load
                加載附加的國際化屬性文件(不包含.properties后綴)

          struts.custom.properties
                Location of additional configuration properties files to load
                加載附加的配置文件的位置


          struts.devMode
                Whether Struts is in development mode or not
                是否為struts開發模式

          struts.dispatcher.parametersWorkaround
                Whether to use a Servlet request parameter workaround necessary for some versions of WebLogic
                  (某些版本的weblogic專用)是否使用一個servlet請求參數工作區(PARAMETERSWORKAROUND)

          struts.enable.DynamicMethodInvocation
                Allows one to disable dynamic method invocation from the URL
                  允許動態方法調用

          struts.freemarker.manager.classname
                The org.apache.struts2.views.freemarker.FreemarkerManager implementation class
                org.apache.struts2.views.freemarker.FreemarkerManager接口名

          struts.i18n.encoding
                The encoding to use for localization messages
                國際化信息內碼

          struts.i18n.reload
                Whether the localization messages should automatically be reloaded
                是否國際化信息自動加載

          struts.locale
                The default locale for the Struts application
                默認的國際化地區信息

          struts.mapper.class
                The org.apache.struts2.dispatcher.mapper.ActionMapper implementation class
                  org.apache.struts2.dispatcher.mapper.ActionMapper接口

          struts.multipart.maxSize
                The maximize size of a multipart request (file upload)
                multipart請求信息的最大尺寸(文件上傳用)

          struts.multipart.parser
                The org.apache.struts2.dispatcher.multipart.
                MultiPartRequest parser implementation for a multipart request (file upload)
                專為multipart請求信息使用的org.apache.struts2.dispatcher.multipart.MultiPartRequest解析器接口(文件上傳用)


          struts.multipart.saveDir
                The directory to use for storing uploaded files
                設置存儲上傳文件的目錄夾

          struts.objectFactory
                The com.opensymphony.xwork2.ObjectFactory implementation class
                com.opensymphony.xwork2.ObjectFactory接口(spring)

          struts.objectFactory.spring.autoWire
                Whether Spring should autoWire or not
                是否自動綁定Spring

          struts.objectFactory.spring.useClassCache
                Whether Spring should use its class cache or not
                是否spring應該使用自身的cache

          struts.objectTypeDeterminer
                The com.opensymphony.xwork2.util.ObjectTypeDeterminer implementation class
                  com.opensymphony.xwork2.util.ObjectTypeDeterminer接口

          struts.serve.static.browserCache
          If static content served by the Struts filter should set browser caching header properties or not
                是否struts過濾器中提供的靜態內容應該被瀏覽器緩存在頭部屬性中

          struts.serve.static
                Whether the Struts filter should serve static content or not
                是否struts過濾器應該提供靜態內容

          struts.tag.altSyntax
                Whether to use the alterative syntax for the tags or not
                是否可以用替代的語法替代tags

          struts.ui.templateDir
                The directory containing UI templates
                UI templates的目錄夾

          struts.ui.theme
                The default UI template theme
                默認的UI template主題

          struts.url.http.port
                The HTTP port used by Struts URLs
                設置http端口

          struts.url.https.port
                The HTTPS port used by Struts URLs
                設置https端口

          struts.url.includeParams
                The default includeParams method to generate Struts URLs
                在url中產生 默認的includeParams


          struts.velocity.configfile
                The Velocity configuration file path
                velocity配置文件路徑

          struts.velocity.contexts
                List of Velocity context names
                velocity的context列表


          struts.velocity.manager.classname
                org.apache.struts2.views.velocity.VelocityManager implementation class
                org.apache.struts2.views.velocity.VelocityManager接口名

          struts.velocity.toolboxlocation
                The location of the Velocity toolbox
                velocity工具盒的位置
          struts.xslt.nocache
                Whether or not XSLT templates should not be cached
                是否XSLT模版應該被緩存

          posted @ 2008-02-22 10:33 walkingpig 閱讀(354) | 評論 (0)編輯 收藏

               摘要: 這篇文章是從網友http://www.aygfsteel.com/sterning/archive/2007/09/30/149775.html轉來的, 他真是一位大好人,雖然在別的網站有很多轉走的這篇文章,但我也想在自己的BLOG上再轉一次, 理由很簡單,想自己收藏一份,感謝原創sterning Struts作為MVC 2的Web框架,自推出以來不斷受到開發者的追捧,得到廣泛的應用。作為...  閱讀全文

          posted @ 2008-02-21 15:59 walkingpig 閱讀(3041) | 評論 (4)編輯 收藏

          從前一直用的jsp+javabean,這種模式寫東西
          開發工具方面通常jsp用dreamweaver, java源程序就用eclipse3.2
          服務器,像tomcat,apache也是單獨配置,數據庫mysql也是一樣,單獨配置的.
          感覺很容易,就是要配置的東西比較多.但卻很少出錯,
          就算出了錯,也會知道是哪個環節出錯了,這樣就容易解決得多.

          現在即將有一個大點的項目,要求最好用struts做,
          之前也做過struts1的例子, 就單獨struts不加spring,hibernate等,布置起來也覺得容易,
          于是想著要配置一個struts+spring+hinernate環境來做開發,一開始想到的是將版本升級,
          沒想到后來看了struts1與struts2還不是同一個東西,并非版本上的升級.
          這些天翻了很多struts1與struts2,主要是struts2的資料看,看起來,這是一個很不錯的東西,
          于是便下定心用struts2+spring2+hibernate3來做這個項目,
          立馬在網上搜取這方面資料,還有實例,邊看邊配置,

          沒想到,讓人頭痛的是,重配了N次實例,我配出來的工程,最后一發布,總是404錯誤,
          用的myeclipse6,就是不知道哪出錯了,所有東西都集成在一起,不知道往哪查錯.
          現在腦袋快冒煙了, 不知道有沒有朋友,有好的學習struts2的好辦法?
          請指點一下吧

          posted @ 2008-02-20 14:34 walkingpig 閱讀(412) | 評論 (2)編輯 收藏

          僅列出標題
          共2頁: 上一頁 1 2 
          主站蜘蛛池模板: 呼图壁县| 东台市| 六安市| 永丰县| 湟源县| 贡嘎县| 通州区| 新兴县| 岳普湖县| 莫力| 诸暨市| 阿克| 罗山县| 岳阳县| 保康县| 仙桃市| 文成县| 宝山区| 锡林浩特市| 密云县| 饶阳县| 霍林郭勒市| 宝应县| 安康市| 高唐县| 黄平县| 靖宇县| 拉孜县| 景洪市| 金华市| 凭祥市| 南江县| 盘锦市| 稷山县| 启东市| 桑植县| 台前县| 宜章县| 诸城市| 拜城县| 舟山市|