From 6a60a11c4738f3b04dc9574cdda39241667d2ec6 Mon Sep 17 00:00:00 2001 From: Robin Naundorf Date: Wed, 19 Oct 2016 13:39:06 +0200 Subject: [PATCH 1/6] Fix wrong apt-get commands in Ubuntu Install doc Delete duplicate 'apt-get install' --- README_Install_Ubuntu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README_Install_Ubuntu.md b/README_Install_Ubuntu.md index f9965e0f2..72304a0e8 100644 --- a/README_Install_Ubuntu.md +++ b/README_Install_Ubuntu.md @@ -2,7 +2,7 @@ ## With Apache mod_proxy / MySQL ### Prerequisits -* apt-get install apt-get install curl git-core patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev sqlite3 libsqlite3-dev autotools-dev libxslt1-dev libyaml-0-2 autoconf automake libreadline6-dev libyaml-dev libtool +* apt-get install curl git-core patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev sqlite3 libsqlite3-dev autotools-dev libxslt1-dev libyaml-0-2 autoconf automake libreadline6-dev libyaml-dev libtool ### Add User * useradd zammad -m -s /bin/bash @@ -109,7 +109,7 @@ ## Testinstallation for Developers via RVM / SQLite ### Prerequisits -* apt-get install apt-get install curl git-core patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev sqlite3 libsqlite3-dev autotools-dev libxslt1-dev libyaml-0-2 autoconf automake libreadline6-dev libyaml-dev libtool +* apt-get install curl git-core patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev sqlite3 libsqlite3-dev autotools-dev libxslt1-dev libyaml-0-2 autoconf automake libreadline6-dev libyaml-dev libtool ### Add User * useradd zammad -m -s /bin/bash From 0592286eb169992bf1925e6d585dd2fd01c92dec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Wed, 19 Oct 2016 21:23:34 +0200 Subject: [PATCH 2/6] Update README_Install_Ubuntu.md --- README_Install_Ubuntu.md | 154 ++++++--------------------------------- 1 file changed, 24 insertions(+), 130 deletions(-) diff --git a/README_Install_Ubuntu.md b/README_Install_Ubuntu.md index 72304a0e8..de0082450 100644 --- a/README_Install_Ubuntu.md +++ b/README_Install_Ubuntu.md @@ -1,146 +1,40 @@ -# Installation on Ubuntu 12.04 Server -## With Apache mod_proxy / MySQL +# Installation on Ubuntu 16.04 Server +## With MySQL -### Prerequisits -* apt-get install curl git-core patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev sqlite3 libsqlite3-dev autotools-dev libxslt1-dev libyaml-0-2 autoconf automake libreadline6-dev libyaml-dev libtool +### Prerequisites +* apt-get install curl git-core patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev sqlite3 libsqlite3-dev autotools-dev libxslt1-dev libyaml-0-2 autoconf automake libreadline6-dev libyaml-dev libtool libgmp-dev libgdbm-dev libncurses5-dev pkg-config libffi-dev libmysqlclient-dev mysql-server +* mysql --defaults-extra-file=/etc/mysql/debian.cnf -e "CREATE USER 'zammad'@'localhost' IDENTIFIED BY 'Your_Pass_Word!'; GRANT ALL PRIVILEGES ON zammad_prod.* TO 'zammad'@'localhost'; FLUSH PRIVILEGES;" ### Add User -* useradd zammad -m -s /bin/bash -* echo -e "export RAILS_ENV=development" >> /home/zammad/.bashrc -* su zammad -* cd ~ - -### Install Ruby & Rails -* curl -L https://get.rvm.io | bash -s stable -* source /home/zammad/.rvm/scripts/rvm -* echo "source /home/zammad/.rvm/scripts/rvm" >> /home/zammad/.bashrc -* rvm install ruby -* gem install rails therubyracer - -### Apache Config -* vi /etc/apache2/sites-available/zammad - -``` - - ServerName zammad.example.com - ServerAdmin yourmail@example.com - - SuexecUserGroup "zammad" "zammad" - - ## don't loose time with IP address lookups - HostnameLookups Off - - ## needed for named virtual hosts - UseCanonicalName Off - - ## configures the footer on server-generated documents - ServerSignature Off - - ProxyRequests Off - ProxyPreserveHost On - - - Order deny,allow - Allow from localhost - - - ProxyPass /assets ! - ProxyPass /favicon.ico ! - ProxyPass /robots.txt ! - ProxyPass / http://localhost:3000/ - - DocumentRoot "/var/www/zammad/public" - - - Options FollowSymLinks - AllowOverride None - - - - Options FollowSymLinks - Order allow,deny - Allow from all - - - -``` - -* 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/proxy.conf /etc/apache2/mods-enabled/proxy.conf -* ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled/proxy.load -* ln -s /etc/apache2/mods-available/proxy_http.load /etc/apache2/mods-enabled/proxy_http.load -* ln -s /etc/apache2/mods-available/suexec.load /etc/apache2/mods-enabled/suexec.load -* service apache2 restart +* useradd zammad -m -d /opt/zammad -s /bin/bash +* echo "export RAILS_ENV=production" >> /opt/zammad/.bashrc ### Get Zammad -* cd /var/www/zammad -* wget http://zammad.org/zammad-latest.tar.gz +* su zammad +* cd ~ +* wget http://ftp.zammad.com/zammad-latest.tar.gz * tar -xzf zammad-latest.tar.gz -### Edit Gemfile -* vi Gemfile - * 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-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 - -### Start Server -* rake assets:precompile -* puma -p 3000 # application web server -* script/websocket-server.rb start # non blocking websocket server -* script/scheduler.rb start # generate overviews on demand, just send changed data to browser - - - - -## Testinstallation for Developers via RVM / SQLite - -### Prerequisits -* apt-get install curl git-core patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev sqlite3 libsqlite3-dev autotools-dev libxslt1-dev libyaml-0-2 autoconf automake libreadline6-dev libyaml-dev libtool - -### Add User -* useradd zammad -m -s /bin/bash -* echo -e "export RAILS_ENV=development" >> /home/zammad/.bashrc -* su zammad -* cd ~ - -### Install Ruby & Rails +### Install Environnment +* gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 * curl -L https://get.rvm.io | bash -s stable -* source /home/zammad/.rvm/scripts/rvm -* echo "source /home/zammad/.rvm/scripts/rvm" >> /home/zammad/.bashrc -* rvm install ruby -* gem install rails therubyracer - -### 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 - * uncomment - * gem 'libv8', '~> 3.11.8' - * gem 'execjs' - * gem 'therubyracer' +* source /opt/zammad/.rvm/scripts/rvm +* echo "source /opt/zammad/.rvm/scripts/rvm" >> /opt/zammad/.bashrc +* echo "rvm --default use 2.3.1" >> /opt/zammad/.bashrc +* rvm install 2.3.1 +* gem install bundler ### Install zammad -* bundle install +* bundle install --without test development postgres +* cp config/database.yml.dist config/database.yml +* vi config/database.yml +* rake db:create * rake db:migrate * rake db:seed * rake assets:precompile + +### Start Zammad +* rake assets:precompile * puma -p 3000 # application web server * script/websocket-server.rb start # non blocking websocket server * script/scheduler.rb start # generate overviews on demand, just send changed data to browser From 9adf438040f0f53be90d8d4cbce398b09959b975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Wed, 19 Oct 2016 21:25:41 +0200 Subject: [PATCH 3/6] Update README_Install_Ubuntu.md --- README_Install_Ubuntu.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README_Install_Ubuntu.md b/README_Install_Ubuntu.md index de0082450..3672e0470 100644 --- a/README_Install_Ubuntu.md +++ b/README_Install_Ubuntu.md @@ -34,8 +34,6 @@ * rake assets:precompile ### Start Zammad -* rake assets:precompile -* puma -p 3000 # application web server -* script/websocket-server.rb start # non blocking websocket server -* script/scheduler.rb start # generate overviews on demand, just send changed data to browser - +* rails s -b 0.0.0.0 -p 3000 +* script/websocket-server.rb start +* script/scheduler.rb start From 78b959749662e68c42eb2f4dd131bbf8cffd90f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Wed, 19 Oct 2016 21:47:31 +0200 Subject: [PATCH 4/6] Update README_Install_Ubuntu.md --- README_Install_Ubuntu.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README_Install_Ubuntu.md b/README_Install_Ubuntu.md index 3672e0470..ff98c1292 100644 --- a/README_Install_Ubuntu.md +++ b/README_Install_Ubuntu.md @@ -2,8 +2,9 @@ ## With MySQL ### Prerequisites -* apt-get install curl git-core patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev sqlite3 libsqlite3-dev autotools-dev libxslt1-dev libyaml-0-2 autoconf automake libreadline6-dev libyaml-dev libtool libgmp-dev libgdbm-dev libncurses5-dev pkg-config libffi-dev libmysqlclient-dev mysql-server +* apt-get install curl git-core patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev sqlite3 libsqlite3-dev autotools-dev libxslt1-dev libyaml-0-2 autoconf automake libreadline6-dev libyaml-dev libtool libgmp-dev libgdbm-dev libncurses5-dev pkg-config libffi-dev libmysqlclient-dev mysql-server nginx * mysql --defaults-extra-file=/etc/mysql/debian.cnf -e "CREATE USER 'zammad'@'localhost' IDENTIFIED BY 'Your_Pass_Word!'; GRANT ALL PRIVILEGES ON zammad_prod.* TO 'zammad'@'localhost'; FLUSH PRIVILEGES;" +* ln -s /opt/zammad/contrib/nginx-zammad.conf /etc/nginx/sites-enabled/zammad.conf ### Add User * useradd zammad -m -d /opt/zammad -s /bin/bash @@ -34,6 +35,6 @@ * rake assets:precompile ### Start Zammad -* rails s -b 0.0.0.0 -p 3000 +* rails s -p 3000 * script/websocket-server.rb start * script/scheduler.rb start From b66d6e70795140d85ae5ec3812a583b31ee91e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Wed, 19 Oct 2016 22:46:13 +0200 Subject: [PATCH 5/6] Update README_Install_Ubuntu.md --- README_Install_Ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_Install_Ubuntu.md b/README_Install_Ubuntu.md index ff98c1292..33c0ad6f0 100644 --- a/README_Install_Ubuntu.md +++ b/README_Install_Ubuntu.md @@ -4,7 +4,7 @@ ### Prerequisites * apt-get install curl git-core patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev sqlite3 libsqlite3-dev autotools-dev libxslt1-dev libyaml-0-2 autoconf automake libreadline6-dev libyaml-dev libtool libgmp-dev libgdbm-dev libncurses5-dev pkg-config libffi-dev libmysqlclient-dev mysql-server nginx * mysql --defaults-extra-file=/etc/mysql/debian.cnf -e "CREATE USER 'zammad'@'localhost' IDENTIFIED BY 'Your_Pass_Word!'; GRANT ALL PRIVILEGES ON zammad_prod.* TO 'zammad'@'localhost'; FLUSH PRIVILEGES;" -* ln -s /opt/zammad/contrib/nginx-zammad.conf /etc/nginx/sites-enabled/zammad.conf +* ln -s /opt/zammad/contrib/nginx/sites-enabled/zammad.conf /etc/nginx/sites-enabled/zammad.conf ### Add User * useradd zammad -m -d /opt/zammad -s /bin/bash From 1db7ccc6086577ac2ee6eebd1c0eedcdc87d4646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Wed, 19 Oct 2016 22:49:03 +0200 Subject: [PATCH 6/6] Update README_Install_Ubuntu.md --- README_Install_Ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_Install_Ubuntu.md b/README_Install_Ubuntu.md index 33c0ad6f0..964dc177d 100644 --- a/README_Install_Ubuntu.md +++ b/README_Install_Ubuntu.md @@ -1,5 +1,5 @@ # Installation on Ubuntu 16.04 Server -## With MySQL +## With Nginx & MySQL ### Prerequisites * apt-get install curl git-core patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev sqlite3 libsqlite3-dev autotools-dev libxslt1-dev libyaml-0-2 autoconf automake libreadline6-dev libyaml-dev libtool libgmp-dev libgdbm-dev libncurses5-dev pkg-config libffi-dev libmysqlclient-dev mysql-server nginx