PDA

View Full Version : No Logro Ver Interfaz Web


elderf
21-09-2010, 00:26
Saludos desde Venezuela..


Estoy intentando instalar zabbix 1.8.3 desde binario en un servidor con centos 5.5 pero me resulta imposible.. he seguido al pie de la letra varios tutoriales pero no logro hacer que me muestre la interfaz web para terminar la configuracion..

Existe documentacion para la version 1.8.3 y centos 5.5 ? o alguien ha tenido alguna experiencia con archivos rpm?

Gracias

exkg
23-09-2010, 14:06
Pero ... ¿ y los logs que hablam ?


[]s,
Luciano

alberto.mmoraes
23-09-2010, 21:41
wget http://ufpr.dl.sourceforge.net/sourceforge/zabbix/zabbix-1.6.9.tar.gz .

OU

elinks www.zabbix.com/download.php (para baixar via nevegador)

#####################################
# Adicionar repositorio:

vim /etc/yum.repos.d/dag.repo

Inserir as linhas abaixo em um arquivo, exemplo: dag.repo

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=0
enabled=1
protect=0

######################################
# Instalar tudo que precisamos

yum -y install ntp php php-bcmath php-gd php-mysql httpd mysql gcc mysql-server mysql-devel net-snmp net-snmp-utils net-snmp-devel net-snmp-libs curl-devel make openldap-clients openldap-devel fping

Para postgreSQL (caso prefira, ao invés do MySQL):

yum -y install ntp php php-bcmath php-gd php-pgsql httpd postgresql-libs postgresql-devel postgresql-server postgresql gcc net-snmp net-snmp-utils net-snmp-devel net-snmp-libs curl-devel make openldap-clients openldap-devel fping

######################################

tar xzvf zabbix-1.6.9.tar.gz

######################################
# Inserir as duas linhas dois servidores abaixo (server) no arquivo /etc/ntp.conf:

vim /etc/ntp.conf

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server ntp.on.br
server ntp.usp.br

######################################

[root@CentDesenv ~]# /etc/init.d/ntpd stop
Shutting down ntpd: [ OK ]
[root@CentDesenv ~]# ntpdate ntp.on.br
20 Apr 16:17:52 ntpdate[29208]: step time server 200.20.186.75 offset -23.037419 sec
[root@CentDesenv ~]# /etc/init.d/ntpd start
Starting ntpd: [ OK ]

######################################

Garantir que o arquivo de configuração do SELinux está como o abaixo:

[root@CentDesenv zabbix-1.6.4]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted

# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0

#########################################
# Adicionar usuario zabbix:

useradd zabbix

#######################################

[root@CentDesenv ~]# cd zabbix-1.6.8/
[root@CentDesenv zabbix-1.6.8]# ls
aclocal.m4 build config.log configure create FAQ INSTALL Makefile misc README
AUTHORS ChangeLog config.status configure.in depcomp frontends install-sh Makefile.am missing src
bin config.guess config.sub COPYING docs include m4 Makefile.in NEWS upgrades

#######################################
# Iniciar MySQL e alterar senha de administrador do banco (root):

/etc/init.d/mysqld start
/usr/bin/mysqladmin -u root password 'novasenha'

#######################################
# Criar banco zabbix e dar permissão total nele ao usuario zabbix, identificado pela "senhazabbix":


mysql -u root -p

mysql> CREATE DATABASE zabbix;
mysql> GRANT ALL ON zabbix.* TO zabbix@localhost IDENTIFIED BY 'senhazabbix';
mysql> quit;

############################################
# Importar schemas para o usuario zabbix e a senha definida anteriormente:

cd zabbix-1.6.9/

cat create/schema/mysql.sql | mysql -u zabbix -psenhazabbix zabbix
cat create/data/data.sql | mysql -u zabbix -psenhazabbix zabbix
cat create/data/images_mysql.sql | mysql -u zabbix -psenhazabbix zabbix

# Compilar servidor:

./configure --enable-server --prefix=/usr/local/zabbix --with-mysql --with-net-snmp --with-libcurl --with-ldap
make install
make clean

Caso dê problema:

