SuSEOracleInstall: Difference between revisions
m (3 revisions imported) |
(No difference)
|
Latest revision as of 15:37, 6 April 2016
Unofficial Installation Guide
This is an unofficial installation guide. It may be outdated or apply only to very specific configurations and versions. The official and maintained installation steps for RT are in the README and UPGRADING documents included in the official .tar.gz
packages.
This page 'SuSEOracleInstall' is tagged as OUTDATED |
This page contains out of date and possibly misleading information or instructions such as installation methods or configuration examples that no longer apply. Please consider this warning when reading the page below. |
If you have checked or updated this page and found the content to be suitable, please remove this notice by editing the page and remove the Outdated template tag. |
This guide covers installing RT 3.6.3 (should work on other 3.6 installs) against Oracle on a SuSE 9.3 system.
For the sake of this guide, I'll assume you've installed Oracle. Installing Oracle requires enough knowledge and black magic that is deserves several of its own guides. I'll be referring to a 10gR2 installation of oracle living in /opt/oracle
1. OS Installation
Install SuSE 9.3 and install postfix, apache2, apache2-mod_fastcgi. You'll also want to make sure gcc or a "development environment" gets installed. This install of SuSE comes with perl 5.8.3 which is fine for RT (anything less than 5.8.3 would be trouble).
2. Start the RT Install and take care of Prerequisites
After you've downloaded and untarred the rt tarball and read through the README and README.Oracle, run configure.
At a minimum, you need to do
./configure --with-db-type=Oracle
README.Oracle tells you that you also want to tell RT to not use the sys/system/sysdba user. My final configure line was this
./configure --with-db-type=Oracle --with-db-dba=rt --with-db-user=rt --with-web-user=wwwrun --with-apachectl=/usr/sbin/apache2ctl
SuSE uses wwwrun for apache2 and gives the apachectl binary for apache2 a weird name.
After this, you can run make testdeps and find out how many perl modules you're missing.
You'll need to install these using the CPAN shell. There should be a cpan script in your PATH, otherwise you can run
perl -MCPAN -eshell
And follow the prompts for configuring it.
In order to install the GD modules you will need to install the gd and gd-devel packages with yast. You may also need to install the expat package for the XML modules, but that came installed by SuSE for me.
make testdeps | grep MISSING
will give you a list of modules. You can install them one at a time within the cpan shell (perl -MCPAN -eshell) by running
install Module::Name
You should leave DBD::Oracle for last, since this may require you to run a few things by hand while you set up Oracle (See "A Small DBD::Oracle diversion" below).
If you run into this error
Weak references are not implemented
You will want to do
force install Scalar::Util
in the CPAN shell to rebuild Scalar::Util with XS so that weaken works properly
3. A Small DBD::Oracle diversion
Start by making sure you can connect to oracle using sqlplus. You may need to loosen permissions for a "normal" user to be able to run sqlplus. By default, Oracle was installed '750 oracle oinstall' so given a tree like this
/opt/oracle/product/10gR2/
All four directories in this tree need to be world executable (world readable too if you want people to be able to poke around)
Within 10gR2
bin lib nls/data
All need to be world executable
All the .so files in lib need to be readable by the world so we can link against them. At least the sqlplus binaries in bin should be world executable, enable others as you see fit In nls/data you want to make the .msb files all readable
After this, you should be able to run sqlplus as a normal user and connect. If you can't, you may need to set proper environment variables. Use oraenv if needed to set these up. At a minimum, you will want
ORA_SID=yourdbname ORA_HOME=/opt/oracle/product/10gR2 ORA_BASE=/opt/oracle
I also needed
ORA_NLS10=/opt/oracle/product/10gR2/nls/data
Once you've successfully done this, connect as sysdba|system|sys and create an rt user using the grant statement in README.Oracle (Or have your DBA do it).
I used my rt user to run the tests for DBD::Oracle, but you can use the standard scott/tiger account if it is available
Before proceeding, please make sure to read the README file for DBD::Oracle and any applicable README.* files for your platform. They do a good job of pointing out common problems and listing solutions.
When you run
perl Makefile.PL
in the DBD::Oracle installation directory, it will be quite chatty about finding libraries to link against and finding your oracle infrastructure. I suggest running this as a "normal" use because it will show you "permission denied" or unreadable files quite clearly. If you have to debug problems like that from within Apache/fastcgi you will be unhappy.The list of world executable directories and readable files from above came from trial and error running sqlplus and perl Makefile.PL, hopefully I haven't missed one.
When you go to run make test, take note that you need to set ORACLE_USERID
ORACLE_USERID=rt/rt make test
Once you've passed tests, you can install and we're off to setting up the schema
4. Back to RT
Back in your rt working directory, run
make testdeps
again and be sure you've got all the modules.
After that you can install RT and move on to setting up the database.
If your oracle environment variables (see above) are correct and you've changed /opt/rt3/etc/RT_SiteConfig.pm to have a proper password in $DatabasePassword then the following should go easily.
make initialize-database
This will create your database tables and set up some initial data. RT should be able to do all of this as the RT user, don't give it system|sys|sysdba.
5. Configuring your web server
In yast, go to Network Services > HTTP Server > Modules (Edit) > Add Module
You'll want to add mod_fastcgi as a module
yast will then make some symlinks between /usr/lib/apache2 and the appropriate places and tweak /etc/apache2/sysconfig.d/loadmodules.conf and add /etc/apache2/conf/mod_fastcgi.conf with some setups.
I took the configuration for fastcgi from the RT README and dropped it into /etc/apache2/vhosts.d/rt.conf I did have to add one piece, inside the virtual host setting because SuSE's default httpd.conf blocks access to /
<VirtualHost rt.example.com> .... <Location /> Allow From All </Location> </VirtualHost>
In your /opt/rt3/etc/RT_SiteConfig.pm you will need to set up some oracle environment magic for your database connection (I tried with SetEnv in vhosts.d/rt.conf but couldn't make it work quite right).
$ENV{ORACLE_HOME} = '/opt/oracle/product/10gR2/; $ENV{ORACLE_SID} = 'rt'; # or wherever you created your rt database $ENV{ORA_NLS10} = '/opt/oracle/product/10gR2/nls/data';
You will also need to make a choice. Your /opt/rt3/etc/RT_*Config.pm needs to be readable by the webserver. You can change the Group line in your httpd.conf to run your webserver as the 'rt' group, or put the wwwrun user in the rt group. Either will grant you access to the config files. If there are problems, RT will complain loudly about not being able to read the files and offer solutions.
At this point, you should be able to do /etc/init.d/apache2 restart and check for errors.
Hopefully you can access your RT at http://rt.example.com now. If not, /var/log/apache2/error_log is where you need to start. You may run into additional oracle access problems, but usually those stem from not setting the correct ORACLE_* environment variables
6. Configuring mailgate
The last thing you may want to do is to set up a mailgate. You will want to read documentation about the EmailInterface and the mailgate portion of ManualInstallation
This is pretty straightforward, you can copy the aliases out of RT's README. They will look something like this
rt: "|/opt/rt3/bin/rt-mailgate --queue general --action correspond --url http://rt.example.com/"
Change your /etc/aliases, change example.com, run newaliases.
You will need to grant CreateTicket to Everyone so that users can use email to create tickets. If you want people to be able to reply to messages, grant ReplyToTicket to Everyone. These can be found in Configuration > Global > Group Rights.
You will also want to configure your Queue to use the email addresses that you set up in /etc/aliases. Configuration > Queues > Queue Name and look for the Reply Address and Comment Address. that you put in your /etc/aliases