without installer.pl

Moderator: crythias

Locked
brandocomando
Znuny newbie
Posts: 10
Joined: 13 Apr 2013, 00:09
Znuny Version: 3.2.5-01.noarch

without installer.pl

Post by brandocomando »

Hey all,
I was wondering if there was an easy way to set up otrs without using the installer.pl site. Its a great tool, but im trying to script out the install.

thanks,

Brandon
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: without installer.pl

Post by crythias »

"is there an easy way to set up otrs without the installer. "

"im trying to script out the install"
k. READ INSTALL in the source.

Here's a hint

Code: Select all

mkdir /opt
cd /opt/
wget http://ftp.otrs.org/pub/otrs/otrs-3.2.5.tar.gz
tar xzvf otrs-3.2.5.tar.gz
mv otrs-3.2.5 otrs
perl /opt/otrs/bin/otrs.CheckModules.pl
#install what's required/missing. If this is consistently missing, include
cpan Missing::Modules
# in the script
useradd -d /opt/otrs -c 'OTRS user' otrs
usermod -G www-data otrs
#or SUSE=www, Red Hat/CentOS/Fedora=apache, Debian/Ubuntu=www-data
cd /opt/otrs
cp Kernel/Config.pm.dist Kernel/Config.pm
cp Kernel/Config/GenericAgent.pm.dist Kernel/Config/GenericAgent.pm
perl -cw /opt/otrs/bin/cgi-bin/index.pl
perl -cw /opt/otrs/bin/cgi-bin/customer.pl
perl -cw /opt/otrs/bin/otrs.PostMaster.pl
bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=otrs /opt/otrs
#or SuSE
#bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=wwwrun /opt/otrs
#or Redhat
#bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=apache --otrs-group=apache --web-group=apache /opt/otrs
#or Ubuntu
#bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=www-data --otrs-group=www-data --web-group=www-data /opt/otrs
mysql -u root -p -e 'create database otrs charset utf8'
mysql -u root -p otrs < scripts/database/otrs-schema.mysql.sql
mysql -u root -p otrs < scripts/database/otrs-initial_insert.mysql.sql
mysql -u root -p otrs < scripts/database/otrs-schema-post.mysql.sql
mysql -u root -p -e 'GRANT ALL PRIVILEGES ON otrs.* TO otrs@localhost IDENTIFIED BY "some-pass" WITH GRANT OPTION;'
mysql -u root -p -e 'FLUSH PRIVILEGES;'
#or other db from README.database
#Somehow, make Config.pm reflect the otrs database name, DatabaseUser and DatabasePw established above.
bin/otrs.CheckDB.pl
cd var/cron
for foo in *.dist; do cp $foo `basename $foo .dist`; done
/opt/otrs/bin/Cron.sh start otrs
cp /opt/otrs/scripts/apache2-httpd.include.conf /etc/apache2/conf.d
service apache2 restart
First Login
http://yourhost/otrs/index.pl
User: root@localhost
PW: root

The above is not tested. I only followed the instructions. Since I don't know your environment you plan to script, I can only randomly guess at the desired result.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
brandocomando
Znuny newbie
Posts: 10
Joined: 13 Apr 2013, 00:09
Znuny Version: 3.2.5-01.noarch

Re: without installer.pl

Post by brandocomando »

Thanks so much!

I ran into one issue.
I am using Ldap for authentication and i've got it working fine. But It appears as tho I have to log into the index.pl page as root@localhost at least once before enabling my ldap and logging in as ldap users, otherwise i get a "No Permission to use this frontend module!" error after log in.

But as soon as i take away Ldap log in as root, log out, and enable Ldap again it works fine.

Anyone experience this and or know a way around it?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: without installer.pl

Post by crythias »

no good way unless you add the user to the group and you won't be able to do that until you get a userid and you won't have a userid until you login or create the user.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
brandocomando
Znuny newbie
Posts: 10
Joined: 13 Apr 2013, 00:09
Znuny Version: 3.2.5-01.noarch

Re: without installer.pl

Post by brandocomando »

huh.
What values change in the database after root@localhost logs in that would give other users permissions? I tried browsing around comparing one that hadn't logged in as root and one that did and I couldnt find any difference.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: without installer.pl

Post by crythias »

brandocomando wrote:What values change in the database after root@localhost logs in that would give other users permissions?
the root@localhost user will create the first ldap user that has admin access. Then you change to ldap auth and the same username, authenticated via ldap, does everything else.

"What values change?"
add a user, add user to group
to script this:

Code: Select all

bin/otrs.AddUser.pl -f John -l Doe -p JDPassword -g admin -e johndoe@email jdoe
Now this user can do admin tasks without root@localhost ever being used.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
brandocomando
Znuny newbie
Posts: 10
Joined: 13 Apr 2013, 00:09
Znuny Version: 3.2.5-01.noarch

Re: without installer.pl

Post by brandocomando »

well, I havent tried adding my Ldap user that way yet.

infact I never had to add any users.

this is how I've gotten it to work:
install, log in as root. log out.
enable Ldap. log in as ldap user.

If i do not log in as root before enabling Ldap my Ldap user does not have any permissions.

so my question is what happens on that first log in of the root user that would allow Ldap log ins to add themselves and give themselves permissions?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: without installer.pl

Post by crythias »

doesn't matter. add the line I gave you and you'll never have to do that change.

I mean it. your config can be ldap and you don't ever have to log in as root@localhost. Just run the command line and the user you've just added, authenticated against the default backend will have the ability to do all things root@localhost does.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
brandocomando
Znuny newbie
Posts: 10
Joined: 13 Apr 2013, 00:09
Znuny Version: 3.2.5-01.noarch

Re: without installer.pl

Post by brandocomando »

Yes it does works, great. thanks.

out of curiosity, what causes SubAction=Done to show up after the url after the inital log in attempt.

I logged in, it refreshed the login page and appended SubAction=Done to the end of the url and I had to log in again.
Locked