Commit a1c6da617b3d9f11f8b06f010e28835e91c3bf36
1 parent
899b8088
Exists in
master
and in
1 other branch
alterando redmine.sh
Showing
1 changed file
with
22 additions
and
9 deletions
Show diff stats
script/redmine.sh
@@ -2,6 +2,15 @@ | @@ -2,6 +2,15 @@ | ||
2 | 2 | ||
3 | # Pré-requisitos | 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 | # Atualizacao | 14 | # Atualizacao |
6 | 15 | ||
7 | sudo yum update -y | 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,7 +26,11 @@ sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.no | ||
17 | 26 | ||
18 | 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 | 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 | mkdir /tmp/ruby && cd /tmp/ruby | 35 | mkdir /tmp/ruby && cd /tmp/ruby |
23 | sudo curl --progress http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p451.tar.gz | tar xz | 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,14 +39,10 @@ cd ruby-2.0.0-p451 | ||
26 | make | 39 | make |
27 | sudo make prefix=/usr/local install | 40 | sudo make prefix=/usr/local install |
28 | 41 | ||
29 | -# 3. Instalando bundle | 42 | +# 4. Instalando bundle |
30 | 43 | ||
31 | sudo gem install bundle --no-ri --no-rdoc | 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 | # 5. Instalando o redmine 2.3-stable | 46 | # 5. Instalando o redmine 2.3-stable |
38 | 47 | ||
39 | cd /opt | 48 | cd /opt |
@@ -69,11 +78,11 @@ echo "pt-BR" | RAILS_ENV=production rake redmine:load_default_data | @@ -69,11 +78,11 @@ echo "pt-BR" | RAILS_ENV=production rake redmine:load_default_data | ||
69 | 78 | ||
70 | cd /opt/redmine | 79 | cd /opt/redmine |
71 | mkdir pids | 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 | # 10. Configurando routes.rb | 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 | # 11. Adicionando link simbólico | 87 | # 11. Adicionando link simbólico |
79 | 88 | ||
@@ -103,6 +112,10 @@ bundle install --without mysql sqlite | @@ -103,6 +112,10 @@ bundle install --without mysql sqlite | ||
103 | bundle exec rake db:migrate | 112 | bundle exec rake db:migrate |
104 | bundle exec rake redmine:backlogs:install story_trackers=2 task_tracker=1 | 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 | sudo /usr/local/bin/unicorn_rails -c /opt/redmine/config/unicorn.rb -E production -p 80 -D | 121 | sudo /usr/local/bin/unicorn_rails -c /opt/redmine/config/unicorn.rb -E production -p 80 -D |