Commit a1c6da617b3d9f11f8b06f010e28835e91c3bf36

Authored by Macartur Carvalho
1 parent 899b8088

alterando redmine.sh

Showing 1 changed file with 22 additions and 9 deletions   Show diff stats
script/redmine.sh
... ... @@ -2,6 +2,15 @@
2 2  
3 3 # Pré-requisitos
4 4  
  5 +DATABASE_HOST=$1
  6 +
  7 +if [[ ! "$DATABASE_HOST" ]]
  8 + then
  9 + echo " Parametros nao encontrados."
  10 + echo " ./redmine.sh <DATABASE_HOST> "
  11 + exit -1
  12 +fi
  13 +
5 14 # Atualizacao
6 15  
7 16 sudo yum update -y
... ... @@ -17,7 +26,11 @@ sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.no
17 26  
18 27 sudo yum -y install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel subversion git postgresql-devel gcc gcc-c++.x86_64 make automake autoconf curl-devel openssl-devel zlib-devel httpd-devel apr-devel apr-util-devel sqlite-devel libxslt-devel libxml2-devel.x86_64 php-pear ImageMagick ImageMagick-devel ImageMagick-perl vim
19 28  
20   -# 2. Compilando o ruby
  29 +# 2. Adicionando /usr/local/bin no path
  30 +
  31 +sudo sed -i 's/\/sbin:\/bin:\/usr\/sbin:\/usr\/bin/\/sbin:\/bin:\/usr\/sbin:\/usr\/bin:\/usr\/local\/bin/' /etc/sudoers
  32 +
  33 +# 3. Compilando o ruby
21 34  
22 35 mkdir /tmp/ruby && cd /tmp/ruby
23 36 sudo curl --progress http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p451.tar.gz | tar xz
... ... @@ -26,14 +39,10 @@ cd ruby-2.0.0-p451
26 39 make
27 40 sudo make prefix=/usr/local install
28 41  
29   -# 3. Instalando bundle
  42 +# 4. Instalando bundle
30 43  
31 44 sudo gem install bundle --no-ri --no-rdoc
32 45  
33   -# 4. Adicionando /usr/local/bin no path
34   -
35   -sudo sed -i 's/\/sbin:\/bin:\/usr\/sbin:\/usr\/bin/\/sbin:\/bin:\/usr\/sbin:\/usr\/bin:\/usr\/local\/bin/' /etc/sudoers
36   -
37 46 # 5. Instalando o redmine 2.3-stable
38 47  
39 48 cd /opt
... ... @@ -69,11 +78,11 @@ echo &quot;pt-BR&quot; | RAILS_ENV=production rake redmine:load_default_data
69 78  
70 79 cd /opt/redmine
71 80 mkdir pids
72   -wget https://gitlab.com/softwarepublico/labsei/raw/master/arquivos/redmine/unicorn.rb -O config/unicorn.rb
  81 +wget https://gitlab.com/softwarepublico/colabdocumentation/raw/master/Arquivos/redmine/unicorn.rb -O config/unicorn.rb
73 82  
74 83 # 10. Configurando routes.rb
75 84  
76   -wget https://gitlab.com/softwarepublico/labsei/raw/master/arquivos/redmine/routes.rb -O config/routes.rb
  85 +wget https://gitlab.com/softwarepublico/colabdocumentation/raw/master/Arquivos/redmine/routes.rb -O config/routes.rb
77 86  
78 87 # 11. Adicionando link simbólico
79 88  
... ... @@ -103,6 +112,10 @@ bundle install --without mysql sqlite
103 112 bundle exec rake db:migrate
104 113 bundle exec rake redmine:backlogs:install story_trackers=2 task_tracker=1
105 114  
106   -# 16. Executando redmine
  115 +#16. Instalando plugin do Remote User
  116 +cd /opt/redmine/plugins
  117 +git clone https://github.com/colab-community/single_auth.git
  118 +
  119 +# 17. Executando redmine
107 120  
108 121 sudo /usr/local/bin/unicorn_rails -c /opt/redmine/config/unicorn.rb -E production -p 80 -D
... ...