Changes between Version 3 and Version 4 of ExpressoTestCenter/environment


Ignore:
Timestamp:
05/26/10 15:33:04 (14 years ago)
Author:
luiz-fernando
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ExpressoTestCenter/environment

    v3 v4  
    7979}}} 
    8080 
     81= Instalação do Trac = 
     82{{{ 
     83    $ cd /tmp/Trac-0.11.7 
     84    $ python ./setup.py install 
     85    $ mkdir -p /services/trac/projects 
     86    $ trac-admin /services/trac/projects/expresso initenv 
     87        Project Name: Expresso 
     88        Database Connection: <deixar o default: sqlite:db/trac.db] 
     89        Repository: svn 
     90        Path repository: /services/svn/repositories/trac 
     91    $ chown -R www-data.www-data /services/trac/ 
     92    $ find /services/trac/ -type d|xargs chmod g+sw 
     93    $ htpasswd -cm /services/trac/projects/expresso/.htpasswd admin 
     94    $ trac-admin /services/trac/projects/expresso/ 
     95        permission add admin TRAC_ADMIN 
     96        quit 
     97}}} 
     98 
     99== Testar trac modo stand-alone == 
     100{{{ 
     101    $ tracd --port 8000 /services/trac/projects/expresso 
     102}}} 
     103 
     104== Criar arquivo /etc/apache2/trac.conf com o seguinte conteúdo == 
     105{{{ 
     106    <Location /trac> 
     107        SetHandler mod_python 
     108        PythonInterpreter main_interpreter 
     109        PythonHandler trac.web.modpython_frontend 
     110        PythonOption PYTHON_EGG_CACHE /tmp/python_egg_cache 
     111        PythonOption TracUriRoot /trac 
     112        PythonOption TracEnvParentDir /services/trac/projects/ 
     113        AuthType Basic 
     114        AuthName "trac-expresso" 
     115        AuthUserFile /services/trac/projects/expresso/.htpasswd 
     116        Require valid-user 
     117    </Location> 
     118}}} 
     119 
     120=== Adicionar ao final do /etc/apache2/apache2.conf === 
     121{{{ 
     122    Include /etc/apache2/trac.conf          
     123}}} 
     124 
     125== Instalar plugin XMLRPC == 
     126 
     127{{{ 
     128    $ cd /tmp/xmlrpcplugin/trunk 
     129    $ python setup.py bdist_egg 
     130    $ cp dist/*.egg /services/trac/projects/expresso/plugins/ 
     131}}} 
     132 
     133  1. Editar arquivo /services/trac/projects/expresso/conf/trac.ini e adicionar ao seu final: 
     134 
     135{{{ 
     136    [components] 
     137    tracrpc.* = enabled 
     138}}} 
     139 
     140  2. Reiniciar apache 
     141 
     142{{{ 
     143    $ apachectl restart 
     144}}} 
     145 
     146  3. Acessar Trac 
     147    a. http://172.16.9.136/trac  
     148    b. Entrar com usuário/senha criado com o comando htpasswd no passo 4 
     149    c. Escolher projeto Expresso 
     150    d. Clicar em Admin  
     151    e. Selecionar Permissions 
     152    f. Na seção "Grant Permission" colocar as informações e clicar em Add 
     153      i. Subject: anonymous 
     154      ii. Action: XML_RPC 
     155    
    81156= Instalação do Testlink = 
    82157 
     
    122197 
    123198  3. Editar arquivo /var/www/testlink/lib/bugtracking/int_trac.php e substituir 
     199 
    124200{{{  
    125201    $this->xmlrpcClient = new IXR_Client($this->dbHost . '/xmlrpc'); 
    126202}}} 
     203 
    127204por 
     205 
    128206{{{ 
    129207    $this->xmlrpcClient = new IXR_Client(BUG_TRACK_XMLRPC_HOST); 
     
    160238}}} 
    161239 
    162 = Instalação do Trac = 
    163 {{{ 
    164     $ cd /tmp/Trac-0.11.7 
    165     $ python ./setup.py install 
    166     $ mkdir -p /services/trac/projects 
    167     $ trac-admin /services/trac/projects/expresso initenv 
    168         Project Name: Expresso 
    169         Database Connection: <deixar o default: sqlite:db/trac.db] 
    170         Repository: svn 
    171         Path repository: /services/svn/repositories/trac 
    172     $ chown -R www-data.www-data /services/trac/ 
    173     $ find /services/trac/ -type d|xargs chmod g+sw 
    174     $ htpasswd -cm /services/trac/projects/expresso/.htpasswd admin 
    175     $ trac-admin /services/trac/projects/expresso/ 
    176         permission add admin TRAC_ADMIN 
    177         quit 
    178 }}} 
    179  
    180 == Testar trac modo stand-alone == 
    181 {{{ 
    182     $ tracd --port 8000 /services/trac/projects/expresso 
    183 }}} 
    184  
    185 == Criar arquivo /etc/apache2/trac.conf com o seguinte conteúdo == 
    186 {{{ 
    187     <Location /trac> 
    188         SetHandler mod_python 
    189         PythonInterpreter main_interpreter 
    190         PythonHandler trac.web.modpython_frontend 
    191         PythonOption PYTHON_EGG_CACHE /tmp/python_egg_cache 
    192         PythonOption TracUriRoot /trac 
    193         PythonOption TracEnvParentDir /services/trac/projects/ 
    194         AuthType Basic 
    195         AuthName "trac-expresso" 
    196         AuthUserFile /services/trac/projects/expresso/.htpasswd 
    197         Require valid-user 
    198     </Location> 
    199 }}} 
    200  
    201 === Adicionar ao final do /etc/apache2/apache2.conf === 
    202 {{{ 
    203     Include /etc/apache2/trac.conf          
    204 }}} 
    205  
    206 == Instalar plugin XMLRPC == 
    207 {{{ 
    208     $ cd /tmp/xmlrpcplugin/trunk 
    209     $ python setup.py bdist_egg 
    210     $ cp dist/*.egg /services/trac/projects/expresso/plugins/ 
    211 }}} 
    212  
    213   1. Editar arquivo /services/trac/projects/expresso/conf/trac.ini e adicionar ao seu final: 
    214 {{{ 
    215     [components] 
    216     tracrpc.* = enabled 
    217 }}} 
    218  
    219   2. Reiniciar apache 
    220 {{{ 
    221     $ apachectl restart 
    222 }}} 
    223  
    224   3. Acessar Trac 
    225     a. http://172.16.9.136/trac  
    226     b. Entrar com usuário/senha criado com o comando htpasswd no passo 4 
    227     c. Escolher projeto Expresso 
    228     d. Clicar em Admin  
    229     e. Selecionar Permissions 
    230     f. Na seção "Grant Permission" colocar as informações e clicar em Add 
    231       i. Subject: anonymous 
    232       ii. Action: XML_RPC 
    233     
    234  
    235  
    236  
    237  
    238  
    239  
    240  
    241  
    242  
    243  
    244  
    245 ----------------------------------------------------------- 
    246  
    247 1.22 SSL 
    248 cd /etc/ssl/private 
    249 openssl genrsa -des3 -out debby.key 1024 
    250 1.22.1 entrar senha e confirmar 
    251  
    252 1.23 cd /etc/ssl/certs 
    253 openssl req -new -x509 -days 365 -key ../private/debby.key -out debby.crt 
    254 1.23.1 entrar senha do passo anterior 
    255 1.23.2 Country Name: BR 
    256 1.23.3 Province: RS 
    257 1.23.4 Locality name: POA 
    258 1.23.5 Organization name: Serpro 
    259 1.23.6 Organizational Unit Name: unit 
    260 1.23.7 Common Name: admin 
    261 1.23.8 Email: admin@sepro.gov.br 
    262  
    263 1.24 cd /etc/ssl/private 
    264 cp debby.key debby.key.org 
    265 openssl rsa -in debby.key.org -out debby.key 
    266 -> entrar senha do passo anterior 
    267 chmod 400 debby.key debby.key.org 
    268  
    269 1.25 cd /etc/apache2/mods-enabled/ 
    270 ln -s ../mods-available/ssl.load 
    271 ln -s ../mods-available/ssl.conf 
    272  
    273 1.26 Editar ports.conf e comentar linhas abaixo: 
    274 #NameVirtualHost *:443 
    275 #Listen 443 
    276  
    277 1.27 Criar arquivo /etc/apache2/ssl.conf com: 
    278 <VirtualHost _default_> 
    279     DocumentRoot "/var/www" 
    280     SSLEngine on 
    281     SSLCertificateFile /etc/ssl/certs/debby.crt 
    282     SSLCertificateKeyFile /etc/ssl/private/debby.key 
    283 </VirtualHost> 
    284 1.27.1 Adicionar ao final do /etc/apache2/apache2.conf 
    285   Include /etc/apache2/ssl.conf          
    286  
    287 1.28 mkdir -p /services/apache/debby/html 
    288  
    289  
    290 1.30 Editar ssl.conf: 
    291 <VirtualHost _default_> 
    292     <Location /> 
    293         AuthType Basic 
    294         AuthName "Requires authentication" 
    295         AuthUserFile /services/apache/debby/htpasswd 
    296         Require valid-user 
    297     </Location> 
    298  
    299     DocumentRoot "/services/apache/debby/html" 
    300     SSLEngine on 
    301     SSLCertificateFile /etc/ssl/certs/debby.crt 
    302     SSLCertificateKeyFile /etc/ssl/private/debby.key 
    303 </VirtualHost> 
    304  
    305  
    306  
    307  
    308 ------------------------------------------------------------------ 
    309 DICAS: 
    310 1.1 Editar arquivo /etc/apt/sources.list e descomentar linha abaixo: 
    311  
    312    deb http://ftp.br.debian.org/debian/ lenny main 
    313  
    314  
    315  
    316 --------------------------------------- 
    317 Referências: 
    318  
    319 * http://cogo.wordpress.com/2008/10/28/apache-ssl-subversion-trac-howto/ 
    320 * TestLink: Manual do Usuário 
    321 * Trac INSTALL instructions file 
    322 * http://trac.edgewall.org/wiki/TracInstall 
    323 * http://trac-hacks.org/wiki/XmlRpcPlugin 
    324 * http://51elliot.blogspot.com/2009/01/trac-testlink-and-xml-rpc.html 
    325  
    326  
    327  
    328  
    329  
    330  
    331  
    332  
    333  
    334  
    335  
    336  
    337  
    338  
    339  
    340  
    341  
    342  
    343  
    344  
    345  
    346  
    347 {{{ 
    348  
    349  
    350 1. Instalação padrão debian 5.0.4 em uma maquina virtual (base system + web server - GUI) 
    351  
    352 1.1 Editar arquivo /etc/apt/sources.list e descomentar linha abaixo: 
    353  
    354    deb http://ftp.br.debian.org/debian/ lenny main 
    355  
    356 1.2 Instalar ssh: apt-get install ssh 
    357  
    358 1.3 Instalar unzip: apt-get install unzip 
    359 1.4 Instalar php5: apt-get install php5 
    360 1.5 Instalar postgresql: apt-get install postgresql 
    361 1.5.1 Criar senha padrão do usuário postgres: 
    362    # su postgres 
    363    # psql 
    364    # alter user postgres password 'postgres'; 
    365  
    366 1.6 Instalar php5-postgresql: apt-get install php5-pgsql 
    367 1.7 Instalar php5-gd: apt-get install php5-gd 
    368 1.8 Instalar open ldap: apt-get install slapd 
    369 1.9 Instalar php5-ldap: apt-get install php5-ldap 
    370 1.10 Instalar subversion: apt-get install subversion 
    371 1.11 Instalar libapache2-svn: apt-get install libapache2-svn 
    372 1.12 Instalar python-genshi: apt-get install python-genshi 
    373 1.13 Instalar python-setuptools: apt-get install python-setuptools 
    374 1.14 Instalar python-subversion: apt-get install python-subversion 
    375 1.15 Instalar python-psycopg: apt-get install python-psycopg 
    376 1.16 Instalar libapache2-mod-python: apt-get install libapache2-mod-python 
    377 1.17 Instalar libapache2-mod-wsgi: apt-get install libapache2-mod-wsgi 
    378  
    379 1.18  mkdir -p /services/svn/repositories 
    380 1.19  svnadmin create /services/svn/repositories/trac 
    381 1.20  chown -R www-data.www-data /services/svn/repositories 
    382       find /services/svn/repositories/ -type d|xargs chmod g+sw 
    383 1.21 Criar arquivo /etc/apache2/subversion.conf com: 
    384 <Location /svn> 
    385     DAV svn 
    386     SVNParentPath /services/svn/repositories 
    387 </Location> 
    388 1.21.1 Adicionar ao final do /etc/apache2/apache2.conf 
    389   Include /etc/apache2/subversion.conf          
    390  
    391 1.22 SSL 
    392 cd /etc/ssl/private 
    393 openssl genrsa -des3 -out debby.key 1024 
    394 1.22.1 entrar senha e confirmar 
    395  
    396 1.23 cd /etc/ssl/certs 
    397 openssl req -new -x509 -days 365 -key ../private/debby.key -out debby.crt 
    398 1.23.1 entrar senha do passo anterior 
    399 1.23.2 Country Name: BR 
    400 1.23.3 Province: RS 
    401 1.23.4 Locality name: POA 
    402 1.23.5 Organization name: Serpro 
    403 1.23.6 Organizational Unit Name: unit 
    404 1.23.7 Common Name: admin 
    405 1.23.8 Email: admin@sepro.gov.br 
    406  
    407 1.24 cd /etc/ssl/private 
    408 cp debby.key debby.key.org 
    409 openssl rsa -in debby.key.org -out debby.key 
    410 -> entrar senha do passo anterior 
    411 chmod 400 debby.key debby.key.org 
    412  
    413 1.25 cd /etc/apache2/mods-enabled/ 
    414 ln -s ../mods-available/ssl.load 
    415 ln -s ../mods-available/ssl.conf 
    416  
    417 1.26 Editar ports.conf e comentar linhas abaixo: 
    418 #NameVirtualHost *:443 
    419 #Listen 443 
    420  
    421 1.27 Criar arquivo /etc/apache2/ssl.conf com: 
    422 <VirtualHost _default_> 
    423     DocumentRoot "/var/www" 
    424     SSLEngine on 
    425     SSLCertificateFile /etc/ssl/certs/debby.crt 
    426     SSLCertificateKeyFile /etc/ssl/private/debby.key 
    427 </VirtualHost> 
    428 1.27.1 Adicionar ao final do /etc/apache2/apache2.conf 
    429   Include /etc/apache2/ssl.conf          
    430  
    431 1.28 mkdir -p /services/apache/debby/html 
    432  
    433  
    434 1.30 Editar ssl.conf: 
    435 <VirtualHost _default_> 
    436     <Location /> 
    437         AuthType Basic 
    438         AuthName "Requires authentication" 
    439         AuthUserFile /services/apache/debby/htpasswd 
    440         Require valid-user 
    441     </Location> 
    442  
    443     DocumentRoot "/services/apache/debby/html" 
    444     SSLEngine on 
    445     SSLCertificateFile /etc/ssl/certs/debby.crt 
    446     SSLCertificateKeyFile /etc/ssl/private/debby.key 
    447 </VirtualHost> 
    448  
    449 1.31 htpasswd -m /services/apache/debby/htpasswd admin 
    450 trac-admin /var/www/trac/expresso/ 
    451 permission add admin TRAC_ADMIN 
    452  
    453 2. Copiar testlink para maquina virtual 
    454  
    455    scp testlink-1.9beta4.zip root@172.16.9.136:/tmp 
    456  
    457 2.1 Descompactar arquivo no /tmp da maquina virtual 
    458  
    459 2.2 Renomear diretorio para testlink 
    460  
    461 2.3 Mover diretorio testlink para /var/www 
    462  
    463 2.4 Mudar permissoes dos diretorios em /var/www/testlink: 
    464  
    465 # chmod 777 -R /var/www/testlink 
    466  
    467 2.5 Reiniciar apache 
    468  
    469 # apachectl restart 
    470  
    471 2.6 Abrir browser apontando para host da maquina virtual: http://172.16.9.136/testlink 
    472  
    473 2.6.1 Selecionar "New instalation" 
    474 2.6.2 Aceitar a licença de uso 
    475 2.6.3 Verificação da instalação dos pré-requisitos 
    476 2.6.4 Escolhendo BD 
    477 2.6.4.1 Type: Postgres 
    478 2.6.4.2 Host: localhost 
    479 2.6.4.3 Database name: testlinkdb 
    480 2.6.4.4 Table prefix: <deixar em branco> 
    481 2.6.4.5 database admin login: postgres 
    482 2.6.4.6 database admin password: postgres 
    483 2.6.4.7 testlink db login: testlink 
    484 2.6.4.8 testlink db password: testlink 
    485 2.6.5 Verificação da instalação - deve estar tudo OK nesse ponto 
    486  
    487 2.7 Abrir novamente browser apontando para host da maquina virtual: http://172.16.9.136/testlink e entrar usando admin/admin 
    488  
    489 3. Copiar trac para maquina virtual 
    490  
    491    scp Trac-0.11.7.tar.gz root@172.16.9.136:/tmp 
    492  
    493 3.1 Descompactar arquivo no /tmp da maquina virtual 
    494  
    495 3.2 $ python ./setup.py install 
    496 mkdir /var/www/trac 
    497 3.3 trac-admin /var/www/trac/expresso initenv 
    498 chown -R www-data.www-data /var/www/trac 
    499 find /var/www/trac -type d|xargs chmod g+sw 
    500 3.3.1 Project Name: Expresso 
    501 3.3.2 Database Connection: <deixar o default: sqlite:db/trac.db] 
    502 3.3.3 Repository: svn 
    503 3.3.4 Path repository: /services/svn/repositories/trac 
    504  
    505 3.4 Testar trac 
    506 3.4.1 tracd --port 8000 /var/www/trac/expresso 
    507  
    508 3.5 Criar arquivo trac.conf em /etc/apache2 com o seguinte conteúdo: 
    509 <Location /trac> 
    510     SetHandler mod_python 
    511     PythonInterpreter main_interpreter 
    512     PythonHandler trac.web.modpython_frontend 
    513     PythonOption PYTHON_EGG_CACHE /tmp/python_egg_cache 
    514     PythonOption TracUriRoot /trac 
    515     PythonOption TracEnvParentDir /var/www/trac 
    516 </Location> 
    517  
    518 3.5.1 Adicionar ao final do /etc/apache2/apache2.conf 
    519   Include /etc/apache2/trac.conf          
    520  
    521 3.6 Testar http://172.16.9.136/trac e escolher expresso 
    522  
    523 }}} 
     240 
     241= Referências = 
     242 
     243  * [http://cogo.wordpress.com/2008/10/28/apache-ssl-subversion-trac-howto/] 
     244  * Test Link: Manual do Usuário 
     245  * Trac INSTALL instructions file 
     246  * [http://trac.edgewall.org/wiki/TracInstall] 
     247  * [http://trac-hacks.org/wiki/XmlRpcPlugin] 
     248  * [http://51elliot.blogspot.com/2009/01/trac-testlink-and-xml-rpc.html] 
     249