views:

49

answers:

1

Can you throw some points on how it is a best way, best practice to install web application on Unixes?
Like:
where to place app and its bases and so for,
how to configure to be secure and easy to backup,
etc

For example I know such suggestion -- to set uniq user for each app.

App in question is Jira on FreeBSD, but more general suggestions are also welcomed.

+1  A: 

Here's what I did for my JIRA install on Fedora Linux:

  • Create a separate user to run JIRA
  • Install JIRA under the JIRA user's home directory
  • Made a soft link "/home/jira/jira" pointing to the JIRA installation directory (the directory as installed contains the version number, something like /home/jira/atlassian-jira-enterprise-4.0-standalone)
  • Created an /etc/init.d script to run JIRA as a service, and added it to chkconfig so that it runs at system startup - see these instructions
  • Created a MySQL database for JIRA on a separate data volume
  • Set up scheduled XML backups via the JIRA admin interface
  • Set up a remote backup script to dump the MySQL database and copy the DB dump and XML backups to a separate backup server
  • In order to avoid having to open extra firewall ports, set up an Apache virtual host "jira.myhost.com" and used mod_proxy to forward requests to the JIRA URL.

I set everything up on a virtual machine (an Amazon EC2 instance in my case) and cloned the machine image so that I can easily restart a new instance if the current one goes down.

gareth_bowles