Está en la página 1de 5

zabbix_server --version

----apt install wget

apt install zabbix-server-mysql


apt install zabbix-frontend-php
apt install zabbix-apache-conf
apt install zabbix-sql-scripts
apt install zabbix-agent
apt install default-mysql-server -y

----mysql

# mysql -uroot -p
password
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user zabbix@localhost identified by 'sistemas588';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> quit;

# zcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p


zabbix

----modificar archivo configuracion zabbix


cd /etc/zabbix/
mv zabbix_server.conf zabbix_server.conf.bk
cat zabbix_server.conf.bk | grep -v "^#" | uniq > zabbix_server.conf
nano zabbix_server.conf
DBPassword=sistemas588

----luego de instalar ejecutar si sale 404

/etc/apache2/sites-available
nano 000-default. conf
nano default

Change DocumentRoot /var/www/html -- > DocumentRoot /usr/share/zabbix

systemctl restart zabbix-server zabbix-agent apache2


systemctl enable zabbix-server zabbix-agent apache2
o
sudo service apache2 restart
sudo service zabbix-server restart

----modificar opciones PHP

cd /etc/php/7.4/apache2/
ls
nano php.ini
post_max_size 16M
max_execution_time 300
max_input_time 300
date.timezone America/Bogota
sudo systemctl restart apache2

----------------------------------
opcion2-------------------------------------------
---Add the PostgreSQL APT repository to Ubuntu Linux.

apt-get install software-properties-common


apt-key adv --keyserver keyserver.ubuntu.com --recv-keys
B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -c -
s`-pgdg main"

---Add the Timescaledb APT repository to Ubuntu Linux.

add-apt-repository ppa:timescale/timescaledb-ppa
apt-get update

---Install PostgreSQL

sudo apt install postgresql postgresql-contrib

psql --version
sudo -u postgres psql
SELECT version();
SHOW server_version;

dpkg -l | grep postgres

sudo apt-get --purge remove postgresql-11 postgresql-client-11 postgresql-client-


common postgresql-common postgresql-contrib postgresql-contrib-11

---Restart the PostgreSQL service.

service postgresql restart

---Create a Linux account to the Zabbix user

groupadd zabbix
useradd -g zabbix -s /bin/bash zabbix

---Create a PostgreSQL user account named Zabbix.

sudo -u postgres createuser --pwprompt zabbix ---- pass "config"

---Create a PostgreSQL database named Zabbix and set the owner as the Zabbix user.

cd /tmp
sudo -u postgres createdb -O zabbix -E Unicode -T template0 zabbix

zcat /usr/share/doc/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix


psql zabbix

---Download the Zabbix x.x installation package.

mkdir /downloads
cd /downloads
wget https://ufpr.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/
4.4.7/zabbix-4.4.7.tar.gz

---Import Zabbix database template inside PostgreSQL.

tar -zxvf zabbix-4.4.7.tar.gz


cd zabbix-4.4.7/database/postgresql
sudo -u zabbix psql zabbix < schema.sql
sudo -u zabbix psql zabbix < images.sql
sudo -u zabbix psql zabbix < data.sql

---Enable TimescaleDB on the Zabbix database.

echo "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;" | sudo -u postgres psql
zabbix

---Run the timescaledb.sql script.

cat timescaledb.sql | sudo -u zabbix psql zabbix

---Restart the PostgreSQL service.

service postgresql restart

---Install the Apache web server and all the required packages.

apt-get install apache2 php libapache2-mod-php php-cli php-pgsql php-mbstring php-


gd php-xml php-bcmath php-ldap

---Find the location of the php.ini file on your system. Edit the php.ini file.

updatedb
locate php.ini
cd /etc/php/7.4/apache2/
nano php.ini
max_execution_time = 300
memory_limit = 256M
post_max_size = 32M
max_input_time = 300
date.timezone = America/Sao_Paulo

service apache2 restart

---Opcional

mkdir /downloads/go -p
cd /downloads/go
wget https://dl.google.com/go/go1.13.1.linux-amd64.tar.gz
tar -C /usr/local -zxvf go1.13.1.linux-amd64.tar.gz

---The GOLANG software was installed under the /usr/local folder. In order to work
properly, the GO software expect the system to have a set of environment variables.
Let's create a file to automate the required environment variables configuration.

cd /etc/profile.d/

nano go.sh

Here is the go.sh file content:

#/bin/bash
export GOROOT=/usr/local/go
export GOPATH=$GOROOT/work
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
---Reboot your computer.

---Install the required packages.

apt-get update
apt-get install build-essential libmysqlclient-dev libssl-dev libsnmp-dev libevent-
dev libopenipmi-dev libcurl4-openssl-dev libxml2-dev libssh2-1-dev libpcre3-dev
libldap2-dev libiksemel-dev libcurl4-openssl-dev libgnutls28-dev

--- Access the Zabbix package folder, compile and install the Zabbix server

# wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-
release_6.0-1+ubuntu20.04_all.deb
# dpkg -i zabbix-release_6.0-1+ubuntu20.04_all.deb
# apt update

apt install zabbix-server-pgsql


apt install zabbix-frontend-php php7.4-pgsql
apt install zabbix-apache-conf
apt install zabbix-sql-scripts
apt install zabbix-agent

---Find the location of the zabbix_server.conf file.

updatedb
locate zabbix_server.conf
cd /etc/zabbix/
mv zabbix_server.conf zabbix_server.conf.bk
cat zabbix_server.conf.bk | grep -v "^#" | uniq > zabbix_server.conf
nano zabbix_server.conf

LogFile=/tmp/zabbix_server.log
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=sistemas588
Timeout=4
LogSlowQueries=3000
StatsAllowedIP=127.0.0.1

cd /usr/local/etc/
nano zabbix_server.conf

LogFile=/tmp/zabbix_server.log
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=sistemas588
Timeout=4
LogSlowQueries=3000
StatsAllowedIP=127.0.0.1

--- Start the Zabbix server.

sudo service apache2 restart


sudo service zabbix-server restart

telcozabbix

También podría gustarte