yum install gcc-c++ libstdc++-devel make mysql-devel curl-devel openssl-devel krb5-devel libgssapi-devel e2fsprogs-libs libidn-devel zlib-devel net-snmp-devel glibc-devel



###########################################
# Compilar agente:

./configure --enable-agent --prefix=/usr/local/zabbix --enable-static
make install

###########################################
# Mudar permissao do diretorio para o usuario e grupo zabbix:

chown -R zabbix.zabbix /usr/local/zabbix/

###########################################
# Inserir as duas ultimas linhas no /etc/services:

[root@CentDesenv zabbix-1.6.4]# tail -n 4 /etc/services
iqobject 48619/udp # iqobject
# Local services
zabbix_agentd 10050/tcp # Agente Zabbix
zabbix_server 10051/tcp # Servidor Zabbix

############################################
# Criar diretorio /etc/zabbix e copiar arquivos de configuracao:

mkdir /etc/zabbix
cp misc/conf/zabbix_agentd.conf /etc/zabbix
cp misc/conf/zabbix_server.conf /etc/zabbix

###############################################
# Alterar os seguintes parametros do conf do servidor:

vim /etc/zabbix/zabbix_server.conf

DBUser=zabbix
DBPassword=senhazabbix
DBSocket=/var/lib/mysql/mysql.sock
FpingLocation=/usr/sbin/fping (Pode mudar de lugar, use "which fping" para saber o diretório correto)

Caso vá usar a configuração distribuída, usar (exemplo, nó 11)

/usr/local/zabbix/sbin/zabbix_server -n 11 -c /etc/zabbix/zabbix_server.conf

##############################################
# Alterar os seguintes parametros na conf do agente:

vim /etc/zabbix/zabbix_agentd

Server=127.0.0.1 (IP do host)
Hostname=<Nome do host>

##############################################
# Copiar arquivos de inicializacao:

cp misc/init.d/redhat/zabbix_agentd_ctl /etc/init.d/zabbix_agentd
cp misc/init.d/redhat/zabbix_server_ctl /etc/init.d/zabbix_server

##############################################
# Inserir as duas linhas comentadas no inicio do arquivo e corrigir o BASEDIR e o ZABBIX_AGENTD para estes valores:

vim /etc/init.d/zabbix_agentd

# chkconfig: 345 95 95
# description: Zabbix Agentd

BASEDIR=/usr/local/zabbix
ZABBIX_AGENTD=$BASEDIR/sbin/zabbix_agentd

#############################################
# Inserir as duas linhas comentadas no inicio do arquivo e corrigir o BASEDIR e o ZABBIX_AGENTD para estes valores:

vim /etc/init.d/zabbix_server

# chkconfig: 345 95 95
# description: Zabbix Server

BASEDIR=/usr/local/zabbix
ZABBIX_SUCKERD=$BASEDIR/sbin/zabbix_server

#############################################
# configurar os servicos para iniciar no boot:

chkconfig --level 345 zabbix_server on
chkconfig --level 345 zabbix_agentd on
chkconfig --level 345 httpd on
chkconfig --level 345 mysqld on

#############################################
# Criar diretorio do frontend web e copiar os arquivos:

mkdir /var/www/html/zabbix (ou /var/www/html/monitoramento, etc.)
cp -r frontends/php/* /var/www/html/zabbix/

#############################################
# Alterar configuracoes do php:

vim /etc/php.ini

max_execution_time = 300
date.timezone = America/Sao_Paulo

#############################################
# Iniciar servidor web e dar permissao total (temporaria do diretorio conf/ )

/etc/init.d/httpd start
chmod 777 /var/www/html/zabbix/conf
############################################

Acessar http://ipdoservidor/zabbix

#############################################

Quando chegar a checagem do banco de dados coloque tipo mysql, host localhost, porta 0(padrão), nome "zabbix", usuário "zabbix", senha "senhazabbix"(definida anteriormente) e teste a conexão

################################################## ################################################## #########################
# Retornar à permissao antiga, renomear o setup (para preveniver acidentes) e iniciar o agente e servidor:

chmod 755 /var/www/html/zabbix/conf
mv /var/www/html/zabbix/setup.php /var/www/html/zabbix/setup.php.bak
/etc/init.d/zabbix_agentd start
/etc/init.d/zabbix_server start

#############################################