How do I setup tomcat/madsonic

Frequently asked questions. Tutorials, tips and tricks.
justin
Posts: 7
Joined: 07 Feb 2013, 14:51
Has thanked: 0
Been thanked: 1 time

How do I setup tomcat/madsonic

Unread post by justin »

I am running ubuntu server and have never messed with tomcat can someone please guide me throw the installation and deploying the war?
User avatar
Madsonic
Administrator
Administrator
Posts: 984
Joined: 07 Dec 2012, 03:58
Answers: 7
Has thanked: 1201 times
Been thanked: 470 times

Re: How do I setup tomcat/madsonic

Unread post by Madsonic »

Hi,

I hope this little guide help you:

1. Install Tomcat

Code: Select all

$ sudo apt-get install tomcat7 tomcat7-common tomcat7-admin

2. Add an administrative user to Tomcat


Tomcat does have any users defined that could be used for administrative purposes so we need
to open tomcat-users.xml in a text editor and add a user with the proper roles assigned to it.

Code: Select all

$ sudo nano /etc/tomcat7/tomcat-users.xml
Replace its content with the following and make sure that you replace USERNAME and PASSWORD with the values you want:

Code: Select all

<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
	<role rolename="admin-gui"/>
	<role rolename="manager-gui"/>
	<user username="USERNAME" password="PASSWORD" roles="manager-gui,admin-gui"/>
</tomcat-users>
On Linux, Madsonic keeps its files in /var/madsonic. Depending on your configuration, Tomcat may not be permitted to create this directory,
in which case you have to create it manually:

Code: Select all

$ sudo mkdir /var/madsonic

Code: Select all

$ sudo chown tomcat7:tomcat7 /var/madsonic
3. Restart Tomcat Service

Code: Select all

$ sudo service tomcat7 restart
4. Deploy and administrate

the madsonic.war file can be easy managed within the admin GUI

http://localhost:8080/manager/html

Image

best regards
These users thanked the author Madsonic for the post:
admin
Rating: 7.69%
justin
Posts: 7
Joined: 07 Feb 2013, 14:51
Has thanked: 0
Been thanked: 1 time

Re: How do I setup tomcat/madsonic

Unread post by justin »

this is all i get when i try to start it FAIL - Application at context path /subsonic could not be started
User avatar
Madsonic
Administrator
Administrator
Posts: 984
Joined: 07 Dec 2012, 03:58
Answers: 7
Has thanked: 1201 times
Been thanked: 470 times

Re: How do I setup tomcat/madsonic

Unread post by Madsonic »

justin wrote:this is all i get when i try to start it FAIL - Application at context path /subsonic could not be started
do you have a /var/subsonic directory? whats in there?

any log file, errors?
justin
Posts: 7
Joined: 07 Feb 2013, 14:51
Has thanked: 0
Been thanked: 1 time

Re: How do I setup tomcat/madsonic

Unread post by justin »

Madevil wrote:
justin wrote:this is all i get when i try to start it FAIL - Application at context path /subsonic could not be started
do you have a /var/subsonic directory? whats in there?

any log file, errors?
Got it Working thanks for your help. after deploying, it copied everything to /var/subsonic like it was suppose to but it must have changed permissions because I had to sudo chown tomcat7:tomcat7 /var/subsonic again then it let me start it.
These users thanked the author justin for the post:
Madsonic
Rating: 7.69%
Saklasklas222
Posts: 6
Joined: 02 Jun 2013, 16:31
Has thanked: 1 time
Been thanked: 4 times

Re: How do I setup tomcat/madsonic

Unread post by Saklasklas222 »

Hi,

its possible to run madsonic on same tomcat installation wheres allready running subsonic?
mad1993max
Posts: 8
Joined: 25 Nov 2013, 23:17
Has thanked: 0
Been thanked: 2 times

Re: How do I setup tomcat/madsonic

Unread post by mad1993max »

hi is the prozess for madsonic war the same
doe i have to deploy only the madsonic war file ore also the subsonic?
User avatar
aadam12
Posts: 24
Joined: 27 May 2013, 14:36
Has thanked: 1 time
Been thanked: 9 times

Re: How do I setup tomcat/madsonic

Unread post by aadam12 »

@Madevil thanks for the HowTo
FYI: Wherever it says "gedit" please change it to "nano" or "vi"... this is Ubuntu Server there is no GUI.
User avatar
Madsonic
Administrator
Administrator
Posts: 984
Joined: 07 Dec 2012, 03:58
Answers: 7
Has thanked: 1201 times
Been thanked: 470 times

Re: How do I setup tomcat/madsonic

Unread post by Madsonic »

aadam12 wrote:@Madevil thanks for the HowTo
FYI: Wherever it says "gedit" please change it to "nano" or "vi"... this is Ubuntu Server there is no GUI.
you are right nano is the better choice ! :D
PS: complete guide updated!
These users thanked the author Madsonic for the post:
aadam12
Rating: 7.69%
thechez
Posts: 27
Joined: 06 Mar 2015, 23:43
Has thanked: 1 time
Been thanked: 9 times

Re: How do I setup tomcat/madsonic

Unread post by thechez »

Is anyone else having issues with any of the 6.0 or 6.1 versions deploying in Tomcat?
I'm on a QNAP NAS and am overwriting the .war file with the newer file but it will not deploy.
Do I need to wipe out my 5.1 instance on the server first and then deploy? I swear I've tried that and
it wouldn't install the WAR package as a whole for 6.0 or 6.1.

Thanks.
Post Reply