Como configurar un servidor de desarrollo

Bienvenidos !!!!!!



En este blog encontraremos como configurar un servidor de desarrollo con las siguientes tecnologias:


Sistema operativo: Linux Centos 5.
Manejador de proyectos: Redmine 2.2.3
Controlador de versiones: Subversion 
Web: apache

(SE ASUME QUE LA INSTALACION DEL SISTEMA OPERATIVO YA SE ENCUENTRA REALIZADA)

Estos son los pasos para realizar la instalacion y configuracion completa:


PASO 0: Preliminares:

Ejecutamos por linea de comandos los siguiente:


yum -y install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql mysql-server mysql-devel gcc gcc-c++

Creamos un directorio para  tener todos los instaladores

mkdir /home/instaladores
cd /home/instaladores




PASO 1: INSTALANDO REDMINE...


En la consola del equipo se debe ejecutar los siguientes comandos:

1.1. Obtenemos las librerias necesarias para la instalacion:
 

wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz




1.2. Configuramos e instalamos yaml.

tar xzvf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure --prefix=/usr/local
make
make install
 

1.3. Instalamos ruby

wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz

tar zxvf ruby-1.9.3-p392.tar.gz

cd ruby-1.9.3.p392
./configure --prefix=/usr/local --enable-shared --disable-install-doc --with-opt-dir=/usr/local/lib

make
make install
 

1.4. Instalamos ruby GEMS

wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.9.tgz


tar zxvf rubygems-1.8.9.tgz

cd rubygems-1.8.9
ruby setup.rb
 


1.5. Instalamos passenger, que es quien nos ayudara a configurar el entorno web de ruby y de redmine

gem install passenger
passenger-install-apache2-module


Lo siguiente lo debemos colocar en la configuracion del apache (httpd.conf), esta configuracion escucha las peticiones por el puerto 3000 para ahi dejar la URL del redmine.

 LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19/ext/apache2/mod_passenger.so
   PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.19
   PassengerRuby /usr/local/bin/ruby


   <VirtualHost *:3000>
    ServerName redmine.dyalogo.com
      DocumentRoot /var/www/redmine/public   
    ErrorLog logs/redmine_error_log
      <Directory /var/www/redmine/public>
         Options Indexes ExecCGI FollowSymLinks
        Allow from all
        AllowOverride all
      </Directory>
   </VirtualHost>


OJO LEER TODO LO QUE DICE Y COPIAR Y PEGAR EL CODIGO EN LA CONFIGURACION DEL APACHE.

1.6. Descargamos e instalamos redmine

wget http://rubyforge.org/frs/download.php/76771/redmine-2.2.3.tar.gz

tar zxvf redmine-2.2.3.tar.gz

mkdir /var/www/redmine
cp -av redmine-2.2.3/* /var/www/redmine

cd /var/www/redmine/


1.7. Instalamos el bundler (Ayuda  a terminar la configuracion de REDMINE)

gem install bundler
bundle install --without development test postgresql sqlite rmagick

1.8. Configuramos apache para que se inicie automaticamente

chkconfig httpd on

1.9. Configuramos MySQL

chkconfig mysqld on
service mysqld start
/usr/bin/mysql_secure_installation


create database redmine character set utf8;
create user 'redmine'@'localhost' identified by '
contrasena*rm';
grant all privileges on redmine.* to 'redmine'@'localhost'; 


Copiar config/database.yml.example to config/database.yml y edite el archivo como debe quedar la configuracion de su base de datos.

Ejemplo para  MySQL database using ruby1.8 or jruby:
production:
  adapter: mysql2
  database: redmine
  host: localhost
  username: redmine
  password: contrasena*rm



1.10. Generamos RAKE, para nuestra configuracion.

rake generate_secret_token
RAILS_ENV=production rake db:migrate
RAILS_ENV=production REDMINE_LANG=es rake redmine:load_default_data



1.11. Vamos al directorio de redmine

cd public
mv dispatch.cgi.example dispatch.cgi
mv dispatch.fcgi.example dispatch.fcgi
mv dispatch.rb.example dispatch.rb 

cp htaccess.fcgi.example .htaccess

1.12. Habilitamos fastcgi en apache

yum install libtool httpd-devel apr-devel apr
cd /usr/local/src/
wget http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz


tar -zxvf mod_fastcgi-current.tar.gz
cd mod_fastcgi-2.4.6/
cp Makefile.AP2 Makefile
make top_dir=/usr/lib/httpd
make install top_dir=/usr/lib/httpd

nano /etc/httpd/conf.d/mod_fastcgi.conf


LoadModule fastcgi_module modules/mod_fastcgi.so
<IfModule mod_fastcgi.c>
FastCgiIpcDir /tmp/fcgi_ipc/
</IfModule>



mkdir /tmp/fcgi_ipc/

chown -R apache:apache /tmp/fcgi_ipc/
chmod -R 777 /tmp/fcgi_ipc/


wget http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz
tar -zxvf fcgi-2.4.0.tar.gz
cd fcgi-2.4.0
./configure
make
make install


gem install fcgi



1.13. Habilitar accesso http

redmine/public/ directory, copiar dispatch.fcgi.example a dispatch.fcgi

/public/.htaccess

#RewriteRule ^(stylesheets.*|images.*|favicon.*|javascripts.*|plugin_assets.*|themes.*|help.*)$ $1 [L]
#<IfModule mod_fastcgi.c>
#       RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
#</IfModule>
#<IfModule mod_fcgid.c>
#       RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
#</IfModule>
#<IfModule mod_cgi.c>
#       RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
#</IfModule>
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]



/etc/init.d/httpd configtest
/etc/init.d/httpd restart


2. Instalando SVN






https://www.vultr.com/docs/how-to-setup-an-apache-subversion-svn-server-on-centos-7

Comentarios

Publicar un comentario

Entradas populares de este blog

VisualVM PAYARA5 Remote Connection RMI JMX

Glassfish 4.4.1 falla con jax rs y json