You need to be logged in as root, your machine is connected to the internet, your /etc/apt/sources.list is set up correctly.
My /etc/apt/apt.conf file reads APT::Default-Release "unstable";, so all the following calls to apt-get will try to install the very latest release of the software in question.
It's recommended to run apt-get update to refresh your package list.
In the following directions, the # sign stands for the command prompt (BASH in our case).
All in all, the installations are quite straightforward. On Linux systems other than those based on the Debian distribution these tasks would be a little bit more difficult to achieve, I guess.
Quickstart
To install everything needed (with the exception of JBoss, JBoss IDE and xDoclet), run this:
# apt-get install eclipse-* mysql-server mysqlcc ant junit libmysql-java
Follow each chapter of this tutorial to see how it has to be set up. In case you ran the apt-get install above and downloaded the additional files already, you can skip all apt-get install and wget parts, but keep in mind the places where you saved the files.
There are several options, I think the most reliable is to get it right from Sun.
After the guided installation you should care about the $JAVA_HOME environment variable:
# emacs /etc/profile
Set and export the environment variable JAVA_HOME:
This installs the Eclipse plattform and some add-ons, e.g. eclipse-xerces,
eclipse-webdav-ftp and, if need be, java, libswt etc. This command might install more than actually needed (e.g. eclipse-source). If you just want to install the bare minimum, be more explicit when launching apt-get install.
You might have to answer some simple questions while installing.
To have the same configuration as Patrik, you first create two directories for data and log files:
# mkdir /var/lib/mysql/innodb
# chown mysql /var/lib/mysql/innodb
and
# mkdir /var/log/mysql/innodb
# chown mysql /var/log/mysql/innodb
Then you open the configuration file /etc/mysql/my.cnf, e.g. by typing
# emacs /etc/mysql/my.cnf
Then you delete the line containing skip-innodb and paste the following lines into the section beginning with mysqld:
Then you save that file and exit your editor.
Still being root, you type:
# /etc/init.d/mysql reload
This reads and applies your changes.
Now, we set up a new database called mytest and create a new MySQL user for this database.
First, start the MySQL client:
# mysql -uroot
Now you have a console to the MySQL database. Enter the following statements. Be sure to end them always with a semicolon ;.
CREATE DATABASE mytest;
INSERT INTO mysql.user (host,user,password) VALUES ('localhost', 'jboss', '11223344');
GRANT ALL PRIVILEGES ON mytest.* TO jboss@localhost IDENTIFIED BY '11223344';
GRANT ALL PRIVILEGES ON mytest.* TO jboss@'%' IDENTIFIED BY "11223344";
Try to login to database mytest as user jboss:
# mysql -ujboss -p mytest
Note: mytest here is the database name, not the password. You will be prompted for the password. After giving the password (11223344), you should be logged into the mytest database as the user jboss.
MySQL Control Center
# apt-get install mysqlcc
And you're done with this part.
MySQL Connector/J
This is the Java archive providing the MySQL database connectivity for Java.
# apt-get install libmysql-java
In order to make things work, you need to copy /usr/share/java/mysql-3.0.8.jar (might be a more recent version) to the server/default/lib directory of your Jboss installation. But first things first, here's how to install Jboss:
If the download went right, you'll see a lot of lines rushing by.
When I tried, the last line was:
Server JBoss (MX MicroKernel) [3.2.2 (build: CVSTag=JBoss_3_2_2 date=200310182216)],
Started in 48s:482ms
You should get someting alike.
If you direct your Webbrowser to http://localhost:8080/web-console/, you see the jboss management console. Note that you need to have a java plugin for you browser to use that tool.
In order to compile applications using jboss you need to set the $JBOSS_DIST environment variable.
Proceed as above when we set $JAVA_HOME.
Now you go on configuring jboss. First of all stop it by hitting CTRL-C.
Then open the configuration file:
Now try to launch jboss again - it should still be working. :)
If it does, you can now finish your jboss installation by moving jboss to a better place than /tmp:
# mv /tmp/jboss-3.2.2 /usr/local/jboss
Ant and jUnit
# apt-get install ant junit
xDoclet
# cd /tmp
# mkdir xdoclet
# cd xdoclet
# wget -q -O - \
http://heanet.dl.sourceforge.net/sourceforge/xdoclet/xdoclet-bin-1.2b3.tgz \
| tar zxvf -
# cp -v ./lib/*.jar /usr/share/java/
To test Ecplise:
Become an ordinary user again and run it.
# exit
# eclipse &
Final notes
Enjoy, don't cry if it doesn't work at first try ;)
Note again that these are just some notes taken while setting up Hannes' testing environment. They may very well be both inaccurate and wrong.