diff --git a/script/redmine.sh b/script/redmine.sh index 065cee0..e864301 100644 --- a/script/redmine.sh +++ b/script/redmine.sh @@ -3,42 +3,43 @@ # Pré-requisitos # Atualizacao -yum update -y +sudo yum update -y + ## Instalação do Redmine 2.3 # Instalando EPEL -yum install -y wget -rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm +sudo yum install -y wget +sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm # 1. Instale os requisitos -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 +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 # 2. Compilando o ruby mkdir /tmp/ruby && cd /tmp/ruby -curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p451.tar.gz | tar xz +sudo curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p451.tar.gz | tar xz cd ruby-2.0.0-p451 ./configure --disable-install-rdoc make -make prefix=/usr/local install +sudo make prefix=/usr/local install # 3. Instalando bundle -sleep 10 -gem install bundle --no-ri --no-rdoc +sudo /usr/local/bin/gem install bundle --no-ri --no-rdoc # 4. Adicionando /usr/local/bin no path -sed -i 's/\/sbin:\/bin:\/usr\/sbin:\/usr\/bin/\/sbin:\/bin:\/usr\/sbin:\/usr\/bin:\/usr\/local\/bin/' /etc/sudoers +sudo sed -i 's/\/sbin:\/bin:\/usr\/sbin:\/usr\/bin/\/sbin:\/bin:\/usr\/sbin:\/usr\/bin:\/usr\/local\/bin/' /etc/sudoers # 5. Instalando o redmine 2.3-stable cd /opt -svn co http://svn.redmine.org/redmine/branches/2.3-stable redmine -mkdir -p tmp/pdf public/plugin_assets +sudo svn co http://svn.redmine.org/redmine/branches/2.3-stable redmine +sudo mkdir -p tmp/pdf public/plugin_assets ## 6. Instalando gems +sudo chown -R $USER:$GROUP redmine cd /opt/redmine bundle install --without mysql sqlite -gem install unicorn --no-ri --no-rdoc -gem install pg -v '0.17.1' --no-ri --no-rdoc +sudo gem install unicorn --no-ri --no-rdoc +sudo gem install pg -v '0.17.1' --no-ri --no-rdoc ## 7. Configurar database.yml no Redmine# cd config/ @@ -79,7 +80,7 @@ export RAILS_ENV bundle install ## 14. Corrigindo dependências -gem uninstall rack -v '1.5.2' +sudo /usr/local/bin/gem uninstall rack -v '1.5.2' ## 15. Bundle install redmine cd /opt/redmine @@ -87,5 +88,6 @@ bundle install --without mysql sqlite bundle exec rake db:migrate bundle exec rake redmine:backlogs:install story_trackers=2 task_tracker=1 + ## 16. Executando redmine -unicorn_rails -c /opt/redmine/config/unicorn.rb -E production -l 0.0.0.0:9080 -D \ No newline at end of file +sudo unicorn_rails -c /opt/redmine/config/unicorn.rb -E production -l 0.0.0.0:9080 -D \ No newline at end of file -- libgit2 0.21.2