Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zabbix
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
infra
zabbix
Commits
ae3ee000
Commit
ae3ee000
authored
Apr 29, 2025
by
devteam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new file
parent
f285ceb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
zabbix_install_with_repo.sh
zabbix_v2/Xen/zabbix_install_with_repo.sh
+31
-0
No files found.
zabbix_v2/Xen/zabbix_install_with_repo.sh
0 → 100644
View file @
ae3ee000
#!/bin/bash
if
[
"$#"
-ne
2
]
;
then
echo
"Uso:
$0
<Novo_IP> <Novo_Hostname>"
exit
1
fi
NOVO_IP
=
$1
NOVO_HOSTNAME
=
$2
CONFIG_FILE
=
"/etc/zabbix/zabbix_agent2.conf"
rpm
-Uvh
http://repo.zabbix.com/zabbix/7.0/rhel/7/x86_64/zabbix-release-latest.el7.noarch.rpm
sed
-i
's/enabled=1/enabled=0/g'
/etc/yum.repos.d/zabbix.repo
sed
-i
's/https/http/g'
/etc/yum.repos.d/zabbix.repo
echo
"instalando zabbix-agent2..."
yum
-y
-q
install
--enablerepo
=
zabbix zabbix-agent2 zabbix-agent2-plugin-
*
zabbix-get zabbix-sender
echo
"Configurando..."
sed
-i
"s/^Server=.*/Server=
$NOVO_IP
/"
"
$CONFIG_FILE
"
sed
-i
"s/^Hostname=.*/Hostname=
$NOVO_HOSTNAME
/"
"
$CONFIG_FILE
"
sed
-i
"s/^ServerActive=.*/#&/"
"
$CONFIG_FILE
"
echo
"Configurações atualizadas com sucesso no arquivo
$CONFIG_FILE
:"
echo
"Server=
$NOVO_IP
"
echo
"Hostname=
$NOVO_HOSTNAME
"
systemctl start zabbix-agent2
systemctl
enable
zabbix-agent2
echo
"Instalação Concluida"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment