segunda-feira, 7 de outubro de 2013

Instalar phpdoc e configurar acesso web apache Centos


1 - Instalar php e pear

# yum install php pear
# yum install php

2 - Instalar apache

# yum install httpd mod_ssl

3 - Configurar apache

# /usr/sbin/apachectl start

Erro esperado:

Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name,
using 127.0.0.1 for ServerName

# vi /etc/httpd/conf/httpd.conf

Ache a linha #ServerName www.example.com:80

Logo abaixo insira a linha: ServerName demo

# /usr/sbin/apachectl restart

Se usar iptables:

# iptables -I INPUT -p tcp --dport 80 -j ACCEPT
# service iptables save

Testar:

http://<ip do seu servidor>

4 - Instalar phpdoc

# pear channel-discover pear.phpdoc.org
# pear install phpdoc/phpDocumentor


5 - Configurar acesso web.

Tem outra forma, mas pra mim o que funcionou foi desse jeito:

# cp -pR -f  /path/to/httdocs/pear/ /var/www/html/

6 - Editar httpd.conf para processar .html como .php

#  vi /etc/httpd/conf/httpd.conf

Procure a linha  #DirectoryIndex: sets the file that Apache will serve if a directory

E no logo abaixo na linha não comentada substitua por essa linha:

DirectoryIndex index.php index.html index.htm default.htm home.htm at_domains_index.html index.html.var index.shtml index.cfm

7 - Reload Apache

#  /usr/sbin/apachectl restart

8 - Acesse a interface web Phpdocumentor

http://<ip seu servidor>/pear/PhpDocumentor/i

ndex.html

Vida Longa e Próspera

[]´s
 

Nenhum comentário:

Postar um comentário