Eddy Ant
Thursday, March 10, 2011
Misc on Ubuntu
sudo apt-get remove --purge apache2 apache2-common apache2-mpm-prefork apache2-utils ssl-cert
sudo apt-get autoremove mysql-server
sudo apt-get install mysql-server
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo apt-get install phpmyadmin
Wednesday, March 9, 2011
My First Ant Project
Add build.xml file.
<project name="FirstAntProject" |
Add helloeddy class.
public class helloeddy {
public static void main(String args[]){
System.out.println("Hello Erdenebat Tsenddorj");
}
}
Result:
Buildfile: /home/erdenebatt/workspace/FirstAntProject/build.xml
clean:
[delete] Deleting directory /home/erdenebatt/workspace/FirstAntProject/build
[delete] Deleting directory /home/erdenebatt/workspace/FirstAntProject/dest
prepare:
[mkdir] Created dir: /home/erdenebatt/workspace/FirstAntProject/build
[mkdir] Created dir: /home/erdenebatt/workspace/FirstAntProject/dest
compile:
[javac] Compiling 1 source file to /home/erdenebatt/workspace/FirstAntProject/build
jar:
[jar] Building jar: /home/erdenebatt/workspace/FirstAntProject/dest/helloeddy.jar
BUILD SUCCESSFUL
Total time: 1 second
Configure Apache Ant & JBoss on Ubuntu 10.10
Download JBoss and unzip.
~$ mv jboss-4.2.3.GA /home/erdenebatt/Apps/jboss
~$ sudo cp /home/erdenebatt/Apps/jboss/bin/jboss_init_redhat.sh /home/erdenebatt/Apps/jboss/bin/jboss_init_ubuntu.sh
~$ sudo gedit /home/erdenebatt/Apps/jboss/bin/jboss_init_ubuntu.sh
#define where jboss is - this is the directory containing directories log, bin, conf etc
JBOSS_HOME=${JBOSS_HOME:-"/home/erdenebatt/Apps/jboss"}
#define the user under which jboss will run, or use 'RUNASIS' to run as the current user
JBOSS_USER=${JBOSS_USER:-"erdenebatt"}
#make sure java is in your path
JAVAPTH=${JAVAPTH:-"/usr/bin"}
#configuration to use, usually one of 'minimal', 'default', 'all'
JBOSS_CONF=${JBOSS_CONF:-"default"}
#if JBOSS_HOST specified, use -b to bind jboss services to that address
JBOSS_BIND_ADDR=${JBOSS_HOST:+"-b 0.0.0.0"}
WARNING: Use JBoss 5.1.0.GA's jboss_init_redhat.sh file !!!
~$ sudo cp /home/erdenebatt/Apps/jboss/bin/jboss_init_ubuntu.sh /etc/init.d/jboss
~$ sudo /etc/init.d/jboss start
~$ sudo update-rc.d jboss defaults
-$ sudo update-rc.d -f jboss remove