[Solved] Install ZM on Gentoo Problem

Support and queries relating to all previous versions of ZoneMinder
Locked
User avatar
R2D2
Posts: 170
Joined: Tue Dec 27, 2005 5:02 pm
Location: Stuttgart, Germany

[Solved] Install ZM on Gentoo Problem

Post by R2D2 »

Hi,

i want install ZM on a Gentoo System (for testing only), but when i type make install i get the following error message:

Code: Select all

 /usr/bin/install -c 'zmtrack.pl' '/usr/local/bin/zmtrack.pl'
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/usr/local/src/ZoneMinder-1.22.2/scripts'
make[2]: Leaving directory `/usr/local/src/ZoneMinder-1.22.2/scripts'
Making install in ZoneMinder
make[2]: Entering directory `/usr/local/src/ZoneMinder-1.22.2/scripts/ZoneMinder'
make[2]: *** No rule to make target `/usr/lib/perl5/5.8.5/i586-linux-thread-multi/Config.pm', needed by `Makefile'.  Stop.
make[2]: Leaving directory `/usr/local/src/ZoneMinder-1.22.2/scripts/ZoneMinder'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/ZoneMinder-1.22.2/scripts'
make: *** [install-recursive] Error 1
vdr01 ZoneMinder-1.22.2 #
Any idea, what this could be?
Last edited by R2D2 on Wed Nov 08, 2006 5:07 pm, edited 1 time in total.
drakkan
Posts: 29
Joined: Tue Oct 24, 2006 8:38 pm

Post by drakkan »

zoneminder is in portage use the gentoo way:

Code: Select all

echo "www-misc/zoneminder ~x86" >> /etc/portage/package.keywords

echo "dev-perl/X10 ~x86" >> /etc/portage/package.keywords

echo "www-misc/zoneminder mpeg mysql" >> /etc/portage/package.use

emerge zoneminder
regards
drakkan
User avatar
R2D2
Posts: 170
Joined: Tue Dec 27, 2005 5:02 pm
Location: Stuttgart, Germany

Post by R2D2 »

drakkan wrote:zoneminder is in portage use the gentoo way:

Code: Select all

echo "www-misc/zoneminder ~x86" >> /etc/portage/package.keywords

echo "dev-perl/X10 ~x86" >> /etc/portage/package.keywords

echo "www-misc/zoneminder mpeg mysql" >> /etc/portage/package.use

emerge zoneminder
regards
drakkan
I've installed Zoneminder wtih emerge zoneminder
After instaling i did the following steps from the readme:

Code: Select all

=================================================================

0. If this is a new installation, you will need to create a database for ZM to
   use. Execute the following:

 cd /usr/share/zoneminder
 mysql mysql < db/zm_create.sql
 mysql mysql
  > grant select,insert,update,delete on zoneminder.* to '<username>'@localhost identified by '<password>';
  > quit
 mysqladmin reload

1.  Edit /etc/zm.conf:
  ZM_PATH_BUILD => /usr/share/zoneminder
  ZM_PATH_WEB   => /var/www/localhost/htdocs/zoneminder
  ZM_PATH_CGI   => /var/www/localhost/cgi-bin

  Also set your database settings.

2.  Start the zoneminder daemon:
  /etc/init.d/zoneminder stop

3. Login: http://localhost//zoneminder/zm.php

Default username/password are admin/admin.

=================================================================
But when i open my Browser i get this error Message:

Code: Select all

Fatal error: Call to undefined function mysql_pconnect() in /var/www/localhost/htdocs/zoneminder/zm_db.php on line 21
This is line 21 in zm_db.php

Code: Select all

$conn = mysql_pconnect( ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS ) or die("Could not connect to database: ".mysql_error());
wyldechylde
Posts: 3
Joined: Mon Nov 06, 2006 3:18 am
Location: griffin, ga.

Post by wyldechylde »

Have you made sure all your perl mysql modules are emerged? Also did you make sure the password/username in your zm.conf file are the same as the one's you entered when you configured mysql?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Not sure what it is in Gentoo, but php-mysql package for redhat/Fedora/suse/mandriva is usualy missing when I see that error.

Corey
User avatar
R2D2
Posts: 170
Joined: Tue Dec 27, 2005 5:02 pm
Location: Stuttgart, Germany

Post by R2D2 »

i find the fault.

emerge dev-lang/php does install PHP5 unfortunately without mysql-support.

Now i will try install PHP5 from source.
User avatar
R2D2
Posts: 170
Joined: Tue Dec 27, 2005 5:02 pm
Location: Stuttgart, Germany

Post by R2D2 »

now i've installed PHP-5.2.0 form source with the following options:

Code: Select all

'./configure' '--prefix=/usr/lib/php5' '--host=i586-pc-linux-gnu' '--mandir=/usr/lib/php5/man' '--infodir=/usr/lib/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--disable-cli' '--with-apxs2=/usr/sbin/apxs2' '--with-config-file-path=/etc/php/apache2-php5' '--with-config-file-scan-dir=/etc/php/apache2-php5/ext-active' '--without-pear' '--disable-bcmath' '--without-bz2' '--disable-calendar' '--disable-ctype' '--without-curl' '--without-curlwrappers' '--disable-dbase' '--disable-exif' '--without-fbsql' '--without-fdftk' '--disable-filepro' '--disable-ftp' '--with-gettext' '--without-gmp' '--disable-hash' '--without-hwapi' '--without-informix' '--disable-ipv6' '--without-kerberos' '--disable-mbstring' '--with-mcrypt' '--disable-memory-limit' '--without-mhash' '--without-ming' '--without-msql' '--without-mssql' '--with-ncurses' '--with-openssl' '--with-openssl-dir=/usr' '--disable-pcntl' '--disable-pdo' '--without-pgsql' '--disable-posix' '--with-pspell' '--without-recode' '--disable-simplexml' '--disable-shmop' '--without-snmp' '--disable-soap' '--disable-sockets' '--without-sybase' '--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--without-tidy' '--disable-tokenizer' '--disable-wddx' '--disable-xmlreader' '--disable-xmlwriter' '--without-xmlrpc' '--without-xsl' '--with-zlib' '--disable-debug' '--enable-dba' '--without-cdb' '--with-db4' '--without-flatfile' '--with-gdbm' '--without-inifile' '--without-qdbm' '--with-freetype-dir=/usr' '--with-t1lib=/usr' '--disable-gd-jis-conv' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--without-xpm-dir' '--with-gd' '--with-mysqli=/usr/bin/mysql_config' '--without-mysql' '--with-readline' '--without-libedit' '--without-mm' '--without-sqlite' 
I think the importantest part is:

Code: Select all

'--with-mysqli=/usr/bin/mysql_config' '--without-mysql' 
PHP-5.2.0 works fine, but the Error-Message in my Browser is the same i've posted above
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

R2D2 wrote:

Code: Select all

' '--with-gd' '--with-mysqli=/usr/bin/mysql_config' '--without-mysql' 
I think the importantest part is:

Code: Select all

'--with-mysqli=/usr/bin/mysql_config' '--without-mysql' 
PHP-5.2.0 works fine, but the Error-Message in my Browser is the same i've posted above
You defined it without-mysql, why would you do that? Does that not build it with out mysql support?
User avatar
R2D2
Posts: 170
Joined: Tue Dec 27, 2005 5:02 pm
Location: Stuttgart, Germany

Post by R2D2 »

msqli is newer then msql.

--> http://www.php.net/manual/en/ref.mysqli.php
User avatar
R2D2
Posts: 170
Joined: Tue Dec 27, 2005 5:02 pm
Location: Stuttgart, Germany

Post by R2D2 »

php -m

Code: Select all

vdr01 php-5.2.0 # php -m
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/lib/php/extensions/no-debug-non-zts-20050922/mysql.so' - /usr/lib/php5/lib/php/extensions/no-debug-non-zts-20050922/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[PHP Modules]
date
dba
dom
gd
gettext
iconv
libxml
mcrypt
ncurses
openssl
pcre
pspell
readline
Reflection
session
SPL
standard
xml
zlib

[Zend Modules]

vdr01 php-5.2.0 #
Any idea?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

But the web interface might not know how to handle the new mysqi yet (sorry haven't checked), I know I mentioned it to Phil but I don't know that he has had time to integrate it in.

Regards,
Corey
User avatar
R2D2
Posts: 170
Joined: Tue Dec 27, 2005 5:02 pm
Location: Stuttgart, Germany

Post by R2D2 »

Solved

I did the following Steps:

:arrow: Installing MySQL 5.0

Code: Select all

cat >> /etc/portage/package.use << "EOF"
=dev-db/mysql-5.0*  -berkdb
EOF
 
emerge "=dev-db/mysql-5.0*"
:arrow: Configure MySQL

Code: Select all

cat > /etc/mysql/my.cnf << "EOF"
[client]
character-sets-dir    = /usr/share/mysql/charsets
default-character-set = utf8
port                  = 3306
socket                = /var/run/mysqld/mysqld.sock
 
[mysql]
character-sets-dir    = /usr/share/mysql/charsets
default-character-set = utf8
 
[mysqladmin]
character-sets-dir    = /usr/share/mysql/charsets
default-character-set = utf8
 
[mysqlcheck]
character-sets-dir    = /usr/share/mysql/charsets
default-character-set = utf8
 
[mysqldump]
character-sets-dir    = /usr/share/mysql/charsets
default-character-set = utf8
max_allowed_packet    = 16M
quick
 
[mysqlimport]
character-sets-dir    = /usr/share/mysql/charsets
default-character-set = utf8
 
[mysqlshow]
character-sets-dir    = /usr/share/mysql/charsets
default-character-set = utf8
 
[isamchk]
character-sets-dir    = /usr/share/mysql/charsets
key_buffer_size       = 128M
sort_buffer_size      = 128M
read_buffer_size      = 4M
write_buffer_size     = 4M
 
[myisamchk]
character-sets-dir    = /usr/share/mysql/charsets
key_buffer_size       = 128M
sort_buffer_size      = 128M
read_buffer_size      = 4M
write_buffer_size     = 4M
 
[myisampack]
character-sets-dir    = /usr/share/mysql/charsets
 
[mysqld_safe]
err-log               = /var/log/mysql/mysql.err
 
[mysqld]
character-set-server  = utf8
default-character-set = utf8
user                  = mysql
port                  = 3306
bind-address          = 127.0.0.1
socket                = /var/run/mysqld/mysqld.sock
pid-file              = /var/run/mysqld/mysqld.pid
log-error             = /var/log/mysql/mysqld.err
basedir               = /usr
datadir               = /var/lib/mysql
tmpdir                = /tmp
language              = /usr/share/mysql/english
log-bin               = mysql-bin
server-id             = 1
sync_binlog           = 1
max_binlog_size       = 10M
# expire_logs_days      = 2
slave_compressed_protocol = 1
delay-key-write       = ALL
skip-locking
# skip-networking
skip-name-resolve
skip-external-locking
skip-show-database
safe-user-create      = 1
net_buffer_length     = 8K
key_buffer_size       = 128M
sort_buffer_size      = 4M
join_buffer_size      = 4M
read_buffer_size      = 4M
read_rnd_buffer_size  = 8M
myisam_sort_buffer_size = 64M
max_allowed_packet    = 16M
thread_cache_size     = 8
table_cache           = 256
query_cache_type      = 1
query_cache_size      = 32M
query_cache_limit     = 1M
thread_concurrency    = 8
local-infile          = 0
long_query_time       = 2
log_slow_queries
log_long_format
myisam_recover
skip-innodb
innodb_buffer_pool_size = 32M
innodb_additional_mem_pool_size = 4M
innodb_data_home_dir  = /var/lib/mysql/
innodb_log_arch_dir   = /var/lib/mysql/
innodb_log_group_home_dir = /var/lib/mysql/
innodb_data_file_path = ibdata1:10M:autoextend:max:128M
innodb_log_file_size  = 5M
innodb_log_buffer_size = 8M
innodb_log_files_in_group = 2
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
 
[mysqlhotcopy]
interactive-timeout
EOF

Code: Select all

emerge --config "=dev-db/mysql-5.0*"
 
rc-update add mysql default
 
/etc/init.d/mysql start
/usr/bin/mysql_secure_installation
/etc/init.d/mysql stop
/etc/init.d/mysql start
:arrow: Insatlling PHP5

Edit /etc/make.conf as follow:

Code: Select all

USE="apache2 berkdb cli crypt doc gdbm iconv mysql mysqli ncurses nls pcre readline reflection session spell spl ssl truetype vhosts xml zlib -adabas -apache -bcmath -birdstep -bzip2 -calendar -cdb -cgi -cjk -concurrentmodphp -ctype -curl -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -empress -empress-bcs -esoob -exif -fastbuild -fdftk -filepro -firebird -flatfile -force-cgi-redirect -frontbase -ftp -gd -gd-external -gmp -hardenedphp -hash -hyperwave-api -imap -informix -inifile -interbase -iodbc -ipv6 -java-external -kerberos -ldap -libedit -mcve -memlimit -mhash -ming -msql -mssql -oci8 -oci8-instant-client -odbc -pcntl -pdo -pdo-external -pic -posix -postgres -qdbm -recode -sapdb -sasl -sharedext -sharedmem -simplexml -snmp -soap -sockets -solid -sqlite -sybase -sybase-ct -sysvipc -threads -tidy -tokenizer -unicode -vm-goto -vm-switch -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl -yaz -zip

Code: Select all

emerge dev-lang/php
:arrow: Installing a Perl Module

Code: Select all

emerge DBD-mysql
:arrow: Downloading, configure and installing Zoneminder

Code: Select all

cd /usr/local/src 
wget http://www2.zoneminder.com/downloads/ZoneMinder-1.22.2.tar.gz 
tar -xvzf ZoneMinder-1.22.2.tar.gz 
cd ZoneMinder-1.22.2
./configure --with-webdir=/var/www/localhost/htdocs/zm --with-cgidir=/var/www/localhost/cgi-bin --with-mysql=/usr/bin --with-ffmpeg=/usr/bin 

mysql mysql < db/zm_create.sql 

mysql mysql 

mysql> GRANT ALL PRIVILEGES ON zm.* TO 'zmuser'@localhost identified by 'zmpass'; 

mysql> GRANT ALL PRIVILEGES ON zm.* TO 'zmuser'@'%' identified by 'zmpass'; 

mysql> quit 

mysqladmin reload 

make install 
:arrow: Installig Cambozola

Code: Select all

 emerge dev-java/ant
cd /usr/local/src 
wget http://www.charliemouse.com/code/cambozola/cambozola-latest.tar.gz 
tar xvfz cambozola-latest.tar.gz 
cp /usr/local/src/cambozola-0.68/dist/cambozola.jar /var/www/localhost/htdocs/zm
chmod 775 /var/www/localhost/htdocs/zm/cambozola.jar 
Then under the tools or Images tab enable ZM_OPT_CAMBOZOLA

:!: NOTE :!: This is only for the Mysql-PHP-ZM part, --> Apache, ffmpeg, etc must be installed before!


I hope it's helpfull for other Gentoo Users
josepy
Posts: 34
Joined: Mon Dec 24, 2007 6:28 pm

Post by josepy »

Your post was extremely helpful in getting Zoneminder running on my system!

Thanks Much!

Josepy
qriff
Posts: 15
Joined: Thu Sep 20, 2007 9:11 pm

Post by qriff »

Thanks.
Locked