Autor Tópico: Zoneminder - não consigo instalar no Lubuntu com LXQt  (Lida 3419 vezes)

Offline zangarothiago

  • Usuário Ubuntu
  • *
  • Mensagens: 18
    • Ver perfil
Zoneminder - não consigo instalar no Lubuntu com LXQt
« Online: 24 de Julho de 2020, 22:39 »
Estou usando o Lubuntu com LXQt versão 19.10, eoan

É impressionante a incrível leveza que o Lubuntu tem com esse ambiente gráfico. Antes de usar o Lubuntu eu estáva usando o Manjaro com XFCE que também é muito bom, mas infelismente é muito mais pesado, pois tenho hardware fraco aqui.

No manjaro, na instalação do Zoneminder é muito fácil, pois vinha junto com script de configuração pronto, era só rodar o .sh que o Zoneminder já funcionava perfeitamente.

Mas infelismente no Lubuntu não estou conseguindo fazer o Zoneminder funcionar, já tentei vários tutoriais pela Net a fora, mas não funciona.
Alguém pode me ajudar a instalar, passo a passo o Zoneminder no Lubuntu ???????

« Última modificação: 24 de Julho de 2020, 22:45 por zangarothiago »

Offline creto

  • Usuário Archlinux
  • Usuário Ubuntu
  • *
  • Mensagens: 808
  • Vivemos esperando dias melhores
    • Ver perfil
    • Blog do Creto
Re:Zoneminder - não consigo instalar no Lubuntu com LXQt
« Resposta #1 Online: 25 de Julho de 2020, 09:41 »
Olá,

Como instalou? Pelo que sei no ubuntu tem um PPA ativo, inclusive até para a versão mais nova do ubuntu 20.04, é só escolher a sua versão em:

https://launchpad.net/~iconnor/+archive/ubuntu/zoneminder-master

T+
A vida, é feito andar de bicicleta, se parar, você cai! (Gabriel Contino)
Blog do Paulo Corrêa Creto

Offline zangarothiago

  • Usuário Ubuntu
  • *
  • Mensagens: 18
    • Ver perfil
Re:Zoneminder - não consigo instalar no Lubuntu com LXQt
« Resposta #2 Online: 25 de Julho de 2020, 20:18 »
como faço para que o Zoneminder funcione. Percebi que no Manjaro o script automatizado faz:

- instala o Zoneminder;
- instala o Banco de Dados MariDb
- cria as tabelas no Banco de dados;
- instala o PHP
- instala o Servidor Web Apache
- e sabe la Deus, o script configura isso tudo para funcionar junto.

Como faço para instalar o Zoneminder no Lubuntu ?????

Offline creto

  • Usuário Archlinux
  • Usuário Ubuntu
  • *
  • Mensagens: 808
  • Vivemos esperando dias melhores
    • Ver perfil
    • Blog do Creto
Re:Zoneminder - não consigo instalar no Lubuntu com LXQt
« Resposta #3 Online: 26 de Julho de 2020, 11:59 »
Olha, eu já dei a vara e ensinei a pescar, mas vou ofertar o peixe também só não vou assar he he he

Brincadeiras a parte, abra seu terminal e (vou fazer aqui mesmo não precisando do aplicativo)

sudo add-apt-repository ppa:iconnor/zoneminder-master

Código: [Selecionar]
creto@creto:~$ sudo add-apt-repository ppa:iconnor/zoneminder-master
[sudo] senha para creto:
 These are snapshots of the master branch from https://github.com/ZoneMinder/ZoneMinder


If you would like to make a donation to directly support this ppa, you may do so by sending paypal to paypal @ connortechnology.com, become a patron at https://www.patreon.com/zoneminder or send digital coins to:

BTC: 143XJVxDQ1c1HF4vixuCZAqG6LDhSBQFwU
BCH: qpk8a4938am7ex37k2yfykyglkxg6v46v5jy8qw05c
ETH: 0xA23b82d94A3589A866529DE9db05E3ba8a37fed8
ECH: 0x93FC917d1B9d3EA6c83fC5E2b48C7314B00D9407
LTC: M9QT3SUywaEcPwMwvu9rFLVmMuugQzdPWK
 Mais informações: https://launchpad.net/~iconnor/+archive/ubuntu/zoneminder-master
