2nd try 20.09.2010 on server4you with debian5#
Glashfish 3.0.1
asadmin commands |
Getting Started
Install Paco
Install Java SDK (I took Sun)
paco -lp sun-java6-jdk 'apt-get install sun-java6-jdk'
java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)
Download Glassfish zip
distribution
wget http://download.java.net/glassfish/3.0.1/release/glassfish-3.0.1-ml.zip unzip glassfish-3.0.1-ml.zip apt-get install vim
Start
JAVA_HOME=/usr/lib/jvm/java-6-sun;export JAVA_HOME /markus/glassfishv3/glassfish/bin/startserv & /markus/glassfishv3/glassfish/bin/stopserv &
Test: http://euve10114.vserver.de:8080
Derby#
Derby
(JavaDB) V10.5.3 comes by default with Glassfish V3.0.1You can use the Derby tools
to administer it. Docu
DERBY_HOME=/markus/glassfishv3/javadb;export DERBY_HOME PATH=$PATH:$DERBY_HOME/bin:/markus/glassfishv3/bin;export PATH startNetworkServer & sysinfo ij connect 'jdbc:derby://localhost:1527/test003;create=true'; exit;There is no "show databases;" command like in MySql, but you can see which databases exists under $DERBY_HOME/BIN/.
Tuning#
Edit /markus/glassfishv3/glassfish/domains/domain1/config/domain.xml
Add enabled="false":
<jms-service enabled="false" default-jms-host="default_JMS_host"
type="EMBEDDED">
<jmx-connector port="8686" enabled="false" address="0.0.0.0"
security-enabled="false" name="system"
auth-realm-name="admin-realm" />
Reduce max heap size:
<jvm-options>-Xmx256m</jvm-options>
Rremove ,http-listener-2:
<virtual-server id="server" network-listeners="http-listener-1" />
Memory check#
root@euve10114:/markus/glassfishv3# free -m
total used free
Mem: 6144 2398 3745
Fix pkg#
Install additional packages as described here
1. Create vi vi sources.list
deb http://debian-multimedia.org stable main
2. Execute
apt-get update
3. Execute
apt-get install libidn11 apt-get install lib32nss-mdns apt-get install libnss-mdns apt-get install ia32-libs-libidn11
Remove modules, pkg commands
#
cd /markus/glassfishv3 pkg list pkg uninstall glassfish-full-profile pkg uninstall mq-config-gf pkg uninstall mq-server pkg uninstall mq-locale pkg uninstall mq-bin-exe pkg uninstall mq-bin-sh pkg uninstall mq-core pkg uninstall glassfish-jms-110n... pkg uninstall glassfish-jms-l10n@3.0.1,0-20.1:20100603T144306Z pkg uninstall glassfish-jms mem 2393 pkg uninstall glassfish-jts-l10n pkg uninstall glassfish-web-profile pkg uninstall glassfish-jts pkg uninstall glassfish-jca pkg uninstall glassfish-jta mem 2411 !?!? pkg uninstall glassfish-management pkg uninstall jersey pkg image-update pkg refresh mem 2363 pkg uninstall metro pkg uninstall glassfish-jpa pkg uninstall glassfish-jca-l10n pkg uninstall glassfish-jca mem 2363
Glassfish 3.0.1 Web Profile#
wget http://download.java.net/glassfish/3.0.1/release/glassfish-3.0.1-web-ml.zip unzip /markus/glassfishv3web/glassfishv3/glassfish/bin/startserv & /markus/glassfishv3web/glassfishv3/glassfish/bin/stopserv & mem=2624
Tuning
Add enabled="false":
<jms-service enabled="false" default-jms-host="default_JMS_host"
type="EMBEDDED">
<jmx-connector port="8686" enabled="false" address="0.0.0.0"
security-enabled="false" name="system"
auth-realm-name="admin-realm" />
Reduce max heap size:
<jvm-options>-Xmx256m</jvm-options>
mem=2369
MySql#
Derby/JavaDB uses more than 1GB memory, so I stick with MySql. MySql takes ~130 MB as network server. 1. Install MySql
apt-get install mysql-server
mysql -u root -p<password>
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 33
Server version: 5.0.51a-24+lenny4 (Debian)
2. Install Xinet_proftpd3. Export/Import Databases
4. "homepage" update
mkdir markus/HomepageData cp ??? menu_markus.html adjust gallery: systemDir=/usr/share/tomcat6/webapps/Homepage/gallery, webDir=/Homepage/gallery/
Install JSPWiki#
1. wget http://www.ecyrd.com/~jalkanen/JSPWiki/2.8.4/JSPWiki-2.8.4-bin.zip 2. unzip JSPWiki-2.8.4-bin.zip 3. cp /markus/download/JSPWiki/JSPWiki.war /markus/glassfishv3/glassfish/domains/domain1/applications 4. start tomcat 5. Install: Basis URL with ending backslash !!! http://www.ebel-computing.de/JSPWiki/ 6. mkdir /markus/jspwikiData 7. cp /markus/download/JSPWiki/JSPWiki-corepages_en.zip /markus/jspwikiData 8. cd /markus/jspwikiData 9 unzip JSPWiki-corepages_en.zip 10 enable in webapps/WEB-INF/JSPWiki/jspwiki.properties jspwiki.specialPage.FindPage = Search.jsp 11. mkdir /markus/jspwikiLog
Install Ruby On Rails with Glassfish#
http://blogs.sun.com/arungupta/entry/getting_started_with_edge_rails
wget http://dist.codehaus.org/jruby/jruby-bin-1.1.5.zip
unzip jruby-bin-1.1.5.zip
mkdir tools/jruby
mv jruby-1.1.5 /tools
cd /tools
mv jruby-1.1.5 jruby
PATH=$PATH:/markus/jruby-1.1.5/bin;export PATH
/markus/jruby-1.1.5/bin/jruby -S gem update rake
/markus/jruby-1.1.5/bin/jruby -S gem install rack -v 1.0.0
/markus/jruby-1.1.5/bin/jruby -S gem install rake
/markus/jruby-1.1.5/bin/jruby -S gem install rails -s http://gems.rubyonrails.org
mkdir /markus/rails
cd /markus/rails
/markus/jruby-1.1.5/bin/jruby -S rails helloworld -d mysql
/markus/jruby-1.1.5/bin/jruby -S glassfish helloworld
/markus/jruby-1.1.5/bin/jruby -S gem update --system
RubyGems 1.3.7 installed
RubyGems installed the following executables:
/markus/jruby-1.1.5/bin/jgem
----
cd /markus/rails/helloworld
/markus/jruby-1.1.5/bin/jruby script/generate scaffold runner distance:float time:integer
cd /markus/rails
/markus/glassfishv3/glassfish/bin/asadmin
configure-jruby-container --show=false --jruby-runtime=1 --jruby-runtime-min=1 --jruby-runtime-max=1
configure-jruby-container --jruby-home=/markus/jruby-1.1.5
deploy helloworld/
/markus/jruby-1.1.5/bin/jruby -S gem install activerecord-jdbcmysql-adapter
vi /markus/rails/helloworld/config/database.yml
development:
adapter: jdbcmysql
/markus/jruby-1.1.5/bin/jruby -S gem install glassfish
/markus/jruby-1.1.5/bin/jruby -S gem list --local
*** LOCAL GEMS ***
actionmailer (2.3.3)
actionpack (2.3.3)
activerecord (2.3.3)
activeresource (2.3.3)
activesupport (2.3.3)
rack (1.0.0)
rails (2.3.3)
rake (0.8.7)
Remove
Glassfish Komponenten:
Installierte Komponenten
Auf dieser Seite werden die installierten Komponenten aufgelistet. Um eine beliebige Komponente zu deinstallieren, die Sie nicht mehr benötigen, halten Sie zunächst die Domäne an, und verwenden Sie dann das Dienstprogramm updatetool oder den Befehl pkg.
PATH=$PATH:$DERBY_HOME/bin:/markus/glassfishv3/bin;export PATH
pkg uninstall jruby@1.4.0,0-1.0:20091208T012211Z jruby-gems@2.3.5,0-1.0:20091208T012505Z
/markus/jruby-1.1.5/bin/jruby -S gem list --local |awk '{print $1}' |xargs /markus/jruby-1.1.5/bin/jruby -S gem uninstall
/markus/jruby-1.1.5/bin/jruby -S gem uninstall rake
http://euve10114.vserver.de:8080/helloworld/runners
http://tomhoefer.de/2010/04/16/apache-nginx-glassfish-v3-jruby-rails/
Installation in Ubuntu: JRuby 1.5.3, Ruby on Rails 3.0.0