Reply
 
Thread Tools Display Modes
  #11  
Old 10-08-2013, 02:11 PM
bforest bforest is offline
Senior Member
 
Join Date: Feb 2009
Location: Va, USofA
Posts: 161
Thanks: 11
Thanked 8 Times in 6 Posts
Default
I also found the following link which outlines an install process and requires kernel changes:

http://blog.63bit.net/2013/02/gettin...n-freebsd.html from Feb. 2013

Quote:
Step 1:
Recompile your kernel, increasing SHMMAX and SHMMNI (I couldn't get Mary Poppins out of my head after that...). I used some very large values here, and this is probably highly tunable:

options SHMMAX=2457600001
options SHMMAXPGS=60000
options SHMMNI=4096

I cribbed the values from here:
http://forums.freebsd.org/showthread.php?t=2323
and made up the value for SHMMNI
.
Can anyone comment on the possible pos/neg affects of these kernel changes on PCBSD. Also, is there a "PCBSD way" to modify the kernal?

I am considering dedicating a PCBSD system to this application, using the system to serve the web app and view the related video.
.
__________________
- Ben

Last edited by bforest; 10-24-2013 at 10:01 PM. Reason: Fixed Link
Reply With Quote
  #12  
Old 01-09-2014, 03:06 PM
bforest bforest is offline
Senior Member
 
Join Date: Feb 2009
Location: Va, USofA
Posts: 161
Thanks: 11
Thanked 8 Times in 6 Posts
Default
Continuing ... I am trying to get Zoneminder running following instructions I found at:

http://blog.63bit.net/2013/02/gettin...n-freebsd.html

Quote:
- - - - - - - What PCBSD I am running on:
[root@testinstall] /# uname -a
FreeBSD testinstall 9.2-RELEASE-p1 FreeBSD 9.2-RELEASE-p1 #0: Sat Nov 16 04:38:22 UTC 2013
root@amd64-builder.pcbsd.org:/usr/obj/usr/src/sys/GENERIC amd64
(let me know if you need more info. I patched up to Jan 6, 2014 but not sure how to display that state.)

Code:
- - - - - - - BEFORE any changes:
[root@testinstall] ~# sysctl -a | grep shm
kern.ipc.shm_allow_removed: 1
kern.ipc.shm_use_phys: 0
kern.ipc.shmall: 131072
kern.ipc.shmseg: 1024
kern.ipc.shmmni: 1024
kern.ipc.shmmin: 1
kern.ipc.shmmax: 536870912
kern.features.sysv_shm: 1
kern.features.posix_shm: 1
.
Code:
- - - - - - - I tried manual - on the fly changes and got the following:
[root@testinstall] ~# sysctl kern.ipc.shmmax=2457600001
kern.ipc.shmmax: 536870912 -> 2457600001

[root@testinstall] ~# sysctl kern.ipc.shmmaxpgs=60000
sysctl: unknown oid 'kern.ipc.shmmaxpgs'

[root@testinstall] ~# sysctl kern.ipc.shmmni=4096
sysctl: oid 'kern.ipc.shmmni' is a read only tunable
sysctl: Tunable values are set in /boot/loader.conf
.
Code:
- - - - - - - edits to /etc/sysctl.conf
. . .
# Enable shm_allow_removed
kern.ipc.shm_allow_removed=1

## changes for CDC Camera Monitor Workstation
kern.ipc.shmmax=2457600001
#kern.ipc.shmmaxpgs=60000   # added to: /boot/loader.conf
#kern.ipc.shmmni=4096       # added to: /boot/loader.conf

# Speed up the shutdown process
kern.shutdown.poweroff_delay=500
. . .
.
Added last two lines in /boot/loader.conf
Quote:
[root@testinstall] ~# cat /boot/loader.conf < AFTER EDITING
# * IMPORTANT NOTICE *
# Run 'grub-mkconfig -o /boot/grub/grub.cfg' after making changes to this file
#################################################
vboxdrv_load="YES"
nvidia_load="YES"
geom_mirror_load="YES"
zfs_load="YES"
vfs.root.mountfrom="zfs:tank/ROOT/default"
kern.ipc.shmmni=4096
kern.ipc.shmmaxpgs=60000
.
Code:
- - - - - - - AFTER CHANGES and ReBoot:

[root@testinstall] ~# sysctl -a | grep shm
kern.ipc.shm_allow_removed: 1
kern.ipc.shm_use_phys: 0
kern.ipc.shmall: 60000                  <<<<<<<< less?
kern.ipc.shmseg: 1024
kern.ipc.shmmni: 4096                  <<<<<<<<
kern.ipc.shmmin: 1
kern.ipc.shmmax: 2457600001      <<<<<<<<
kern.features.sysv_shm: 1
kern.features.posix_shm: 1
- - - - - - - AFTER the above configuration changes, installed the following.

[x] Installed System Sources
[x] Installed Ports Tree via PortSnap

[x] Installed: www/apache22 (w/all defaults)

[x] Attempted Install: database/mysql55-server but it is already installed
Don't want to overwrite or upgrade because if PCBSD has this already as part of the base system, I am not sure upgrading it won't brake something.

Attempted access to database:

Quote:
[root@testinstall] /# mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Went into PC-BSD Control Panel / Service Manager:
Enabled mysql and Started the "service"
I guess if the service is not running, it won't hurt to upgrade MySQL. I will ask on the forum. [?Asking!?]
.
Quote:
[root@testinstall] /# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.34 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> quit
.
At this point (Jan 6th 2014) I have also attempted to install Zoneminder from ports. Many additional ports being installed. For the most part I am selecting defaults on config pages. I got an error close to the end saying that it could not find "freetype2". When I run "pkg info | grep type" I CAN find the package installed so ... I wrote to port maintainer. This happened while it was installing dependency port FFMPEG.
__________________
- Ben

Last edited by bforest; 01-09-2014 at 03:26 PM. Reason: make easier to read
Reply With Quote
  #13  
Old 01-09-2014, 05:26 PM
bforest bforest is offline
Senior Member
 
Join Date: Feb 2009
Location: Va, USofA
Posts: 161
Thanks: 11
Thanked 8 Times in 6 Posts
Default
On Tuesday, January 7, 2014 1:37 PM, Ben wrote:
I received the following error in the course of installing ZoneMinder from ports. *
.
Quote:
. . .
====> Compressing man pages (compress-man)
===> *Installing for frei0r-1.3_1
===> *Checking if graphics/frei0r already installed
===> * Registering installation for frei0r-1.3_1 as automatic
Installing frei0r-1.3_1... done
===> * Returning to build of ffmpeg0-0.7.16_1,1
===> * ffmpeg0-0.7.16_1,1 depends on file: /usr/local/bin/perl5.16.3 - found
===> * ffmpeg0-0.7.16_1,1 depends on shared library: libfreetype.so - found
===> * ffmpeg0-0.7.16_1,1 depends on shared library: libopencv_imgproc.so - found
===> * ffmpeg0-0.7.16_1,1 depends on shared library: libschroedinger-1.0.so - found
===> * ffmpeg0-0.7.16_1,1 depends on shared library: libtheora.so - found
===> * ffmpeg0-0.7.16_1,1 depends on shared library: libvorbisenc.so - found
===> * ffmpeg0-0.7.16_1,1 depends on shared library: libvpx.so - found
===> * ffmpeg0-0.7.16_1,1 depends on shared library: libx264.so - found
===> * ffmpeg0-0.7.16_1,1 depends on shared library: libxvidcore.so - found
===> *Configuring for ffmpeg0-0.7.16_1,1
ERROR: freetype2 not found

If you think configure made a mistake, make sure you are using the latest*version from Git. *If the latest version fails, report the problem to the*ffmpeg-user{a}ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help*solving the problem.

===> *Script "configure" failed unexpectedly.
Please report the problem to wg{a}FreeBSD.org [maintainer] and attach the*"/usr/ports/multimedia/ffmpeg0/work/ffmpeg-0.7.16/config.err" including the*output of the failure of your make command. Also, it might be a good idea to*provide an overview of all packages installed on your system (e.g. a*/usr/local/sbin/pkg-static info -g -Ea).
*** [do-configure] Error code 1 . . . . . . . . . . . . . . . . . . . . {config.err does not exist where listed above}

Stop in /usr/ports/multimedia/ffmpeg0.
*** [install] Error code 1

Stop in /usr/ports/multimedia/ffmpeg0.
*** [lib-depends] Error code 1

Stop in /usr/ports/multimedia/zoneminder.
[root@testinstall] /usr/ports/multimedia/zoneminder#
.
- - - - - - -
Quote:
[root@testinstall] /usr/ports/multimedia/zoneminder# pkg info | grep freetype
freetype2-2.5.0.1 * * * * * * *Free and portable TrueType font rendering engine
.
__________________
- Ben
Reply With Quote
  #14  
Old 02-03-2014, 02:29 PM
bforest bforest is offline
Senior Member
 
Join Date: Feb 2009
Location: Va, USofA
Posts: 161
Thanks: 11
Thanked 8 Times in 6 Posts
Default
Someone emailed me asking the status of this installation:

They sent a link where I got a reply from the FFMPEG users group:

Quote:
Hey Ben,

I saw your post
http://ffmpeg-users.933282.n4.nabble...td4663157.html

I am also trying to get zoneminder to install, in FreeBSD 9.2. I got
the same error, but I don't understand the answer you where given. Did
you resolve this? How?
.
The answer I got was that the FFMPEG on PCBSD was to old. I checked the FreeBSD ports and did find FFMPEG 2.1 available. I tend to want to assume that if PCBSD has an older version of software, it is for a reason.

It has been a few weeks since I worked on this. I may be assuming that PCBSD already had FFMPEG installed. I will post my results of installing v2.1.
__________________
- Ben
Reply With Quote
  #15  
Old 02-04-2014, 04:35 PM
Tuna130 Tuna130 is offline
Junior Member
 
Join Date: Feb 2014
Location: Spain, the sunny bit
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Hello there!
Yeah, that was me with the email. Just to share with you how far I got installing zoneminder in FreeBSD 9.2, so far.

Updating to ffmpeg 2.1 gave me the same error, so I removed ffmpeg 2.1
cd /usr/ports/multimedia/ffmpeg/
sudo make deinstall
And then reinstalled version 0.7.
cd /usr/ports/multimedia/ffmpeg0
sudo make config
In the options list remove the X for option FREETYPE, OK
sudo make
Go for a drink or two, while gobbledigook
No errors?
sudo make install clean

Then continue with zoneminder compile
cd /usr/ports/multimedia/zoneminder
sudo make
And, it seems to accept the ffmpeg 0.7 now!

And then, after another long wait, the nex error.
Quote:
In file included from /usr/local/include/php/main/../main/php_config.h:2355,
from /usr/local/include/php/Zend/zend_config.h:1,
from /usr/local/include/php/Zend/zend.h:51,
from /usr/local/include/php/main/php.h:34,
from /usr/ports/devel/php5-json/work/php-5.4.23/ext/json/json.c:25:
/usr/local/include/php/ext/php_config.h:1:29: error: ext/json/config.h: No such file or directory
/usr/local/include/php/ext/php_config.h:2:30: error: ext/mysql/config.h: No such file or directory
/usr/local/include/php/ext/php_config.h:3:32: error: ext/session/config.h: No such file or directory
*** [json.lo] Error code 1
1 error
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** [do-build] Error code 1

Stop in /usr/ports/devel/php5-json.
*** [run-depends] Error code 1

Stop in /usr/ports/multimedia/zoneminder.
I tried
cd /usr/ports/devel/php5-json
sudo make
But I get the same error. And there is nothing configurable in make config...
Also tried the binairy package, but I get stuck here:
Quote:
sudo pkg_add -r php5-json
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/po.../php5-json.tbz... Done.
pkg_add: package 'php5-json-5.4.17' or its older version already installed
and then
sudo make deinstall && sudo make reinstall
gets me to the same error as above....

Any advise would be nice! Thanks!
Reply With Quote
  #16  
Old 02-07-2014, 11:33 AM
Tuna130 Tuna130 is offline
Junior Member
 
Join Date: Feb 2014
Location: Spain, the sunny bit
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default
OK, I got to the end of the install script!

My problem with php was solved by:
pkg_info | grep "php"
and then removed package by package with
sudo pkg_delete packagename

Then php was installed when
/usr/ports/multimedia/zoneminder % sudo make install

Now lets see if I can get this working.

This is a great learning experience..!
Reply With Quote
  #17  
Old 02-23-2014, 09:45 AM
Tuna130 Tuna130 is offline
Junior Member
 
Join Date: Feb 2014
Location: Spain, the sunny bit
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default
OK, I think it works now. I got to the zoneminder console on localhost, but there seemed to be a problem with the time settings.

Quote:
Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/local/www/zoneminder/data/skins/classic/views/console.php on line 186
But when I checked that line 186, it didn't give me further clues for setting date and time:
Quote:
<h3 id="systemTime"><?= preg_match( '/%/', DATE_FMT_CONSOLE_LONG )?strftime( DATE_FMT_CONSOLE_LONG ):date( DATE_FMT_CONSOLE_LONG ) ?></h3>
Then I put this at the second line of the console.php file, (first line is <?php):
Code:
date_default_timezone_set("Europe/Madrid");
and now the error has gone!

Further reading here.
Reply With Quote
  #18  
Old 03-22-2014, 06:06 PM
bforest bforest is offline
Senior Member
 
Join Date: Feb 2009
Location: Va, USofA
Posts: 161
Thanks: 11
Thanked 8 Times in 6 Posts
Default
I am still running a test camera system using PCBSD92.

I updated using Package Manager gui.

I tried again as root installing zoneminder from ports and...
It completed the install !

The only thing I changed since my last try was to update the packages. So with the latest packages since last try the Zoneminder port install worked.

Now I need to try to catch up to Tuna130.
__________________
- Ben
Reply With Quote
  #19  
Old 04-15-2014, 02:36 AM
bforest bforest is offline
Senior Member
 
Join Date: Feb 2009
Location: Va, USofA
Posts: 161
Thanks: 11
Thanked 8 Times in 6 Posts
Default
taken me a while to get back to this...

I am trying to follow the steps in doc:

http://blog.63bit.net/2013/02/gettin...n-freebsd.html

I am on LINE:4 of Step:2

So when I run the command... here is what I get:

Quote:
[root@testinstall] /usr/ports/multimedia/zoneminder# mysql -u root < ./work/ZoneMinder-1.25.0/db/zm_create.sql.in

ERROR 1064 (42000) at line 265: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@ZM_MYSQL_ENGINE@' at line 11
I am not sure what is happening.

When I look at the referenced area in the code I see:

Code:
--
-- Table structure for table `Logs`
--
CREATE TABLE `Logs` (
  `TimeKey` decimal(16,6) NOT NULL,
  `Component` varchar(32) NOT NULL,
  `Pid` smallint(6) DEFAULT NULL,
  `Level` tinyint(3) NOT NULL,
  `Code` char(3) NOT NULL,
  `Message` varchar(255) NOT NULL,
  `File` varchar(255) DEFAULT NULL,
  `Line` smallint(5) unsigned DEFAULT NULL,
  KEY `TimeKey` (`TimeKey`)
) ENGINE=@ZM_MYSQL_ENGINE@;
  
--
-- Table structure for table `MonitorPresets`
--
Is it missing a ";" between ") ENGINE..." ?? { ); ENGINE... }

or move the ")" between "...ENGINE@;" ?? { ...ENGINE@ ); }
__________________
- Ben
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:08 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

Copyright 2005-2010, The PC-BSD Project. PC-BSD and the PC-BSD logo are registered trademarks of iXsystems.
All other content is freely available for sharing under the terms of the Creative Commons Attribution License.