Prima [ENTER] para continuar ou Ctrl+C para cancelar a sua adição.

Tecle Enter para continuar e espere terminar, após isso comandar novamente:

Código: [Selecionar]
sudo apt install zoneminder
Não sei no ubuntu, uso um derivado (biglinux) e aqui os pacotes a serem instalados não será o mariadb mas sim apache, mysql e afins:

Código: [Selecionar]
Os NOVOS pacotes a seguir serão instalados:
  apache2 apache2-bin apache2-data apache2-utils docutils-common javascript-common
  libaio1 libalgorithm-c3-perl libapache2-mod-php libapache2-mod-php7.4 libappconfig-perl
  libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libarchive-zip-perl
  libb-hooks-endofscope-perl libb-hooks-op-check-perl libcgi-fast-perl libcgi-pm-perl
  libclass-c3-perl libclass-c3-xs-perl libclass-data-inheritable-perl
  libclass-inspector-perl libclass-load-perl libclass-method-modifiers-perl
  libclass-mix-perl libclass-singleton-perl libclass-std-fast-perl libclass-std-perl
  libclass-xsaccessor-perl libconvert-binhex-perl libcpanel-json-xs-perl
  libcrypt-eksblowfish-perl libcrypt-rijndael-perl libdata-entropy-perl
  libdata-float-perl libdata-optlist-perl libdate-manip-perl libdatetime-locale-perl
  libdatetime-perl libdatetime-timezone-perl libdbd-mysql-perl libdbi-perl
  libdevel-callchecker-perl libdevel-caller-perl libdevel-lexalias-perl
  libdevel-stacktrace-perl libdevice-serialport-perl libdynaloader-functions-perl
  libemail-date-format-perl libeval-closure-perl libevent-core-2.1-7
  libexception-class-perl libfcgi-perl libfile-sharedir-perl libfile-slurp-perl
  libhtml-template-perl libhttp-lite-perl libimage-base-bundle-perl libimage-info-perl
  libio-interface-perl libio-pty-perl libio-sessiondata-perl libio-socket-multicast-perl
  libio-string-perl libjs-modernizr libjs-mootools libjson-maybexs-perl libmecab2
  libmime-lite-perl libmime-tools-perl libmime-types-perl libmodule-implementation-perl
  libmodule-runtime-perl libmp4v2-2 libmro-compat-perl libnamespace-autoclean-perl
  libnamespace-clean-perl libnet-sftp-foreign-perl libnumber-bytes-human-perl
  libossp-uuid-perl libossp-uuid16 libpackage-stash-perl libpackage-stash-xs-perl
  libpadwalker-perl libparams-classify-perl libparams-util-perl
  libparams-validationcompiler-perl libphp-serialization-perl libreadonly-perl
  libref-util-perl libref-util-xs-perl librole-tiny-perl libsoap-lite-perl
  libsoap-wsdl-perl libspecio-perl libsub-exporter-perl libsub-exporter-progressive-perl
  libsub-identify-perl libsub-install-perl libsub-name-perl libsub-quote-perl
  libsys-cpu-perl libsys-meminfo-perl libsys-mmap-perl libtask-weaken-perl
  libtemplate-perl libterm-readkey-perl liburi-encode-perl libvariable-magic-perl
  libvncclient1 libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl
  libxml-sax-expat-perl libxml-sax-perl libxmlrpc-lite-perl libxstring-perl mecab-ipadic
  mecab-ipadic-utf8 mecab-utils mysql-client mysql-client-8.0 mysql-client-core-8.0
  mysql-server mysql-server-8.0 mysql-server-core-8.0 php-apcu php-apcu-bc php-common
  php-gd php-mysql php7.4-cli php7.4-common php7.4-gd php7.4-json php7.4-mysql
  php7.4-opcache php7.4-phpdbg php7.4-readline python-babel-localedata python3-alabaster
  python3-babel python3-docutils python3-imagesize python3-jinja2 python3-markupsafe
  python3-roman python3-sphinx python3-sphinx-rtd-theme python3-tz sgml-base
  sphinx-common sphinx-rtd-theme-common xml-core zoneminder zoneminder-doc
