Commit 913c9dc416d45992e2d3ce4cb1e6bf557264e4f8
1 parent
d412aad3
Exists in
master
and in
1 other branch
Final script redmine
Showing
1 changed file
with
17 additions
and
15 deletions
Show diff stats
script/redmine.sh
@@ -3,42 +3,43 @@ | @@ -3,42 +3,43 @@ | ||
3 | # Pré-requisitos | 3 | # Pré-requisitos |
4 | 4 | ||
5 | # Atualizacao | 5 | # Atualizacao |
6 | -yum update -y | 6 | +sudo yum update -y |
7 | + | ||
7 | 8 | ||
8 | ## Instalação do Redmine 2.3 | 9 | ## Instalação do Redmine 2.3 |
9 | 10 | ||
10 | # Instalando EPEL | 11 | # Instalando EPEL |
11 | -yum install -y wget | ||
12 | -rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | 12 | +sudo yum install -y wget |
13 | +sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | ||
13 | 14 | ||
14 | # 1. Instale os requisitos | 15 | # 1. Instale os requisitos |
15 | -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 | 16 | +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 |
16 | 17 | ||
17 | # 2. Compilando o ruby | 18 | # 2. Compilando o ruby |
18 | mkdir /tmp/ruby && cd /tmp/ruby | 19 | mkdir /tmp/ruby && cd /tmp/ruby |
19 | -curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p451.tar.gz | tar xz | 20 | +sudo curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p451.tar.gz | tar xz |
20 | cd ruby-2.0.0-p451 | 21 | cd ruby-2.0.0-p451 |
21 | ./configure --disable-install-rdoc | 22 | ./configure --disable-install-rdoc |
22 | make | 23 | make |
23 | -make prefix=/usr/local install | 24 | +sudo make prefix=/usr/local install |
24 | 25 | ||
25 | # 3. Instalando bundle | 26 | # 3. Instalando bundle |
26 | -sleep 10 | ||
27 | -gem install bundle --no-ri --no-rdoc | 27 | +sudo /usr/local/bin/gem install bundle --no-ri --no-rdoc |
28 | 28 | ||
29 | # 4. Adicionando /usr/local/bin no path | 29 | # 4. Adicionando /usr/local/bin no path |
30 | -sed -i 's/\/sbin:\/bin:\/usr\/sbin:\/usr\/bin/\/sbin:\/bin:\/usr\/sbin:\/usr\/bin:\/usr\/local\/bin/' /etc/sudoers | 30 | +sudo sed -i 's/\/sbin:\/bin:\/usr\/sbin:\/usr\/bin/\/sbin:\/bin:\/usr\/sbin:\/usr\/bin:\/usr\/local\/bin/' /etc/sudoers |
31 | 31 | ||
32 | # 5. Instalando o redmine 2.3-stable | 32 | # 5. Instalando o redmine 2.3-stable |
33 | cd /opt | 33 | cd /opt |
34 | -svn co http://svn.redmine.org/redmine/branches/2.3-stable redmine | ||
35 | -mkdir -p tmp/pdf public/plugin_assets | 34 | +sudo svn co http://svn.redmine.org/redmine/branches/2.3-stable redmine |
35 | +sudo mkdir -p tmp/pdf public/plugin_assets | ||
36 | 36 | ||
37 | ## 6. Instalando gems | 37 | ## 6. Instalando gems |
38 | +sudo chown -R $USER:$GROUP redmine | ||
38 | cd /opt/redmine | 39 | cd /opt/redmine |
39 | bundle install --without mysql sqlite | 40 | bundle install --without mysql sqlite |
40 | -gem install unicorn --no-ri --no-rdoc | ||
41 | -gem install pg -v '0.17.1' --no-ri --no-rdoc | 41 | +sudo gem install unicorn --no-ri --no-rdoc |
42 | +sudo gem install pg -v '0.17.1' --no-ri --no-rdoc | ||
42 | 43 | ||
43 | ## 7. Configurar database.yml no Redmine# | 44 | ## 7. Configurar database.yml no Redmine# |
44 | cd config/ | 45 | cd config/ |
@@ -79,7 +80,7 @@ export RAILS_ENV | @@ -79,7 +80,7 @@ export RAILS_ENV | ||
79 | bundle install | 80 | bundle install |
80 | 81 | ||
81 | ## 14. Corrigindo dependências | 82 | ## 14. Corrigindo dependências |
82 | -gem uninstall rack -v '1.5.2' | 83 | +sudo /usr/local/bin/gem uninstall rack -v '1.5.2' |
83 | 84 | ||
84 | ## 15. Bundle install redmine | 85 | ## 15. Bundle install redmine |
85 | cd /opt/redmine | 86 | cd /opt/redmine |
@@ -87,5 +88,6 @@ bundle install --without mysql sqlite | @@ -87,5 +88,6 @@ bundle install --without mysql sqlite | ||
87 | bundle exec rake db:migrate | 88 | bundle exec rake db:migrate |
88 | bundle exec rake redmine:backlogs:install story_trackers=2 task_tracker=1 | 89 | bundle exec rake redmine:backlogs:install story_trackers=2 task_tracker=1 |
89 | 90 | ||
91 | + | ||
90 | ## 16. Executando redmine | 92 | ## 16. Executando redmine |
91 | -unicorn_rails -c /opt/redmine/config/unicorn.rb -E production -l 0.0.0.0:9080 -D | ||
92 | \ No newline at end of file | 93 | \ No newline at end of file |
94 | +sudo unicorn_rails -c /opt/redmine/config/unicorn.rb -E production -l 0.0.0.0:9080 -D | ||
93 | \ No newline at end of file | 95 | \ No newline at end of file |