Vengatc techology logs

Installing JAVA in fedora

Posted in java, linux by vengatc on August 22, 2008

By default, Fedora Core 6 systems come with an old Java software installed, so you need to install a newer version of Java Runtime Environment to enjoy all the Java applications out there. In this quick guide, I will teach you how to update/install your Java Environment.

Let’s begin by downloading the latest version of JRE (Java Runtime Environment) from here. Just click on the Download link where it says Java Runtime Environment (JRE) 5.0 Update, then you’ll need to accept the license and download the Linux self-extracting file.

WARNING: Please remember to always replace the xx from the jre-1_5_0_xx-linux-i586.bin file with the latest version. At the moment of this guide’s writing, the latest version was 09, so the file should look like this: jre-1_5_0_09-linux-i586.bin

After you have finished downloading the file, you need to move it into the /opt folder. Open a console and type:

mv jre-1_5_0_xx-linux-i586.bin /opt

Now, you will need to make this file executable so you can extract it. Follow the commands below:

cd /opt – so you can go into the /opt directory
chmod +x jre-1_5_0_xx-linux-i586.bin

And now, let’s run the executable file with the following command:

./jre-1_5_0_xx-linux-i586.bin

You’ll be prompted with the License Agreement, hit space until you are asked if you agree or not. Type Yes and the extraction process will begin. After the extraction process is finished, just remove the binary file with the following command:

rm -rf jre-1_5_0_xx-linux-i586.bin

Now, let’s put the Java plugin into your browser’s plugin folder. Konqueror, Firefox and Mozilla browsers will all look into the same folder, for plugins. So type the following command:

ln -s /opt/jre1.5.0_xx/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so

Well, now you need to make the Java executable available for the whole system, so you can run all the Java applications you encounter. Create the following file with your preferred text editor:

kwrite /etc/profile.d/java.sh

Now paste the following options into the file, remember to enter a carriage return after these lines, then save it. Remember to replace the xx with the latest version you have downloaded:

export J2RE_HOME=/opt/jre1.5.0_xx
export PATH=$J2RE_HOME/bin:$PATH

Now, type the following command to make that file available:

source /etc/profile.d/java.sh

Then type this command to see if the path is correct:

which java

You will see something like this: /opt/jre1.5.0_09/bin/java

Then type these commands:

/usr/sbin/alternatives –install /usr/bin/java java /opt/jre1.5.0_xx/bin/java 2
/usr/sbin/alternatives –config java

After you have entered the last command, you’ll be asked to choose which Java software you want for your system. Just press 2 key and hit enter.

And finally, just type this command to see if everything looks good and your system has a new Java Environment:

/usr/sbin/alternatives –display java

And you can also type this command to see the version of your Java Runtime Environment:

java -version

Mine looks like this:

java version “1.5.0_09”
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
Java HotSpot(TM) Client VM (build 1.5.0_09-b01, mixed mode, sharing)

You should now be able to run most of the Java applications out there, with the commands like:

java -jar application.jar

or

javaws application.jnlp

Enjoy!

Advertisements

Installing VSFTPD on Fedora

Posted in linux by vengatc on August 22, 2008

1.  # yum install vsftpd*

2.  # start /etc/init.d/vsftpd start

3. # configuration changes.  to allow a user to authenticate…
Edit the files /etc/vsftpd.ftpusers and /etc/vsftpd.user_list  and remove the ‘root’ line from each file.

Installing SVN on Fedora

Posted in linux, sourcecontrol by vengatc on August 22, 2008

Step1 : Created a fedora virutal machine clone.

Links :
1) http://sysdigg.blogspot.com/2008/02/install-subversion-on-fedora-8-linux.html
2) http://www.botsko.net/blog/2007/05/17/installing-subversion-on-fedora-core/
3) http://www.ferdychristant.com/blog/articles/DOMM-6NFJ6J
4)http://www.botsko.net/blog/2007/05/17/installing-subversion-on-fedora-core/

I’ve been using subversion a lot recently – from using repositories with client development companies to installing it for clients – it seems to be the SVN month.

Here’s how I installed subversion on a machine with Fedora Core 4. For anyone learning or using Subversion, I highly recommend that you read the book.

You may already have subversion installed, if not, just run this:

# yum install subversion
# yum install mod_dav_svn

Then you’ll need to setup at least one repository. I’m going to need multiple repositories that I can use for different clients so I have a bit of extra admin work ahead of me. You can setup as many repositories as you need, but no matter what you’ll need at least one. Here create the folders…

# mkdir /svn
# mkdir /svn/repos
# mkdir /svn/users
# mkdir /svn/permissions

We need to give these folders the proper permissions

# chown -R apache.apache /svn

Then we need to tell subversion to make our first repository.

# svnadmin create /svn/repos/myproject

First, I need to setup a config file for svnserve.

# vi /svn/repos/conf/svnserve.conf

Then, look for variations of the following code and edit it as necessary. By default any anonymous user can access the code so to disable that you must include anon-access = none, just commenting the value out will not prevent anonymous access.

anon-access = none
password-db = passwdfile
realm = My SVN Repository
auth-access = write

The password-db is just a path to a file containing usernames and passwords. You’ll create this file especially for SVN. I create each file inside of the repository conf directory. So, save your changes and then we’ll create said user file.

# vi passwdfile

Enter in something like:

[users]
username = password

Anyway, you’ll need to start the svn server.

# svnserve -d –listen-port=3690

One side note – svnserve just runs and doesn’t have a way to stop besides killing the process. If you make changes to the svnserve.conf or user file you’ll need to restart svnserve.

# killall svnserve

Then, go ahead and test (best to do so on a different machine).

# svn co –username=myusername svn://mydomain/svn/repos/myproject

The system should then ask you for your password. Go ahead and run some tests.

Now, let’s setup apache.

Create a new apache include file that will hold our configurations (You may already have this is subversion was already installed).

# vi /etc/httpd/conf.d/subversion.conf

Now, this file will need to contain something like this to serve the repository through apache:

LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

DAV svn
SVNPath /svn/repos
AuthType Basic
AuthName “Subversion Repository”
AuthUserFile /svn/users/svnpass
Require valid-user
AuthzSVNAccessFile /svn/permissions/svnauthz.conf

Now, this essentially tells apache to load the mods needed for svn. We need to create some files so that this config will work properly. The first is our htpasswd file which I named “/svn/users/svnpass”.

# htpasswd -cb /svn/users/svnpass username password

Next we need to create the svnauth file.

# vi /svn/permissions/svnauthz.conf

Inside we’ll place a list of users who have access to files:

[/]

username = rw

The “rw” states that this user has read/write access to the root repository /.

Restart your web server and you should be done.

service httpd reload
or you can use:
/usr/sbin/apachectl restart – this option outputs better error messages in case you’ve made some syntax mistakes.

Go to your repository and you should see subversion displaying the repo info.

http://yoursite.com/svn/repos/