Commit 184b94a14cf2e7d0ba79e9a9d4fdf5b04fa9f8b8
1 parent
63a3d289
Exists in
master
and in
1 other branch
Revisao da instalacao do Redmine
- Falta backlogs
Showing
2 changed files
with
128 additions
and
82 deletions
Show diff stats
LabSEI.tex
installDoc/redmine-sei.tex
| ... | ... | @@ -17,7 +17,7 @@ rpm -Uvh http://fedora.uib.no/epel/6/x86\_64/epel-release-6-8.noarch.rpm |
| 17 | 17 | |
| 18 | 18 | \fbox{\parbox{\textwidth}{ |
| 19 | 19 | \texttt{ |
| 20 | -\footnotesize{sudo yum localinstall http://yum.postgresql.org/9.3/redhat/rhel-6-x86\_64/pgdg-centos93-9.3-1.noarch.rpm -y | |
| 20 | +\scriptsize{sudo yum localinstall http://yum.postgresql.org/9.3/redhat/rhel-6-x86\_64/pgdg-centos93-9.3-1.noarch.rpm -y | |
| 21 | 21 | \\ |
| 22 | 22 | sudo yum install postgresql93 postgresql93-devel postgresql93-libs postgresql93-server -y |
| 23 | 23 | }}}} |
| ... | ... | @@ -34,30 +34,28 @@ sudo /etc/init.d/postgresql-9.3 restart |
| 34 | 34 | \subsubsection{Modificar senha do Postgres} |
| 35 | 35 | |
| 36 | 36 | \fbox{\parbox{\textwidth}{ |
| 37 | -\texttt{sudo -u postgres psql template1 -c ``ALTER USER | |
| 38 | -postgres with encrypted password `postgres' ''; | |
| 37 | +\texttt{sudo -u postgres psql template1 -c | |
| 38 | +``ALTER USER postgres with encrypted password `postgres' ''; | |
| 39 | 39 | }}} |
| 40 | 40 | |
| 41 | 41 | \subsubsection{Configurando o Postgres} |
| 42 | 42 | |
| 43 | -\fbox{ | |
| 44 | -\texttt{sudo vim /var/lib/pgsql/9.3/data/postgresql.conf}} | |
| 45 | - | |
| 46 | -\fbox{ | |
| 47 | -\texttt{descomentar: # listen\_addresses = `localhost'} | |
| 48 | - | |
| 49 | 43 | \fbox{\parbox{\textwidth}{ |
| 50 | -\texttt{[ESC]:wq! | |
| 44 | +\texttt{ | |
| 45 | +sudo vim /var/lib/pgsql/9.3/data/postgresql.conf | |
| 46 | +\\ | |
| 47 | +descomentar: \# listen\_addresses = `localhost' | |
| 51 | 48 | }}} |
| 52 | 49 | |
| 53 | -Editar pg\_hba.conf para definir as permissões | |
| 54 | - | |
| 55 | -\fbox{ | |
| 56 | -\texttt{sudo vim /var/lib/pgsql/9.3/data/pg\_hba.conf}} | |
| 57 | 50 | |
| 58 | 51 | \subsubsection{Usar a permissão certa de usuário do Redmine no banco de dados do Redmine} |
| 59 | 52 | |
| 60 | 53 | \fbox{\parbox{\textwidth}{ |
| 54 | +\texttt{sudo vim /var/lib/pgsql/9.3/data/pg\_hba.conf}}} | |
| 55 | + | |
| 56 | +O arquivo deve ficar desta forma: | |
| 57 | + | |
| 58 | +\fbox{\parbox{\textwidth}{ | |
| 61 | 59 | \texttt{ |
| 62 | 60 | \# TYPE DATABASE USER ADDRESS METHOD |
| 63 | 61 | \\ |
| ... | ... | @@ -74,13 +72,10 @@ host all redmine 127.0.0.1/32 md5 |
| 74 | 72 | host all redmine ::1/128 md5 |
| 75 | 73 | }}} |
| 76 | 74 | |
| 77 | -\fbox{ | |
| 78 | -\texttt{[ESC]:wq!}} | |
| 79 | - | |
| 80 | 75 | \subsubsection{Reiniciar Postgresql} |
| 81 | 76 | |
| 82 | -\fbox{ | |
| 83 | -\texttt{sudo /etc/init.d/postgresql-9.3 restart}} | |
| 77 | +\fbox{\parbox{\textwidth}{ | |
| 78 | +\texttt{sudo /etc/init.d/postgresql-9.3 restart}}} | |
| 84 | 79 | |
| 85 | 80 | \subsection{Instalar Requisitos das Gems} |
| 86 | 81 | |
| ... | ... | @@ -88,17 +83,21 @@ host all redmine ::1/128 md5 |
| 88 | 83 | \texttt{ |
| 89 | 84 | sudo yum install gcc gcc-c++.x86\_64 make automake autoconf curl-devel |
| 90 | 85 | openssl-devel zlib-devel httpd-devel apr-devel apr-util-devel |
| 91 | -sqlite-devel ruby-rdoc ruby-devel}}} | |
| 92 | - | |
| 93 | -\fbox{ | |
| 94 | -\texttt{sudo yum install rubygems libxslt-devel libxml2-devel.x86\_64}} | |
| 86 | +sqlite-devel ruby-rdoc ruby-devel rubygems libxslt-devel libxml2-devel.x86\_64 -y}}} | |
| 95 | 87 | |
| 96 | 88 | \subsection{Atualizar para a Gem 1.4.2} |
| 97 | 89 | |
| 98 | 90 | \fbox{\parbox{\textwidth}{ |
| 99 | 91 | \texttt{ |
| 100 | -wget http://production.cf.rubygems.org/rubygems/rubygems-1.4.2.tgz tar | |
| 101 | -zxvf rubygems-1.4.2.tgz cd rubygems-1.4.2 ruby setup.rb gem -v | |
| 92 | +wget http://production.cf.rubygems.org/rubygems/rubygems-1.4.2.tgz | |
| 93 | +\\ | |
| 94 | +tar zxvf rubygems-1.4.2.tgz | |
| 95 | +\\ | |
| 96 | +cd rubygems-1.4.2 | |
| 97 | +\\ | |
| 98 | +ruby setup.rb | |
| 99 | +\\ | |
| 100 | +gem -v | |
| 102 | 101 | }}} |
| 103 | 102 | |
| 104 | 103 | |
| ... | ... | @@ -106,69 +105,62 @@ zxvf rubygems-1.4.2.tgz cd rubygems-1.4.2 ruby setup.rb gem -v |
| 106 | 105 | |
| 107 | 106 | \fbox{\parbox{\textwidth}{ |
| 108 | 107 | \texttt{ |
| 109 | -sudo yum install php-pear gcc ImageMagick ImageMagick-devel | |
| 110 | -ImageMagick-perl | |
| 108 | +sudo yum install php-pear ImageMagick ImageMagick-devel ImageMagick-perl -y | |
| 111 | 109 | }}} |
| 112 | 110 | |
| 113 | 111 | \subsection{Instalar Gem Bundle} |
| 114 | 112 | |
| 115 | 113 | \fbox{\parbox{\textwidth}{ |
| 116 | 114 | \texttt{ |
| 117 | -sudo gem install bundle --no-ri --no-rdoc | |
| 115 | +sudo gem install bundle -\--no-ri -\--no-rdoc | |
| 118 | 116 | }}} |
| 119 | 117 | |
| 120 | -\subsection{Instalar NGINX} | |
| 121 | - | |
| 122 | -\fbox{\parbox{\textwidth}{ | |
| 123 | -\texttt{ | |
| 124 | -cd /tmp wget | |
| 125 | -http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release centos-6-0.el6.ngx.noarch.rpm | |
| 126 | -}}} | |
| 118 | +\subsection{Instalar Redmine 2.5.1} | |
| 127 | 119 | |
| 128 | 120 | \fbox{\parbox{\textwidth}{ |
| 129 | 121 | \texttt{ |
| 130 | -sudo rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm sudo yum | |
| 131 | -install nginx -y sudo chkconfig nginx on | |
| 122 | +cd /opt | |
| 123 | +\\ | |
| 124 | +svn co http://svn.redmine.org/redmine/branches/2.5-stable redmine | |
| 125 | +\\ | |
| 126 | +sudo mkdir -p tmp/pdf public/plugin\_assets | |
| 132 | 127 | }}} |
| 133 | 128 | |
| 134 | -\subsection{Instalar Redmine 2.5.1} | |
| 129 | +\subsection{Instalar requisitos da Gem} | |
| 135 | 130 | |
| 136 | 131 | \fbox{\parbox{\textwidth}{ |
| 137 | 132 | \texttt{ |
| 138 | -cd /opt svn co http://svn.redmine.org/redmine/branches/2.5-stable | |
| 139 | -redmine sudo mkdir -p tmp/pdf public/plugin\_assets | |
| 133 | +cd /opt/redmine | |
| 134 | +\\ | |
| 135 | +bundle install --without mysql sqlite | |
| 140 | 136 | }}} |
| 141 | 137 | |
| 142 | -\subsection{Instalar requisitos da Gem} | |
| 143 | - | |
| 144 | -\fbox{ | |
| 145 | -\texttt{cd /opt/redmine bundle install --without mysql sqlite}} | |
| 146 | - | |
| 147 | 138 | |
| 148 | 139 | \subsection{Configurar postgresql} |
| 149 | 140 | |
| 150 | -\fbox{ | |
| 141 | +\fbox{\parbox{\textwidth}{ | |
| 151 | 142 | \texttt{ |
| 152 | -sudo -u postgres psql}} | |
| 143 | +sudo -u postgres psql | |
| 144 | +}}} | |
| 145 | + | |
| 146 | +Execute: | |
| 153 | 147 | |
| 154 | 148 | \fbox{\parbox{\textwidth}{ |
| 155 | 149 | \texttt{ |
| 156 | -\begin{quote} | |
| 157 | -\begin{quote} | |
| 158 | -CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD `redmine' NOINHERIT VALID | |
| 150 | +``CREATE ROLE redmine LOGIN ENCRYPTED PASSWORD `redmine' NOINHERIT VALID | |
| 159 | 151 | UNTIL `infinity'; CREATE DATABASE redmine WITH ENCODING=`UTF8' |
| 160 | -OWNER=redmine; | |
| 161 | -\end{quote} | |
| 162 | -\end{quote} | |
| 152 | +OWNER=redmine;'' | |
| 153 | +%\backslash q | |
| 163 | 154 | }}} |
| 164 | 155 | |
| 165 | 156 | |
| 166 | -\subsection{Installing Gems} | |
| 157 | +\subsection{Instalando Gems} | |
| 167 | 158 | |
| 168 | 159 | \fbox{\parbox{\textwidth}{ |
| 169 | 160 | \texttt{ |
| 170 | -sudo gem install pg -v `0.17.1' --no-ri --no-rdoc sudo gem install | |
| 171 | -unicorn --no-ri --no-rdoc sudo gem uninstall rake -v `10.3.2' | |
| 161 | +sudo gem install pg -v `0.17.1' -\--no-ri -\--no-rdoc | |
| 162 | +\\ | |
| 163 | +sudo gem install unicorn -\--no-ri -\--no-rdoc | |
| 172 | 164 | }}} |
| 173 | 165 | |
| 174 | 166 | |
| ... | ... | @@ -176,18 +168,31 @@ unicorn --no-ri --no-rdoc sudo gem uninstall rake -v `10.3.2' |
| 176 | 168 | |
| 177 | 169 | |
| 178 | 170 | \fbox{\parbox{\textwidth}{ |
| 179 | -\texttt{cd config/ mv database.yml.example database.yml vi database.yml | |
| 171 | +\texttt{ | |
| 172 | +cd config | |
| 173 | +\\ | |
| 174 | +mv database.yml.example database.yml | |
| 175 | +\\ | |
| 176 | +vim database.yml | |
| 180 | 177 | }}} |
| 181 | 178 | |
| 182 | - | |
| 183 | -\subsubsection{Comentar outras linhas e descomentar essas linhas:} | |
| 179 | +Comentar todas as linhas e descomentar estas baixo: | |
| 184 | 180 | |
| 185 | 181 | \fbox{\parbox{\textwidth}{ |
| 186 | 182 | \texttt{ |
| 187 | -\#---------------------- | |
| 188 | -production: adapter: postgresql database: redmine host: 10.18.0.10 (link | |
| 189 | -to database) username: redmine password: redmine encoding: utf8 | |
| 190 | -\#---------------------- | |
| 183 | +production: | |
| 184 | +\\ | |
| 185 | +adapter: postgresql | |
| 186 | +\\ | |
| 187 | +database: redmine | |
| 188 | +\\ | |
| 189 | +host: <ip-banco-de-dados> | |
| 190 | +\\ | |
| 191 | +username: redmine | |
| 192 | +\\ | |
| 193 | +password: redmine | |
| 194 | +\\ | |
| 195 | +encoding: utf8 | |
| 191 | 196 | }}} |
| 192 | 197 | |
| 193 | 198 | |
| ... | ... | @@ -196,8 +201,13 @@ to database) username: redmine password: redmine encoding: utf8 |
| 196 | 201 | |
| 197 | 202 | \fbox{\parbox{\textwidth}{ |
| 198 | 203 | \texttt{ |
| 199 | -rake generate\_secret\_token RAILS\_ENV=production rake db:migrate | |
| 200 | -RAILS\_ENV=production rake redmine:load\_default\_data escolher pt-BR | |
| 204 | +rake generate\_secret\_token RAILS\_ENV=production | |
| 205 | +\\ | |
| 206 | +rake db:migrate RAILS\_ENV=production | |
| 207 | +\\ | |
| 208 | +rake redmine:load\_default\_data RAILS\_ENV=production | |
| 209 | +\\ | |
| 210 | +(\emph{escolher pt-BR}) | |
| 201 | 211 | }}} |
| 202 | 212 | |
| 203 | 213 | |
| ... | ... | @@ -206,25 +216,57 @@ RAILS\_ENV=production rake redmine:load\_default\_data escolher pt-BR |
| 206 | 216 | |
| 207 | 217 | \fbox{\parbox{\textwidth}{ |
| 208 | 218 | \texttt{ |
| 209 | -cd /opt/redmine mkdir pids\\ vi config/unicorn.rb | |
| 219 | +cd /opt/redmine | |
| 220 | +\\ | |
| 221 | +mkdir pids | |
| 222 | +\\ | |
| 223 | +vim config/unicorn.rb | |
| 210 | 224 | }}} |
| 211 | 225 | |
| 226 | +Copie as linhas abaixo para unicorn.rb: | |
| 227 | + | |
| 212 | 228 | \fbox{\parbox{\textwidth}{ |
| 213 | 229 | \texttt{ |
| 214 | -Copy this code to file: | |
| 215 | -\#------------------------------------ \# Set the working application | |
| 216 | -directory \# working\_directory ``/path/to/your/app'' working\_directory | |
| 217 | -``/opt/redmine'' | |
| 218 | -\# Unicorn PID file location \# pid ``/path/to/pids/unicorn.pid'' pid | |
| 219 | -``/opt/redmine/pids/unicorn.pid'' | |
| 220 | -\# Path to logs \# stderr\_path ``/path/to/log/unicorn.log'' \# | |
| 221 | -stdout\_path ``/path/to/log/unicorn.log'' stderr\_path | |
| 222 | -``/opt/redmine/log/unicorn.log'' stdout\_path | |
| 223 | -``/opt/redmine/log/unicorn.log'' | |
| 224 | -\# Unicorn socket \#listen ``/tmp/unicorn.redmine.sock'' listen | |
| 225 | -``/tmp/unicorn.redmine.sock'' | |
| 226 | -\# Number of processes \# worker\_processes 4 worker\_processes 2 | |
| 227 | -\# Time-out timeout 30 | |
| 230 | +\#------------------------------------ | |
| 231 | +\\ | |
| 232 | +\# Set the working application directory | |
| 233 | +\\ | |
| 234 | +\# working\_directory ``/path/to/your/app'' | |
| 235 | +\\ | |
| 236 | +working\_directory ``/opt/redmine'' | |
| 237 | +\\ | |
| 238 | +\# Unicorn PID file location | |
| 239 | +\\ | |
| 240 | +\# pid ``/path/to/pids/unicorn.pid'' | |
| 241 | +\\ | |
| 242 | +pid ``/opt/redmine/pids/unicorn.pid'' | |
| 243 | +\\ | |
| 244 | +\# Path to logs | |
| 245 | +\\ | |
| 246 | +\# stderr\_path ``/path/to/log/unicorn.log'' | |
| 247 | +\\ | |
| 248 | +\# stdout\_path ``/path/to/log/unicorn.log'' | |
| 249 | +\\ | |
| 250 | +stderr\_path ``/opt/redmine/log/unicorn.log'' | |
| 251 | +\\ | |
| 252 | +stdout\_path ``/opt/redmine/log/unicorn.log'' | |
| 253 | +\\ | |
| 254 | +\# Unicorn socket | |
| 255 | +\\ | |
| 256 | +\#listen ``/tmp/unicorn.redmine.sock'' | |
| 257 | +\\ | |
| 258 | +listen ``/tmp/unicorn.redmine.sock'' | |
| 259 | +\\ | |
| 260 | +\# Number of processes | |
| 261 | +\\ | |
| 262 | +\# worker\_processes 4 | |
| 263 | +\\ | |
| 264 | +worker\_processes 2 | |
| 265 | +\\ | |
| 266 | +\# Time-out | |
| 267 | +\\ | |
| 268 | +timeout 30 | |
| 269 | +\\ | |
| 228 | 270 | \#------------------------------------- |
| 229 | 271 | }}} |
| 230 | 272 | |
| ... | ... | @@ -241,8 +283,11 @@ sudo /etc/init.d/postgresql-9.3 restart |
| 241 | 283 | |
| 242 | 284 | \fbox{\parbox{\textwidth}{ |
| 243 | 285 | \texttt{ |
| 244 | -sudo unicorn\_rails -c /opt/redmine/config/unicorn.rb -E production -l | |
| 245 | -0.0.0.0:3000 -D | |
| 286 | +\small{sudo unicorn\_rails -c /opt/redmine/config/unicorn.rb -E production -l | |
| 287 | +0.0.0.0:80 -D} | |
| 288 | +\\ | |
| 289 | +(\emph{subir na porta 80 porque está em uma máquina diferente do GitLab. | |
| 290 | + O padrão do Redmine é a porta 3000.}) | |
| 246 | 291 | }}} |
| 247 | 292 | |
| 248 | 293 | \subsection{Instalar Plugin Backlogs} | ... | ... |