This is my first attempt on having DIY CCTV at home. I have few items in hand already:
*1 old Foscam IP camera (estimated price RM250 at purchase)
*1 new Foscam IP camera (estimated price RM300 at purchase)
*1 old Pentium 3 box which I already put Ubuntu on it (just bought from Mudah.my at RM150)
*ADSL Router for home networking & port forwarding (TM provide with streamyx)
*Dyndns.org premium account (RM30/year)
Did some googlings and Zoneminder looks good as the monitoring system. Ready for actions.
For those who are wondering, Foscam IP camera comes with built-in monitoring system. I mean for basic features such as live streaming, motion detection and recording – the camera alone will just enough. Just configure the router for port forwarding and there you have your CCTV ready. View it on PC or hand phone, pretty well.
BUT, I need more than that. I need bigger storage, replay, multi camera views, etc. Through some other articles, Zoneminder is the best choice for this.
So let’s get going.
1. Install Ubuntu on the old machine
I still have my old Ubuntu installation thumb drive with me which previously I worked on installing Ubuntu to HP Netbook. Now it’s time for recycling the same installation files.
Now my old PC is a DELL Optiflex. I changed the boot order so that it will looks for USB thumb drive first.
How to have thumb drive installer? Just download the image file from Ubuntu website and use LiLi to create bootable thumb drive. Details here.
2. Install Zoneminder
3. Add Camera
To get straight line distance:
To get driving distance:
By default the root has no password and may not be used to login.
In order to enable it:
sudo passwd root
It will ask for the administrative password.
Then will ask for new root password.
To disable back:
sudo passwd -l root
After installing Ubuntu on my old HP netbook, I found that the wi-fi interface is not auto configured.
Later I knew that it was due to the outdated driver.
Run this line:
sudo apt-get update; sudo apt-get install bcmwl-kernel-source
iface eth0 inet static
usermod -g www-data jerry
To do it in PHP:
$f = file_get_contents($url);
sudo useradd -d /home/testuser -m testuser
sudo passwd testuser
Most of the example I found showing how to add new domains. But I just want to add new websites.
I already setup LAMP on 10.10.10.5, and now http://10.10.10.5 is reachable.
How do I create http://10.10.10.5/intra1 and http://10.10.10.5/intra2 ??
This is based on try and error, with my not-so-much exposure to Linux.
1. Login to webmin.
2. Click Servers > Apache Webserver
3. On Existing Virtual Hosts, click Virtual Server icon
4. Click on Alis & Redirects
5. From: /intra1 To: /home/user1/htdocs (you must add user with home and then create htdocs or whatever folder in the home)
6. Click save
7. Back to Servers > Apache Webserver > Existing Virtual Hosts > Virtual Server
8. Check Create Per-Directory, Files or Location Options
7. Type: Directory Regexp: Exact match Path: /home/user1/htdocs, click Save
8. Back to Servers > Apache Webserver > Existing Virtual Hosts > Virtual Server
9. Click Edit Directive
Add these lines to /etc/vsftpd/vsftpd.conf
service vsftpd restart