0 pacotes atualizados, 158 pacotes novos instalados, 0 a serem removidos e 0 não atualizados.
É preciso baixar 65,4 MB de arquivos.
Depois desta operação, 419 MB adicionais de espaço em disco serão usados.
Você quer continuar? [S/n] n
Abortar.
creto@creto:~$

Instalaçãozinha demorada..., mas depois de todas as gigantescas configurações, apareceram erros e:
Código: [Selecionar]
sudo dpkg --abort-after=9999999 --configure -a
Mesmo assim menções de erro no terminal:
Código: [Selecionar]
dpkg: erro ao processar o pacote mysql-server-8.0 (--configure):
 o subprocesso instalado, do pacote mysql-server-8.0, o script post-installation retornou erro do status de saída 1
Erros foram encontrados durante o processamento de:
 mysql-server-8.0

O que pude auxiliar foi isso agora é pesquisar sobre esse erro acima.

Boa sorte!!

T+

A vida, é feito andar de bicicleta, se parar, você cai! (Gabriel Contino)
Blog do Paulo Corrêa Creto

Offline zangarothiago

  • Usuário Ubuntu
  • *
  • Mensagens: 18
    • Ver perfil
Re:Zoneminder - não consigo instalar no Lubuntu com LXQt
« Resposta #4 Online: 26 de Julho de 2020, 19:41 »
 :'( esse Zoneminder não gosta do Debian!

Infelismente não consegui fazer ele funcionar no Lubuntu!

Já estou quase instalando uma máquina virtual (Virutal Box), instalar o Manjaro nela para rodar o Zoneminder

Acho que vai ser a minha solução.

Offline zangarothiago

  • Usuário Ubuntu
  • *
  • Mensagens: 18
    • Ver perfil
Re:Zoneminder - não consigo instalar no Lubuntu com LXQt
« Resposta #5 Online: 26 de Julho de 2020, 20:37 »
Esse é o script que no Manjaro faz o Zoneminder funcionar, mas não sei como adaptar isso para o Ubuntu

Código: [Selecionar]
#!/usr/bin/bash

choice="$1"

echo "WARNING: This script is heavilly WIP. Caveat emptor."
echo
echo "Please report any bugs you find at https://aur.archlinux.org/packages/zoneminder/"
echo

if [[ $EUID -ne 0 ]]
then
    echo "ERROR: This script must be run as root."
    exit 1
fi

