added apache mod_passenger config
This commit is contained in:
parent
8b971db990
commit
cdf67aa6ed
1 changed files with 77 additions and 2 deletions
|
@ -1,11 +1,86 @@
|
||||||
=Installation on Ubuntu 12.04 Server
|
=Installation on Ubuntu 12.04 Server
|
||||||
|
|
||||||
|
== With Apache mod_passenger
|
||||||
|
=== Prerequisits
|
||||||
|
* apt-get install ruby1.9.1-full build-essential apache2-suexec mysql-server libmysqlclient-dev postfix libcurl4-openssl-dev libssl-dev apache2-prefork-dev libapr1-dev libaprutil1-dev
|
||||||
|
* update-alternatives --set ruby /usr/bin/ruby1.9.1
|
||||||
|
* update-alternatives --set gem /usr/bin/gem1.9.1
|
||||||
|
|
||||||
|
=== Add User
|
||||||
|
* useradd zammad -m -d /var/www/zammad -s /bin/bash
|
||||||
|
* echo "export RAILS_ENV=production" >> /var/www/zammad/.bashrc
|
||||||
|
|
||||||
|
=== Apache Config
|
||||||
|
* /var/lib/gems/1.9.1/gems/passenger-3.0.19/bin/passenger-install-apache2-module
|
||||||
|
* vi /etc/apache2/sites-available/zammad
|
||||||
|
* gem install rails therubyracer passenger
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName zammad.inet.h1.mdd
|
||||||
|
ServerAdmin abauer@magix.net
|
||||||
|
|
||||||
|
SuexecUserGroup "zammad" "zammad"
|
||||||
|
|
||||||
|
DocumentRoot "/var/www/zammad/public/"
|
||||||
|
|
||||||
|
<Directory "/var/www/zammad/public/">
|
||||||
|
Order allow,deny
|
||||||
|
allow from all
|
||||||
|
# This relaxes Apache security settings.
|
||||||
|
AllowOverride all
|
||||||
|
# MultiViews must be turned off.
|
||||||
|
Options -MultiViews
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
RailsBaseURI /
|
||||||
|
PassengerResolveSymlinksInDocumentRoot on
|
||||||
|
</VirtualHost>
|
||||||
|
* rm /etc/apache2/sites-enabled/000-default
|
||||||
|
* ln -s /etc/apache2/sites-available/zammad /etc/apache2/sites-enabled/zammad
|
||||||
|
* ln -s /etc/apache2/mods-available/suexec.load /etc/apache2/mods-enabled/suexec.load
|
||||||
|
* echo "LoadModule passenger_module /var/lib/gems/1.9.1/gems/passenger-3.0.19/ext/apache2/mod_passenger.so" > /etc/apache2/mods-available/passenger.load
|
||||||
|
* echo -e "PassengerRoot /var/lib/gems/1.9.1/gems/passenger-3.0.19\nPassengerRuby /usr/bin/ruby1.9.1" > /etc/apache2/mods-available/passenger.conf
|
||||||
|
* ln -s /etc/apache2/mods-available/passenger.load /etc/apache2/mods-enabled/passenger.load
|
||||||
|
* ln -s /etc/apache2/mods-available/passenger.conf /etc/apache2/mods-enabled/passenger.conf
|
||||||
|
* service apache2 restart
|
||||||
|
|
||||||
|
|
||||||
|
=== Get Zammad
|
||||||
|
* cd /var/www/zammad
|
||||||
|
* wget http://zammad.org/zammad-1.0.1.tar.gz
|
||||||
|
* tar -xzf zammad-1.0.1.tar.gz
|
||||||
|
|
||||||
|
=== Edit Gemfile
|
||||||
|
* vi Gemfile
|
||||||
|
* comment
|
||||||
|
* gem 'sqlite3'
|
||||||
|
* uncomment
|
||||||
|
* gem 'libv8', '~> 3.11.8'
|
||||||
|
* gem 'execjs'
|
||||||
|
* gem 'therubyracer'
|
||||||
|
|
||||||
|
=== Install zammad
|
||||||
|
* bundle install
|
||||||
|
* chown -R zammad:zammad /var/www/zammad
|
||||||
|
|
||||||
|
=== Create Database
|
||||||
|
* mysql --defaults-extra-file=/etc/mysql/debian.cnf -e "CREATE DATABASE zammad_prod DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; CREATE USER 'zammad'@'localhost' IDENTIFIED BY 'some_pass'; GRANT ALL PRIVILEGES ON zammad_prod.* TO 'zammad'@'localhost'; FLUSH PRIVILEGES;"
|
||||||
|
* vi config/database.yml
|
||||||
|
* su zammad
|
||||||
|
* cd ~
|
||||||
|
* rake db:migrate
|
||||||
|
* rake db:seed
|
||||||
|
* rake assets:precompile
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
== With Apache mod_proxy
|
||||||
|
|
||||||
=== Prerequisits
|
=== Prerequisits
|
||||||
* apt-get install ruby1.9.1-full build-essential apache2-suexec mysql-server libmysqlclient-dev postfix
|
* apt-get install ruby1.9.1-full build-essential apache2-suexec mysql-server libmysqlclient-dev postfix
|
||||||
* update-alternatives --set ruby /usr/bin/ruby1.9.1
|
* update-alternatives --set ruby /usr/bin/ruby1.9.1
|
||||||
* update-alternatives --set gem /usr/bin/gem1.9.1
|
* update-alternatives --set gem /usr/bin/gem1.9.1
|
||||||
* gem install rails
|
* gem install rails therubyracer
|
||||||
* gem install therubyracer
|
|
||||||
|
|
||||||
=== Add User
|
=== Add User
|
||||||
* useradd zammad -m -d /var/www/zammad -s /bin/bash
|
* useradd zammad -m -d /var/www/zammad -s /bin/bash
|
||||||
|
|
Loading…
Reference in a new issue