Thursday, February 24, 2011

Installing maven

Installing maven by using mvn.

go to the default workstation for you eclipse then type:

mvn archetype:generate -DgroupId=com.dynamicobjx -DartifactId=MyWebApp -Dversion=1.0-SNAPSHOT -DarchetypeArtifactId=maven-archetype-webapp

create src/main/java folder inside the MyWebApp using mkdir /src/main/java

mvn eclipse:eclipse to make it an eclipse project.

create 2 tomcat user using nano /usr/share/tomcat6/conf/tomcat-users.xml

admin - "" - tomcat,manager
tomcat - tomcat - tomcat, manager

mvn tomcat:deploy

mvn clean tomcat:redeploy - to redeploy project

mvn dependency:resolve eclipse:eclipse - you add a dependency in pom.xml

Sunday, February 13, 2011

Installing OpenOffice in Fedora 14 BOX (32bit)

1. Download OpenOffice.org using this code:
wget http://download.services.openoffice.org/files/stable/3.2.1/OOo_3.2.1_Linux_x86_install-rpm-wJRE_en-US.tar.gz

Note: if wget is not install terminal will prompt it for installation.

2. Change into root user by:
su -

3. Remove Old OpenOffice.org to prevent conflict by:
yum remove openoffice.org*

4. Extract the Package by using this code:
tar -xvf /path/OOo_3.2.1_*
where path is the location of the .tar.gz

5. After extract, access the extracted folder by:
cd OOO320_m18_native_packed-1_en-US.9502

6. Install or Update OpenOffice.org RPM packages by:
rpm -Uvh RPMS/*.rpm RPMS/desktop-integration/openoffice.org3.2-redhat-menus-3.2-*.rpm

or

./setup
Then a GUI wizard will be shown.

Installing VLC


Saturday, February 12, 2011

Installing Tomcat in Fedora



Installing Tomcat in Fedora

1. Download Tomcat in in their website http://tomcat.apache.org.

2. Then extract the file in the /opt folder by using this code:

tar -zxvf /path/apache-tomcat-7.0.8.tar.gz -C /opt

3. After that, start apache using this:
cd /opt
cd apache-*
cd bin
./startup.sh

Friday, February 11, 2011

Installing Eclipse on Fedora


Requirements: Your box must have Sun Java installed in it.

1. Download Eclipse SDK in www.eclipse.org/downloads.

2. Change to root user by: sudo -i

3. Extract Eclipse package to /opt directory using this code:
tar -xvzf /path/eclipse-java-helios-SR1-linux-gtk.tar.gz -C /opt
where path = the location of the .gz

4. Add read permissions to all files where the file is extracted by:
chmod -R +r /opt/eclipse

5. Create Eclipse Executable on /usr/bin path by:
touch /usr/bin/eclipse

chmod 755 /usr/bin/eclipse

6. Then edit the created file by using nano editor:
nano -w /usr/bin/eclipse

and appended this code:
export ECLIPSE_HOME="/opt/eclipse"

$ECLIPSE_HOME/eclipse $*

7. Create Gnome desktop launcher by:
nano -w /usr/share/applications/eclipse.desktop

then add this content to file and save:
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse SDK 3.6.1
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true

Note: If you get an error like:
Failed to Load the JNI shared library.....
OR
/usr/java/jdk1.6.0_21/.....:Permission denied

Then do following command:
chcon -t execmeem_exec_t '/opt/eclipse/eclipse'

and try again.


installing vlc in Fedora

1. Open Terminal.

2. Change User into root using the command: su - then enter the password of the root user.

3. Type in rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm

4. After that, type in yum install vlc. If it ask a question press y and enter. (This step may take long, depends on your internet connection)

5. you can also install vlc plugin in firefox using: yum install mozilla-vlc

Fedora 14 and Windows Network (SAMBA)


Fedora 14 and Windows Network (SAMBA)


1. Install Samba
  • use add/remove software gui then search and install samba-3.5.6-69.fc14

2. Install samba server configuration tool

3. after installing, go to system->adinistration->samba

4. Then select ´Preference->Server Settings´

5. Enter the workgroup of the windows network you want to connect in the WorkGroup Textbox.

6. Then Select Preferences->Samba Users, Click Add User and add the users you want accessing shares on the Fedora machine.

7. Access the Firewall, System->Administration->Firewall. After that, Enable Samba and Samba Client under Trusted Services.

8. Then Select ICMP Filter and enble Echo Reply and Echo Request then Apply.

9. If youŕe done, go to Application->SYstem Tools->Terminal and run: su -c ´chkconfig smb on´. after that restart both machine.


Installing Java in Fedora


Installing Java in Fedora

I need to install java in Fedora for me to learn java development in linux base environment. Here is the step:

1. First download a version of Java you will like to install in this website. Here is choose Java SE Development Kit 6 and Java SE Runtime Environment 6.

Note: select the rpm.bin package not .rpm.

2. Open Terminal then change to root user by:

su -

then type on the password of root

3. Run Sun JDK binary by using:

sh /path/jdk-6u23-linux-*-rpm.bin

where path = the location of the binary
note: Use full file name (without asterisk) if you have both i586 and x64 versions downloaded.
note: if you wish to register you can.

4. Run Sun Java Jre Binary by using:

sh /path/jre-6u23-linux-*-rpm.bin

where path = the location of the binary
note: Use full file name(without asterisk if you have both i586 and x64 versions downloaded.

5. Install Sun JDK java, javaws, libjavaplygin.so and javac using alternatives -install command:

## java ##
alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_23/jre/bin/java 20000
## javaws (32-bit only) ##
alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.6.0_23/jre/bin/javaws 20000

## Java Browser (Mozilla) Plugin 32-bit ##
alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/jdk1.6.0_23/jre/lib/i386/libnpjp2.so 20000

## Java Browser (Mozilla) Plugin 64-bit ##
alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/jdk1.6.0_23/jre/lib/amd64/libnpjp2.so 20000

## Install javac only if you installed JDK (Java Development Kit) package ##
alternatives --install /usr/bin/javac javac /usr/java/jdk1.6.0_23/bin/javac 20000

6. Install Sun java, javaws and libjavaplugin.so using alternatives -install command:

## java ##
alternatives --install /usr/bin/java java /usr/java/jre1.6.0_23/bin/java 20000

## javaws (32-bit only) ##
alternatives --install /usr/bin/javaws javaws /usr/java/jre1.6.0_23/bin/javaws 20000

## Java Browser (Mozilla) Plugin 32-bit ##
alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/jre1.6.0_23/lib/i386/libnpjp2.so 20000

## Java Browser (Mozilla) Plugin 64-bit ##
alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /usr/java/jre1.6.0_23/lib/amd64/libnpjp2.so 20000

5. Check current java, javac, javaws and libjavaplugin.so versions

java -version
javac -version
javaws

open mozilla firefox and write about:plugins on address bar

To swap between OpenJDK and Sun JDK version use:
alternatives --config java

You can also add JAVA_HOME environment variable to /etc/profile or $HOME/.bash_profile file using:
export JAVA_HOME=¨user/java/jdk1.6.0_23¨