case "$choice" in
   
    --nginx )
   
    systemctl daemon-reload
       
    # Ensure Nginx, fcgiwrap, spawn-fcgi and multiwatch are installed
    if [[ "$(pacman -Qs nginx)" = *"local/nginx"* ]] && [[ "$(pacman -Qs fcgiwrap)" = *"local/fcgiwrap"* ]] && [[ "$(pacman -Qs spawn-fcgi)" = *"local/spawn-fcgi"* ]] && [[ "$(pacman -Qs multiwatch)" = *"local/multiwatch"* ]]
    then
        # Ensure the main conf file is present
        if [ -f /etc/nginx/nginx.conf ]
        then
            # Configure Nginx with the folder structure used in Debian-based distributions
            if ( ! grep -q 'sites-enabled' /etc/nginx/nginx.conf )
            then
                sed -i 's|http {|http {\'$'\n    include       sites-enabled/*.conf;|g' /etc/nginx/nginx.conf
            fi
           
            # Create the sites-enabled folder if it's not already created
            if [ ! -d /etc/nginx/sites-enabled ]
            then
                mkdir -p /etc/nginx/sites-enabled
            fi
           
            # Enable ZoneMinder's server block if it's not already enabled
            if [ ! -f /etc/nginx/sites-enabled/zoneminder.conf ]
            then
                ln -sf /etc/nginx/sites-{available,enabled}/zoneminder.conf
            fi
           
            # Start Nginx
            systemctl is-active --quiet nginx && systemctl stop nginx
            systemctl restart --quiet nginx && echo "* Nginx successfully configured"
        else
            echo "ERROR: Nginx is installed but /etc/nginx/nginx.conf was not found"
            exit 1
        fi
       
        ### fcgiwrap ###

        # By default fcgiwrap is configured to launch in 10 instances via spawn-fcgi and multiwatch. This should be
        # enough for ZoneMinder to operate with 3 cameras. If you need more than 10 simultaneous CGI threads, edit the
        # provided fcgiwrap-multiwatch.service file and increase the number of instances to whatever suits your needs.

        systemctl is-active --quiet fcgiwrap.socket && systemctl stop fcgiwrap.socket
        systemctl is-active --quiet fcgiwrap && systemctl stop fcgiwrap
        systemctl is-active --quiet fcgiwrap-multiwatch && systemctl stop fcgiwrap-multiwatch
        systemctl restart --quiet fcgiwrap-multiwatch && echo "* fcgiwrap-multiwatch successfully configured"
    else
        echo "ERROR: You must install Nginx, fcgiwrap, spawn-fcgi and multiwatch before using this script with the --nginx flag"
        exit 1
    fi
    ;;
   
    --apache )
   
    systemctl daemon-reload
       
    # Ensure Apache is installed
    if [[ "$(pacman -Qs apache)" = *"local/apache"* ]]
    then
        # Ensure the main conf file is present
        if [ -f /etc/httpd/conf/httpd.conf ]
        then
            # Enable mod_proxy
            sed -i 's|#LoadModule proxy_module modules/mod_proxy.so|LoadModule proxy_module modules/mod_proxy.so|g' /etc/httpd/conf/httpd.conf
            # Enable mod_proxy_fcgi
            sed -i 's|#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so|LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so|g' /etc/httpd/conf/httpd.conf
            # Enable mod_rewrite
            sed -i 's|#LoadModule rewrite_module modules/mod_rewrite.so|LoadModule rewrite_module modules/mod_rewrite.so|g' /etc/httpd/conf/httpd.conf
            # Enable mod_cgid
            sed -i 's|#LoadModule cgid_module modules/mod_cgid.so|LoadModule cgid_module modules/mod_cgid.so|g' /etc/httpd/conf/httpd.conf
           
            # Enable ZoneMinder's VirtualHost if it's not already enabled
            if ( ! grep -q 'zoneminder.conf' /etc/httpd/conf/httpd.conf )
            then
                echo "Include conf/extra/zoneminder.conf" >> /etc/httpd/conf/httpd.conf
            fi

            # Start Apache
            systemctl is-active --quiet httpd && systemctl stop httpd
            systemctl restart --quiet httpd && echo "* Apache successfully configured"
        else
            echo "ERROR: Apache is installed but /etc/httpd/conf/httpd.conf' was not found"
            exit 1
        fi
    else
        echo "ERROR: You must install Apache before using this script with the --apache flag"
        exit 1
    fi
    ;;
   
    * )
   
    echo "Usage: $0 [--nginx|--apache]"
    exit 1
esac

# Ensure MariaDB is installed
if [[ "$(pacman -Qs mariadb)" = *"local/mariadb "* ]]
then
    # Initialize MariaDB's default database if it's not already initialized
    if [ ! -d /var/lib/mysql/mysql ]
    then
        systemctl is-active --quiet mariadb && systemctl stop mariadb
        mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql 2> /dev/null
    fi
   
    # Start MariaDB
    systemctl restart --quiet mariadb
   
    # Create ZoneMinder's database & user if they do not exist
    if [ ! -d /var/lib/mysql/zm ]
    then
        # Check for database root password
        if [[ "$(mysql -uroot -e "select * from mysql.user;" 2>&1)" = *"Access denied"* ]]
        then
            # If a database root password is set
            echo "* Secure MariaDB installation found, please enter the database root password."
            echo
            mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
            echo
            echo "* Enter the password one more time..."
            echo
            mysql -uroot -p -e "grant select,insert,update,delete,create,drop,alter,index,lock tables,alter routine,create routine,trigger,execute on zm.* to 'zmuser'@localhost identified by 'zmpass';"
            echo
        else
            # If a database root password is not set
            mysql -uroot < /usr/share/zoneminder/db/zm_create.sql
            mysql -uroot -e "grant select,insert,update,delete,create,drop,alter,index,lock tables,alter routine,create routine,trigger,execute on zm.* to 'zmuser'@localhost identified by 'zmpass';"
        fi
    fi
    echo "* MariaDB successfully configured"
else
    echo "* Skipping MariaDB"
fi

systemctl restart php-fpm && echo "* php-fpm successfully configured"

echo

systemctl is-active --quiet zoneminder && systemctl stop zoneminder
systemd-tmpfiles --create
systemctl start zoneminder && echo "  All done! ZoneMinder is (hopefully) listening at http://localhost:8095"

Offline zangarothiago

  • Usuário Ubuntu
  • *
  • Mensagens: 18
    • Ver perfil
Re:Zoneminder - não consigo instalar no Lubuntu com LXQt
« Resposta #6 Online: 28 de Julho de 2020, 11:08 »
Infelizmente não funcionou no ubuntu. Já fiz o que era necessário...

Instaleio o Manjaro com XFCE, o Zoneminder funcionou de primeira tentativa. O Manjaro é ótimo!

Offline creto

  • Usuário Archlinux
  • Usuário Ubuntu
  • *
  • Mensagens: 808
  • Vivemos esperando dias melhores
    • Ver perfil
    • Blog do Creto
Re:Zoneminder - não consigo instalar no Lubuntu com LXQt
« Resposta #7 Online: 28 de Julho de 2020, 19:42 »
O ubuntu também é ótimo ;)

T+
A vida, é feito andar de bicicleta, se parar, você cai! (Gabriel Contino)
Blog do Paulo Corrêa Creto

Offline zangarothiago

  • Usuário Ubuntu
  • *
  • Mensagens: 18
    • Ver perfil
Re:Zoneminder - não consigo instalar no Lubuntu com LXQt
« Resposta #8 Online: 27 de Setembro de 2020, 06:12 »
Eu não resisti e voltei a instalar o Lubuntu com LXQt.

O meu antigo Notebook ganha vida com ele, funciona suber bem, mas fico triste por não ter conseguido utilizar o Zoneminder, no Manjaro funciona de primeira, pois tem um script de instalação que torna tudo facil para esse aplicativo, mas no meu velho notebook o Manjaro fica muito pesado e lento, então voltei ao Lubuntu pois é leve e muito bom para usar.

Mas agradedo desde já todas a tentativas de ajuda para eu instalar o Zoneminder!

Muito obrigado por sua ajuda!

Offline creto

  • Usuário Archlinux
  • Usuário Ubuntu
  • *
  • Mensagens: 808
  • Vivemos esperando dias melhores
    • Ver perfil
    • Blog do Creto
Re:Zoneminder - não consigo instalar no Lubuntu com LXQt
« Resposta #9 Online: 03 de Outubro de 2020, 12:02 »
Por nada. E sinta-se a vontade de perguntar ao fórum sempre que necessário.

Eu uso um KDE nesse PC abaixo:
Código: [Selecionar]
creto@creto:~$ inxi -CGm
Memory:    RAM: total: 1.84 GiB used: 833.1 MiB (44.2%)
           RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU:       Topology: Dual Core model: Intel Celeron J1800 bits: 64 type: MCP
           L2 cache: 1024 KiB
           Speed: 1333 MHz min/max: 1333/2582 MHz Core speeds (MHz): 1: 1333 2: 1333
Graphics:  Device-1: Intel Atom Processor Z36xxx/Z37xxx Series Graphics & Display
           driver: i915 v: kernel
           Display: x11 server: X.Org 1.20.8 driver: modesetting unloaded: fbdev,vesa
           resolution: 1366x768~60Hz
           OpenGL: renderer: Mesa DRI Intel HD Graphics (BYT) v: 4.2 Mesa 20.0.8
creto@creto:~$

Só não me pergunte como conseguiram fazer um KDE rodar em PC-Carroça desse, mas funciona muito bem.

T+
A vida, é feito andar de bicicleta, se parar, você cai! (Gabriel Contino)
Blog do Paulo Corrêa Creto

Offline zangarothiago

  • Usuário Ubuntu
  • *
  • Mensagens: 18
    • Ver perfil
Re:Zoneminder - não consigo instalar no Lubuntu com LXQt Focal Fossa 20.04
« Resposta #10 Online: 03 de Janeiro de 2021, 08:54 »
Instalei o Lubuntu 20.04 codename Focal Fossa e finalmente consegui fazer funcionar o CFTV Zonemider, aplicativo ou sistema para monitoramento que usa Cameras Ips ou até analógicas...

Quem precisar basta seguir o tutorial abaixo, esse funciona eu agarantiummmm kkkkkk RSRSRSRS!!!!


Como instalar o ZoneMinder, v1.34.12. no LUBUNTU 20.04 LTS (Focal Fossa)"

- no terminal execute separadamente os comandos abaixo:

sudo su

sudo add-apt-repository ppa:iconnor/zoneminder-1.34

sudo apt-get update

apt install zoneminder

- Configure o banco de dados Mysql

rm /etc/mysql/my.cnf

cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf

/etc/init.d/mysql start

mysql


ALTER USER 'root'@'localhost' IDENTIFIED BY 'suasenhapredileta';

FLUSH PRIVILEGES ;

quit

- Criando  zm sql banco de dados:

mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
 
mysql
 
CREATE USER 'zmuser'@localhost IDENTIFIED BY 'zmpass';
 
--- (Se CREATE não funcionar tente usar o ALTER )


GRANT ALL PRIVILEGES ON zm.* TO 'zmuser'@'localhost' WITH GRANT OPTION;
 
FLUSH PRIVILEGES ;
 
quit
 
mysqladmin -uroot -p reload


--- Configurando Pastas para o Zoneminder

chmod 740 /etc/zm/zm.conf

chown root:www-data /etc/zm/zm.conf

adduser www-data video

a2enmod cgi

a2enconf zoneminder

a2enmod rewrite

a2enmod headers

a2enmod expires

--- Iniciando o Zoneminder e o Servidor Web Apache

systemctl enable zoneminder

service zoneminder start

service apache2 reload

Para abrir o Zoneminder no navegador use esse endereço:  (http://localhost/zm/)


Para o Zoneminder salvar os vídeos precisa mudar o dono dessa pasta abaixo:

chown www-data:www-data    /var/cache/zoneminder/events


- Para o Zonemider funcionar direto na internet - trocar a porta 80, pois alguns roteadores bloqueiam a navegação na porta 80

Trocar a porta do acesso Web – Apache
***********************************
Muitas vezes o seu ISP (Internet Service Provider – Provedor de Internet), como a NET, bloqueia o acesso externo pela porta 80. Para trocar a porta padrão basta alterar a porta original (80) para a porta desejada em dois arquivos:
/etc/apache2/sites-enabled/000-default
---- 80 mudar para 8095 ou qualquer porta que quiser!!!!
e
/etc/apache2/ports.conf
Linhas:
NameVirtualHost *:80
Listen 8095                   “””” mudar porta, eu mudei de 80 para 8095“””””
Após, reiniciar o servidor web Apache assim:
/etc/init.d/apache2 restart


E finalmente, reinicie o ZoneMinder e acesse a partir do novo endereço (com exemplo da porta 8095):
http://localhost:8095/zm       ou       http://IP_REAL_DO_SERVIDOR:8095/zm