Change mysql root password
Code: Select all
mysqladmin -u root -pnosoup4u password 'yournewpwd'
Code: Select all
rm /etc/ssh/ssh_host_*
dpkg-reconfigure openssh-server
Code: Select all
ifconfig eth0 xxx.xxx.xxx.xxx netmask 255.255.255.0 up
route add -net xxx.xxx.xxx.xxx netmask 255.255.255.0 eth0
route add default gw xxx.xxx.xxx.xxx eth0
Code: Select all
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx
Update your system:
Code: Select all
apt-get update && apt-get upgrade
Code: Select all
apt-get install debian-archive-keyring && apt-get update && apt-get upgrade
Code: Select all
apt-get purge alsa-base linux-sound-base
apt-get autoremove && apt-get clean
apt-get install locales localepurge
dpkg-reconfigure locales
dpkg-reconfigure tzdata
apt-get install di htop chkconfig
apt-get install ntp
apt-get autoremove && apt-get clean
Code: Select all
vi /etc/ntp.conf
Code: Select all
server 0.es.pool.ntp.org
server 1.es.pool.ntp.org
server 2.es.pool.ntp.org
server 3.es.pool.ntp.org
Code: Select all
deb-src http://security.debian.org/ wheezy/updates main
deb http://security.debian.org wheezy/updates main contrib non-free
deb http://ftp.fr.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.fr.debian.org/debian/ squeeze main contrib non-free
deb http://ftp.us.debian.org/debian wheezy main contrib non-free
deb http://http.us.debian.org/debian stable main contrib non-free
#deb http://ftp.us.debian.org/debian/ lenny main contrib non-free
#deb http://download.webmin.com/download/repository sarge contrib
Code: Select all
APT::Cache-Limit 33554432;
Code: Select all
apt-get update && apt-get upgrade
apt-get dselect-upgrade (fix broken dependencies & update system)
apt-get clean && apt-get autoremove
apt-get purge bluez samba alsa-base alsa-utils lighttpd
apt-get autoremove
apt-get install mysql-server apache2
dpkg-reconfigure apache2
Code: Select all
vi /etc/apache2/httpd.conf
Code: Select all
/etc/init.d/apache2 restart
apt-get install ufw preload fail2ban ffmpeg libjs-mootools
apt-get install ntp tzdata fail2ban locate nmap tar zip
apt-get install debian-archive-keyring bc coreutils
apt-get purge exim4
apt-get install postfix mailx phpmyadmin
Code: Select all
cd /root
wget http://sheeva.with-linux.com/sheeva/README-PLUG-UPDATE.sh
mv README-PLUG-UPDATE.sh upgradeGuru.sh
chmod +x upgradeGuru.sh
./upgradeGuru.sh 3.0.7 --nandkernel
rm sheeva-3*
reboot
Code: Select all
apt-get install systemd
apt-get autoremove
#deb http://download.webmin.com/download/repository sarge contrib
Then:
Code: Select all
wget -q http://www.webmin.com/jcameron-key.asc -O- | apt-key add -
apt-get install webmin
Code: Select all
apt-get install autoconf automake make
apt-get install gcc
apt-get install g++
apt-get install libphp-serialization-perl libgnutls-dev gnutls-bin
apt-get install build-essential libmysqlclient-dev libjpeg8-dev
apt-get install libcrypto++-dev libssl-dev perl libdate-manip-perl
perl -MCPAN -e shell
install Sys::Mmap Device::SerialPort Net::SFTP::Foreign Expect Archive::Zip MIME::Lite MIME::Entity X10::ActiveHome LWP::UserAgent
quit
apt-get install gawk mawk php5 php5-mysql libdbd-mysql-perl libwww-perl
apt-get install libavformat-dev libswscale-dev libavutil-dev libv4l-dev
apt-get install libpcre3-dev libsys-mmap-perl libavcodec-dev libavdevice-dev libbz2-dev
apt-get install dh-autoreconf libnet-ssleay-perl openssl libauthen-pam-perl
apt-get clean && apt-get autoremove
Code: Select all
cd /usr/src
wget http://www.zoneminder.com/downloads/ZoneMinder-1.25.0.tar.gz
tar -xzvf ZoneMinder-1.25.0.tar.gz
mv ZoneMinder-1.25.0 zm
Acknowledgment to the user paketecuento from plugcomputer.org, he gave me the clue!
Compile ZM
Code: Select all
export CFLAGS="-march=armv5te -O2 -mtune=arm926ej-s -Fno-strict-aliasing -msoft-float -D__GCC_FLOAT_NOT_NEEDED" && \
export CXXFLAGS="${CFLAGS}" && \
export CPPFLAGS="${CFLAGS}"
./configure --with-webdir=/usr/share/zoneminder --with-cgidir=/usr/lib/cgi-bin --prefix=/usr/bin \
ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser \
ZM_DB_PASS=zpass ZM_SSL_LIB=openssl --enable-debug=no \
--with-webgroup=www-data --with-webuser=www-data --enable-mmap=yes --with-libarch=lib --with-ffmpeg=/usr/local/bin CPPFLAGS="-D__STDC_CONSTANT_MACROS ${CPPFLAGS}"
make
automake
aclocal
mysqladmin -u root -p -f drop zm
mysql -u root -p < db/zm_create.sql
mysql -u root -p
grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by 'zmpass';
quit
mysqladmin -p reload
make install
make clean
Code: Select all
cd /usr/src && wget http://www.charliemouse.com:8080/code/cambozola/cambozola-latest.tar.gz
tar -xzvf cambozola-latest.tar.gz
cp cambozola-0.92/dist/cambozola.jar /var/www/zm
Code: Select all
vi /etc/init.d/zoneminder
Code: Select all
#!/bin/sh
prog=ZoneMinder
ZM_PATH_BIN="/usr/bin/bin"
command="$ZM_PATH_BIN/zmpkg.pl"
start() {
echo -n "Starting $prog: "
$command start
RETVAL=$?
[ $RETVAL = 0 ] && echo success
[ $RETVAL != 0 ] && echo failure
return $RETVAL
}
stop() {
echo -n "Stopping $prog: "
$command stop
RETVAL=$?
[ $RETVAL = 0 ] && echo success
[ $RETVAL != 0 ] && echo failure
}
status() {
result=`$command status`
if [ "$result" = "running" ]; then
echo "ZoneMinder is running"
RETVAL=0
else
echo "ZoneMinder is stopped"
RETVAL=1
fi
}
case "$1" in
'start')
start
;;
'stop')
stop
;;
'restart')
stop
start
;;
'status')
status
;;
*)
echo "Usage: $0 { start | stop | restart | status }"
RETVAL=1
;;
esac
exit $RETVAL
Code: Select all
chmod 755 /etc/init.d/zoneminder
service zoneminder status
Code: Select all
DocumentRoot /var/www
by
DocumentRoot /usr/share/zoneminder
and
<Directory /var/www/>
by
<Directory /usr/share/zoneminder/>
To remove errors "zmwatch[2429].ERR [Shared data size conflict in shared_data for monitor Monitor-1, expected 328, got 316]", edit /usr/local/share/perl/5.12.4/ZoneMinder/Memory.pm and replace:
Code: Select all
$arch = int(3.2*length(~0));
with
$arch = 32;
apt-get purge autoconf automake make gcc g++-4.6 libstdc++6-4.6-dev
Now you could setup your Zoneminder surveillance system in this small beast!
Hope it helps,
PacoLM