JavaTechie

Its all about Technology

HOW TO Subversion+Apache on Fedora January 29, 2009

Filed under: Apache — javatechie @ 5:30 am
Tags: , ,

HOW TO Subversion+Apache on Fedora

To learn or use Subversion, please read the book.

To install subversion run below commands:

# yum install subversion
# yum install mod_dav_svn

Then you need to setup at least one repository to test it.

Here create the folders..

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

repos – will contain all the projects

users – will contain all the user configs

permissions – will contain all the user permissions

We need to give these folders the proper permissions apache user permissions so that apache can write files on repos.

# chown -R apache.apache /svn

Then you can create repository using subversion cmd svnadmin.

# svnadmin create /svn/repos/project1

You can create multiple project repos under repos folder.

To setup apache server.

You may already have this subversion config file installed in conf.d folder otherwise you can create a new apache include file that will hold all configurations.

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

This file 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

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

</Location>

We need to create some files so that this config will work properly. The first is htpasswd file which will contain all the usernames nad passwords which i named “/svn/users/passwords”.

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

Next you need to create the svnauth file.

# vi /svn/permissions/svnauthz.conf

Inside 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 restart

Now you should access subversion repos as below.

http://www.websitename.com/svn/repos/

 

Tomcat 5 on Fedora Core 6: In Five Easy Steps January 7, 2008

Filed under: Java — javatechie @ 6:25 am
Tags: , ,

Install FC6 and Apache Web Server

Stick the Fedora Core 6 DVD in and reboot. Then follow the instructions. I took all defaults where I can, including letting it “delete all Linux partitions” and automatically partition the disk. I choose to install “Web Server” and “Development Tools” when offered the chance. This installs the Apache Web Server 2.2.3 on the box.

Install Tomcat

Tomcat 5 is included in Fedora Core 6, but not installed by default. So I have to bring it in from the repository:

[root@root]# yum install tomcat5 tomcat5-webapps tomcat5-admin-webapps

This installs Tomcat 5.5.17 and a lot of their dependencies onto the system.

Read more

 

Virtual Hosting with Tomcat January 7, 2008

Filed under: Apache — javatechie @ 6:04 am
Tags: , , ,

This is a guide on setting up Tomcat to do virtual hosting and make it behave like a simple webserver with jsp and servlet support, for many different sites all hosted on the same IP address. The aim is to have a single directory for each virtual host, which can be manipulated individually without hassles from managing multiple .war files and other configuration difficulties.

To configure Tomcat for a virtual host, you need a directive in the server.xml file, and a ROOT.xml file in the conf/Catalina/$host directory. Here’s the minimal setup required for a copy of Tomcat serving directly on Port 80, using no connectors or other configuration difficulties.

This was written for Tomcat 5 on linux, with Tomcat installed in /usr/local/tomcat

We start with the simplest configuration, of one website, called ‘localhost’ which keeps it’s files in /usr/local/tomcat/webapps/localhost . We’re not using any .war files here – all the files are placed straight into the directory.

Read more