Wednesday 12 February 2014

apt-get install debian PT1 (Java jdk & Eclipse)


It's been a long time since my last post, more than two months, I apologize but in this months I change company and I do not have so much time to develop my personal project, I swear ASAP I'll restart my Arduino guide.

In my personal "dev machine" until last sunday I have a development environment based on win-xp, and because, as you can probably know, Microsoft cut every support to it in the nexts month I decided to migrating my dev-laptop on linux, and after some advice from some of my linux-enthusiast friends I choose the Debian distribution.

Is important to know that I am a Win power user, and I don't know almost nothing about Linux and his terminal based management, in fact I come from an environment completely different from it, and because I think this is a good challenge for me and useful for someone else I decided to post this worklog about the installation and configuration of my good-old dev-laptop.


This is what I want on my machine:




The Installation of the new OS:

Coming from a win environment, I don't have really clear in my mind what problem can have a open source system. One of this problem is the lack of open source firmware for some of the hardware in my laptop.
For my specific case the missing firmware was for the wifi antenna and for the Ati Radeon.

To retrieve this firmware and driver after the full basic installation, you need first to modify the repository list in /etc/apt/sources.list

To do this, you must first find the repository that you need.
I use the repository list built from http://debgen.simplylinux.ch/ 

After the update of the repository list, I open a terminal (I do it as root, since my user isn't in the sudoer list and sudo command do not work. I'll add my user in the sudoer in the near future, because I do not feel good to be root every time I use apt-get) and type aptitude.





Aptitude is a package manager, and I find it very useful. 

Using some simply shortkeys you can find everything you want inside the repository.


Aptitude shortkeys:
u -> update list
U (shift + u) -> mark upgradable
/ -> find name packet (n -> next result, shift + n -> previous result)
+ -> install this packet
- -> remove this packet
g -> install/remove


After the installation of the missing firmware/driver, you can choose to change GUI of my Debian, for example KDE.
KDE is not the default gui of debian, so you must install it.
From the terminal type: sudo apt-get install kde-full



I choose to maintain the Gnome GUI style, which is the default gui of debian.



Now you have your system ready, all firmware and driver installed and the gui reflect what you want.
It's time to satisfy your first developer needs (no its neither porn nor coffee).

The Installation of the Java Jdk and Eclipse IDE:


As you can read in the Debian wiki, Debian provides several Java implementations. Each of them have a development environment (JDK) and a runtime (known as JRE, or Java Virtual Machines JVM).

Open the terminal and type sudo aptitude  then search ("/") "?provides(java-runtime)" on your system to list available packages.
I choose to install the latest OpenJDK which is based on the java 7, instead of the default jdk proposed by Debian which is based on java 6.

To install Eclipse, since on the repository i found only old and deprecated version, I choose to download directly from the website the Eclipse IDE for Java EE Developers.

Doing this, exactly like in win, you only need to extract the tar.gz file into a directory and run eclipse.
You can also configure your system in a way he can run eclipse from terminal or from the main menu ad you can see here.
Honestly, the procedure to make possible run eclipse from terminal do not work for me, it give me some error either on root or normal user. I'll study the causes in the future.
Instead the method to create a new menu item is work fine.


Yesterday I tried also to download and install tomcat, with not much success.

So next time: Installing Tomcat 7 and configuring it, associate tomcat to Eclipse and configure it.
Ygy Frezoone.



No comments:

Post a Comment