Mudanças entre as edições de "Roteiro de Instalação do Apache e SVN com autenticação NIS"

De LCAD
Ir para: navegação, pesquisa
(Configurando o Apache (htttpd))
Linha 70: Linha 70:
 
  # systemctl start httpd.service
 
  # systemctl start httpd.service
 
  # systemctl enable httpd.service
 
  # systemctl enable httpd.service
 +
 +
=Configurando o Subversion=
 +
Baixe o arquivo [[http://search.cpan.org/CPAN/authors/id/E/ES/ESM/Net-NIS-0.43.tar.gz Net-NIS]].
 +
Instale usando os comandos:
 +
tar xzf Net-NIS-0.34.tar.gz
 +
cd Net-NIS-0.34/
 +
perl Makefile.PL
 +
make
 +
make install
 +
 +
Baixe o arquivo [[http://search.cpan.org/CPAN/authors/id/I/IT/ITEAHAUS/Apache2-AuthenNIS-0.15.tar.gz Apache2-AuthenNIS]].
 +
Instale usando os comandos:
 +
tar xzf Apache2-AuthenNIS-0.15.tar.gz
 +
cd Apache2-AuthenNIS-0.15
 +
perl Makefile.PL
 +
make
 +
make install
 +
 +
Crie o arquivo ''/etc/httpd/conf.d/subversion.conf'' e coloque o conteúdo:
 +
 +
 +
=Importando o banco de dados=
 +
 +
=Colocando os arquivos no /var/www/html/=
 +
 +
=Colocando o hd do log=
 +
 +
=Importando o SVN=
  
 
=Caso algo de errado=
 
=Caso algo de errado=

Edição das 13h26min de 14 de setembro de 2012

Objetivo desse roteiro

Este é um roteiro de como instalar o Apache (httpd), Mysql (mysqld) e Subversion com autenticação NIS para a LCAD 2 no LCAD.

Instalando os pacotes

Instale os pacotes necessários com o comando:

# yum install httpd php php-common mod_dav_svn subversion php-pecl-apc php-cli php-pear php-pdo php-mysql php-pgsql \
php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml mysql mysql-server \
mysql-workbench perl-ExtUtils-AutoInstall

Após instalar todos vamos configurar o Mysql

Configurando o Mysql

Execute na linha de comando:

# systemctl start mysqld.service
# systemctl enable mysqld.service

Logo após digite:

# mysql -u root -p

Entre com a nova senha de root.

Configurando o Apache (htttpd)

Edite o arquivo /etc/httpd/conf/httpd.conf

# vim /etc/httpd/conf/htttpd.conf

Na linha 261 que contém ServerAdmin, coloque:

ServerAdmin suporte@lcad.inf.ufes.br

Na linha 275 que contém ServerName, coloque:

ServerName www.lcad.inf.ufes.br

Na linha 365 que contém Userdir disabled, coloque:

Userdir enabled

Descomente a linha 372, ficando assim:

UserDir public_html

Apague as linhas de 380 até 391 e coloque:

<Directory /home/*/public_html>
    AllowOverride FileInfo AuthConfig Limit
    Options MultiViews Indexes +FollowSymLinks Includes
    <Limit GET POST OPTIONS>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>

Na linha 401, adicione index.php, ficando assim:

DirectoryIndex index.php index.html index.html.var

Ao final do arquivo adicione para o log:

#Alias for the log files
Alias /log log

<Direcotory /log>
         Options +Indexes
         IndexIgnore *.html lost+found
         DirectoryIndex disabled
</Directory>

php_flag display_startup_erros off
php_flag display_errors off
php_flag html_errors off

Agora vamos iniciar o Apache e permitir sua inicialização automática:

# systemctl start httpd.service
# systemctl enable httpd.service

Configurando o Subversion

Baixe o arquivo [Net-NIS]. Instale usando os comandos:

tar xzf Net-NIS-0.34.tar.gz
cd Net-NIS-0.34/
perl Makefile.PL
make
make install

Baixe o arquivo [Apache2-AuthenNIS]. Instale usando os comandos:

tar xzf Apache2-AuthenNIS-0.15.tar.gz
cd Apache2-AuthenNIS-0.15
perl Makefile.PL
make
make install

Crie o arquivo /etc/httpd/conf.d/subversion.conf e coloque o conteúdo:


Importando o banco de dados

Colocando os arquivos no /var/www/html/

Colocando o hd do log

Importando o SVN

Caso algo de errado

Procure na internet, especialmente: