Wednesday, June 13, 2012

OTRS 3.1.5 on debian squeeze 6.0

1. install all depencies/packages
apt-get install apache2 perl mysql-server libnet-ldap-perl libgd-graph-perl libapache2-mod-perl2 libsoap-lite-perl libnet-dns-perl libpdf-api2-perl libdigest-md5-perl make gcc

2. configure apache2
#enable rewrite abilities
a2enmod rewrite

#create a file in the /etc/apache2/sites-available/
cd /etc/apache2/sites-available/
nano otrs
#inside the otrs file
<VirtualHost *:80>
     ServerName otrs.local
     ServerAlias www.otrs.local
     DocumentRoot /srv/www/otrs.local/public_html/
     ErrorLog /srv/www/otrs.local/logs/error.log
     CustomLog /srv/www/otrs.local/logs/access.log combined
#All of the files for the sites that you host will be located in directories that exist underneath /srv/www. You can symbolically link these directories to other locations if you need them to exist in other places.
#ErrorLog and CustomLog entries are suggested for more fine-grained logging, but are not required. If they are defined (as shown above), the logs directories must be created before you restart Apache.

#create the site with public_html and logs inside the folder /srv/www
mkdir -p /srv/www/otrs.local/public_html
mkdir /srv/www/otrs.local/logs

#enable site
a2ensite otrs.local

#reload apache2
/etc/init.d/apache2 reload

ln -s /opt/otrs /srv/www/otrs.local/public_html/otrs

3. download the otrs package and extract
#go to the site
cd /opt/otrs

#download the OTRS installer package from source
tar xvf otrs-3.1.5.tar.gz

#move the extracted folder to otrs
mv otrs-3.1.5 otrs
ln -s /opt/otrs /srv/www/otrs.local/public_html/otrs

#4. verify that all perl modules are working

#5. create user and group for OTRS
useradd -d /opt/otrs/ -c 'OTRS user' otrs
usermod -G www-data otrs

#6 copy the configuration files
cp Kernel/ Kernel/
cp Kernel/Config/ Kernel/Config/

#7. check that all modules required for running otrs are installed
perl -cw /opt/otrs/bin/cgi-bin/ #should see "syntax ok"
perl -cw /opt/otrs/bin/ #should see "syntax ok"

#8. we give the permissions to the folder otrs
bin/ --otrs-user=otrs --web-user=www-data --otrs-group=www-data --web-group=www-data /opt/otrs

#9 edit the configuration of apache for the otrs site
#create a symoblic link on the apache2 httpd conf
ln -s /opt/otrs/scripts/apache2-httpd.include.conf /etc/apache2/conf.d/otrs.conf

No comments:

Post a Comment