mirror of
https://github.com/YunoHost-Apps/zabbix_ynh.git
synced 2024-09-03 20:36:14 +02:00
Update install with /etc/zabbix/web/zabbix.conf.php conf
This commit is contained in:
parent
ea0ab008eb
commit
132e929d8b
1 changed files with 44 additions and 38 deletions
|
@ -94,6 +94,11 @@ ynh_app_setting_set $app language $language
|
||||||
wget "https://repo.zabbix.com/zabbix/4.0/debian/pool/main/z/zabbix-release/zabbix-release_4.0-2+stretch_all.deb"
|
wget "https://repo.zabbix.com/zabbix/4.0/debian/pool/main/z/zabbix-release/zabbix-release_4.0-2+stretch_all.deb"
|
||||||
dpkg -i zabbix-release_*.deb
|
dpkg -i zabbix-release_*.deb
|
||||||
rm zabbix-release_*.deb
|
rm zabbix-release_*.deb
|
||||||
|
echo '
|
||||||
|
Package: zabbix*
|
||||||
|
Pin: origin "repo.zabbix.com"
|
||||||
|
Pin-Priority: 999'>/etc/apt/preferences.d/zabbix-pin-999
|
||||||
|
|
||||||
echo "deb http://deb.debian.org/debian stretch non-free" >/etc/apt/sources.list.d/non-free.list
|
echo "deb http://deb.debian.org/debian stretch non-free" >/etc/apt/sources.list.d/non-free.list
|
||||||
ynh_package_update
|
ynh_package_update
|
||||||
ynh_install_app_dependencies libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php7.0 php-bcmath php7.0-bcmath ttf-dejavu-core php7.0-bcmath patch smistrip unzip wget fping libcap2-bin libiksemel3 libopenipmi0 libpam-cap libsnmp-base libsnmp30 snmptrapd snmpd snmp-mibs-downloader libjs-prototype zabbix-server-mysql zabbix-agent
|
ynh_install_app_dependencies libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php7.0 php-bcmath php7.0-bcmath ttf-dejavu-core php7.0-bcmath patch smistrip unzip wget fping libcap2-bin libiksemel3 libopenipmi0 libpam-cap libsnmp-base libsnmp30 snmptrapd snmpd snmp-mibs-downloader libjs-prototype zabbix-server-mysql zabbix-agent
|
||||||
|
@ -102,10 +107,10 @@ DEBIAN_FRONTEND=noninteractive apt-get -y download zabbix-frontend-php
|
||||||
ar x *.deb
|
ar x *.deb
|
||||||
tar xzf control.tar.gz
|
tar xzf control.tar.gz
|
||||||
sed -i 's/apache2 | httpd, //' control
|
sed -i 's/apache2 | httpd, //' control
|
||||||
tar --ignore-failed-read -cvzf control.tar.gz {post,pre}{inst,rm} md5sums control
|
tar --ignore-failed-read -cvzf control.tar.gz {post,pre}rm md5sums control
|
||||||
ar rcs zabbix-frontend-php+stretch_all-noapache2.deb debian-binary control.tar.gz data.tar.xz
|
ar rcs zabbix-frontend-php+stretch_all-noapache2.deb debian-binary control.tar.gz data.tar.xz
|
||||||
|
|
||||||
dpkg -i zabbix-frontend-php+stretch_all-noapache2.deb
|
dpkg -i --force-confmiss zabbix-frontend-php+stretch_all-noapache2.deb
|
||||||
|
|
||||||
rm -fr zabbix-*.deb
|
rm -fr zabbix-*.deb
|
||||||
DEBIAN_FRONTEND=noninteractive apt-mark hold zabbix-server-mysql zabbix-frontend-php
|
DEBIAN_FRONTEND=noninteractive apt-mark hold zabbix-server-mysql zabbix-frontend-php
|
||||||
|
@ -114,7 +119,7 @@ sed -i "s/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/g" /etc/locale.gen
|
||||||
locale-gen
|
locale-gen
|
||||||
|
|
||||||
ln -s /usr/share/zabbix $final_path
|
ln -s /usr/share/zabbix $final_path
|
||||||
rm $final_path/conf/zabbix.conf.php
|
#rm $final_path/conf/zabbix.conf.php
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A MYSQL DATABASE
|
# CREATE A MYSQL DATABASE
|
||||||
|
@ -300,8 +305,9 @@ global \$DB;
|
||||||
\$ZBX_SERVER_PORT = '10051';
|
\$ZBX_SERVER_PORT = '10051';
|
||||||
\$ZBX_SERVER_NAME = 'zabbix-server';
|
\$ZBX_SERVER_NAME = 'zabbix-server';
|
||||||
|
|
||||||
\$IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;">/usr/share/zabbix/conf/zabbix.conf.php
|
\$IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;">/etc/zabbix/web/zabbix.conf.php
|
||||||
|
ln /etc/zabbix/web/zabbix.conf.php /var/www/zabbix/conf/zabbix.conf.php
|
||||||
|
chown www-data. /etc/zabbix/web/zabbix.conf.php
|
||||||
chown -R www-data. /usr/share/zabbix
|
chown -R www-data. /usr/share/zabbix
|
||||||
|
|
||||||
sed -i "s/DBName=zabbix/DBName=$db_name/g" /etc/zabbix/zabbix_server.conf
|
sed -i "s/DBName=zabbix/DBName=$db_name/g" /etc/zabbix/zabbix_server.conf
|
||||||
|
|
Loading…
Add table
Reference in a new issue