Hi Today we are going to discuss OTRS installation and configuration in REDHAT/CENOS
Download noarch.rpm from http://www.otrs.com/en/open-source/get-otrs/software-download/
Prerequisites
Before installing OTRS, we have to do couple of prerequisites first
Install and enable EPEL repository.
First go to the EPEL repository download page. Download the latest EPEL rpm and install it as shown below.
# wget http://epel.mirror.net.in/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -Uvh epel-release-6-8.noarch.rpm
Log in as root user and Install Mysql server using the following command:
yum install mysql-server
Start mysql service as shown below:
service mysqld start
chkconfig mysqld on
By default, Mysql root user is blank. So let us setup the root user password as shown below:
mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none): -----> Press Enter
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
You already have a root password set, so you can safely answer 'n'.
Change the root password? [Y/n] y -----> Enter Y and press Enter
New password: -----> Enter the new password
Re-enter new password: -----> Enter password again
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y -----> Press Enter
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y -----> Press Enter
... Success!
By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y -----> Press Enter
- Dropping test database...
ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist
... Failed! Not critical, keep moving...
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y -----> Press Enter
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!
MySQL has been installed successfully with default options. In order to work properly with OTRS, we have to add the following directives into the my.cnf file.
Edit file /etc/my.cnf,
vi /etc/my.cnf
Add the following lines under the [mysqld] section:
max_allowed_packet=20M
query_cache_size=32M
Save and close the file.
Next, restart mysql service using the following command:
service mysqld restart
Next, Install httpd package with command:
yum install httpd
Start httpd service, and make it to start automatically on every reboot.
service httpd start
chkconfig httpd on
Log in as root user and Install Mysql server using the following command:
yum install mysql-server
Start mysql service as shown below:
service mysqld start chkconfig mysqld on
By default, Mysql root user is blank. So let us setup the root user password as shown below:
mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it, we'll need the current password for the root user. If you've just installed MySQL, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): -----> Press Enter OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MySQL root user without the proper authorisation. You already have a root password set, so you can safely answer 'n'. Change the root password? [Y/n] y -----> Enter Y and press Enter New password: -----> Enter the new password Re-enter new password: -----> Enter password again Password updated successfully! Reloading privilege tables.. ... Success! By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Remove anonymous users? [Y/n] y -----> Press Enter ... Success! Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y -----> Press Enter ... Success! By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? [Y/n] y -----> Press Enter - Dropping test database... ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist ... Failed! Not critical, keep moving... - Removing privileges on test database... ... Success! Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? [Y/n] y -----> Press Enter ... Success! Cleaning up... All done! If you've completed all of the above steps, your MySQL installation should now be secure. Thanks for using MySQL!
MySQL has been installed successfully with default options. In order to work properly with OTRS, we have to add the following directives into the my.cnf file.
Edit file /etc/my.cnf,
vi /etc/my.cnf
Add the following lines under the [mysqld] section:
max_allowed_packet=20M query_cache_size=32M
Save and close the file.
Next, restart mysql service using the following command:
service mysqld restart
Next, Install httpd package with command:
yum install httpd
Start httpd service, and make it to start automatically on every reboot.
service httpd start chkconfig httpd on
Download OTRS
Go to the OTRS download page and download the latest version.
wget http://ftp.otrs.org/pub/otrs/RPMS/rhel/6/otrs-3.3.6-01.noarch.rpm
The above will download and save the OTRS rpm file in the current directory. Install it using command:
yum install otrs-3.3.6-01.noarch.rpm
The above command will install otrs package along with all required packages.
Finally, restart httpd service one more time after installing OTRS.
service httpd restart
During OTRS installation, keep attention on the installer. It will display the web installer URL for OTRS.
Look at the following screenshot.
Install Additional PERL modules
Before proceeding to configure OTRS, you should install additional perl modules. Run the following command to know the required modules by OTRS:
/opt/otrs/bin/otrs.CheckModules.pl
Sample output:
o Crypt::Eksblowfish::Bcrypt.......Not installed! (optional - For strong password hashing.)
o Crypt::SSLeay....................ok (v0.57)
o Date::Format.....................ok (v2.22)
o DBI..............................ok (v1.609)
o DBD::mysql.......................ok (v4.013)
o DBD::ODBC........................Not installed! (optional - Required to connect to a MS-SQL database.)
o DBD::Oracle......................Not installed! (optional - Required to connect to a Oracle database.)
o DBD::Pg..........................Not installed! (optional - Required to connect to a PostgreSQL database.)
o Encode::HanExtra.................Not installed! (optional - Required to handle mails with several Chinese character sets.)
o GD...............................Not installed! (optional - Required for stats.)
o GD::Text.......................Not installed! (optional - Required for stats.)
o GD::Graph......................Not installed! (optional - Required for stats.)
o IO::Socket::SSL..................ok (v1.31)
o JSON::XS.........................Not installed! (optional - Recommended for faster AJAX/JavaScript handling.)
o List::Util::XS...................ok (v1.21)
o LWP::UserAgent...................ok (v6.05)
o Mail::IMAPClient.................Not installed! (optional - Required for IMAP TLS connections.)
o IO::Socket::SSL................ok (v1.31)
o ModPerl::Util....................ok (v2.000004)
o Net::DNS.........................ok (v0.65)
o Net::LDAP........................ok (v0.40)
o Net::SSL.........................ok (v2.84)
o PDF::API2........................Not installed! (optional - Required for PDF output.)
o Compress::Zlib.................ok (v2.021)
o Text::CSV_XS.....................Not installed! (optional - Recommended for faster CSV handling.)
o Time::HiRes......................ok (v1.9721)
o XML::Parser......................ok (v2.36)
o YAML::XS.........................Not installed! (required - Please install this module - )
As you see in the above output, some perl modules are missing. Install them all at once or one by one as shown below.
yum install "perl(Crypt::Eksblowfish::Bcrypt)" "perl(DBD::ODBC)" "perl(DBD::Oracle)" "perl(DBD::Pg)" "perl(Encode::HanExtra)" "perl(GD)" "perl(GD::Text)" "perl(GD::Graph)" "perl(JSON::XS)" "perl(Mail::IMAPClient)" "perl(PDF::API2)" "perl(Text::CSV_XS)" "perl(YAML::XS)"
If it is not working your can install through perl promt:
Before make sure
# yum install make gcc gd gd-devel
# perl -MCPAN -e shell;
cpan[15]> help
cpan[15]> install YAML::XS
Now, check again for any missing modules.
/opt/otrs/bin/otrs.CheckModules.pl
Sample output:
o Crypt::Eksblowfish::Bcrypt.......ok (v0.009) o Crypt::SSLeay....................ok (v0.57) o Date::Format.....................ok (v2.22) o DBI..............................ok (v1.609) o DBD::mysql.......................ok (v4.013) o DBD::ODBC........................ok (v1.48) o DBD::Oracle......................Not installed! (optional - Required to connect to a Oracle database.) o DBD::Pg..........................ok (v2.15.1) o Encode::HanExtra.................ok (v0.23) o GD...............................ok (v2.44) o GD::Text.......................ok (v0.86) o GD::Graph......................ok (v1.44) o IO::Socket::SSL..................ok (v1.31) o JSON::XS.........................ok (v2.27) o List::Util::XS...................ok (v1.21) o LWP::UserAgent...................ok (v6.05) o Mail::IMAPClient.................ok (v3.34) o IO::Socket::SSL................ok (v1.31) o ModPerl::Util....................ok (v2.000004) o Net::DNS.........................ok (v0.65) o Net::LDAP........................ok (v0.40) o Net::SSL.........................ok (v2.84) o PDF::API2........................ok (v2.019) o Compress::Zlib.................ok (v2.021) o Text::CSV_XS.....................ok (v0.85) o Time::HiRes......................ok (v1.9721) o XML::Parser......................ok (v2.36) o YAML::XS.........................ok (v0.38)
If everything seems good, proceed to web installer.
Begin OTRS Web installer
OTRS development team has made a simple way web based installer to make the installation lot easier.
Open up the web browser and navigate to http://ip-address/otrs/installer.pl.
The following screen will appear. Click Next to continue.
Configuring the database
If you use MySQL as the database back-end, you can use the OTRS web installer:
http://localhost/otrs/installer.pl
.
When the web installer starts, please follow the next steps to setup your system:
1. Check out the information about the OTRS offices and click on next to continue (see Figure below).
Figure: Welcome screen.
2. Read the GNU Affero General Public License (see Figure below) and accept it, by clicking the corresponding button at the bottom of the page.
Figure: GNU Affero General Public License.
3. Provide the username and password of the administrator, the DNS name of the computer which hosts OTRS and the type of database system to be used. After that, check the settings (see Figure below).
Figure: Database initial settings.
You will be notified if the check was successful. Press OK to continue (see Figure below).
Figure: Notification for successful check.
4. Create a new database user, choose a name for the database and click on 'Next' (see Figure below).
Figure: Database settings.
If the database and its user were successfully created, you will get a setup notification, as shown in Figure. Click 'Next' to go to the next screen.
Figure: Notification indicating successful database setup.
5. Provide all the required system settings and click on 'Next' (see Figure below).
Figure: System settings.
6. If you want, you can provide the needed data to configure your inbound and outbound mail, or skip this step by pressing the right button at the bottom of the screen (see Figure below).
Figure: Mail configuration.
7. Restart the OTRS service now to use the new configuration settings as shown in the script below.
Congratulations! Now the installation of OTRS is finished and you should be able to work with the system (see Figure below). To log into the web interface of OTRS, use the address http://localhost/otrs/index.pl from your web browser. Log in as OTRS administrator, using the username 'root@localhost' and the password 'root'. After that you can configure the system for your needs.
Thanks :- http://doc.otrs.org/3.1/en/html/manual-installation-of-otrs.html
For Troubleshooting
Suppose a package perl package as missing like
YAML::XS.........................Not installed! (required - use "perl -MCPAN -e shell;" - )
Run perl -MCPAN -e shell;
use h for help
update all perl package
install YAML::XS -> For installing yaml::XS pakage
When the web installer starts, please follow the next steps to setup your system:
1. Check out the information about the OTRS offices and click on next to continue (see Figure below).
2. Read the GNU Affero General Public License (see Figure below) and accept it, by clicking the corresponding button at the bottom of the page.
3. Provide the username and password of the administrator, the DNS name of the computer which hosts OTRS and the type of database system to be used. After that, check the settings (see Figure below).
You will be notified if the check was successful. Press OK to continue (see Figure below).
4. Create a new database user, choose a name for the database and click on 'Next' (see Figure below).
Warning
It is never a good idea to use default passwords. Please change the default password for the OTRS database!If the database and its user were successfully created, you will get a setup notification, as shown in Figure. Click 'Next' to go to the next screen.
5. Provide all the required system settings and click on 'Next' (see Figure below).
6. If you want, you can provide the needed data to configure your inbound and outbound mail, or skip this step by pressing the right button at the bottom of the screen (see Figure below).
7. Restart the OTRS service now to use the new configuration settings as shown in the script below.
linux:~ # rcotrs restart-force Shutting down OTRS Disable /opt/otrs/bin/otrs.PostMaster.pl ... done. no crontab for otrs Shutting down cronjobs ... failed! Shutting down OTRS (completely) Shutting down Apache ... done. Shutting down MySQL ... done. done Starting OTRS (completely) Starting Apache ... done. Starting MySQL ... done. Starting OTRS Checking Apache ... done. Checking MySQL ... done. Checking database connect... (It looks Ok!). Enable /opt/otrs/bin/otrs.PostMaster.pl ... done. Checking otrs spool dir... done. Creating cronjobs (source /opt/otrs/var/cron/*) ... done. -->> http://linux.example.com/otrs/index.pl <<-- done done linux:~ #Script: Restarting the OTRS service.
Congratulations! Now the installation of OTRS is finished and you should be able to work with the system (see Figure below). To log into the web interface of OTRS, use the address http://localhost/otrs/index.pl from your web browser. Log in as OTRS administrator, using the username 'root@localhost' and the password 'root'. After that you can configure the system for your needs.
Thanks :- http://doc.otrs.org/3.1/en/html/manual-installation-of-otrs.html
For Troubleshooting
Suppose a package perl package as missing like
YAML::XS.........................Not installed! (required - use "perl -MCPAN -e shell;" - )
Run perl -MCPAN -e shell;
use h for help
update all perl package
install YAML::XS -> For installing yaml::XS pakage
is this work correctly
ReplyDeletenow the updatation changed will update you soon
ReplyDeleteYou can try now. It will work
Deleteit is not working properly sir tell how to start otrs service
ReplyDelete