Ubuntu 8.04.1
From ZoneMinder
Under construction
Ubuntu Server Edition
The directions for Installing from a .deb apply to installations on Ubuntu. For less experienced Linux users, the steps below include additional details that may be helpful. The below directions are just one possible way to setup a machine from scratch to be dedicated to hosting ZoneMinder. This is not necessarily the only possible setup, nor is it necessarily the best for your needs. It is likely a good starting point for new users. More experienced users may prefer to explore the documentation and forums to architect their own system using the ZoneMinder solution.
- If not already installed, install Ubuntu Server Edition:
- Visit Download Ubuntu and select the option for the Server Edition release, and leave the default "type of computer" selection to "Standard personal computer (x86...". There is not necessarily anything wrong with the x64 bit addition, but covering the various caveats of going down that road is outside of the scope of this article.
- After selecting a download location, you will be provided a link to an *.iso file. Save this file, and then use it to burn a Ubuntu Server installation CD. See BurningIsoHowTo.
- WARNING: The following procedures will erase all of the data on the hard drive that you choose to install Ubuntu to. If you do not understand the implications of this, do not proceed.
- Place your newly created CD in the machine that you have selected to become your ZoneMinder server. Power on or reboot the machine.
- Assuming your CD-ROM drive has boot priority, you should eventually be prompted with a screen to install Ubuntu Server. Ubuntu Help is available if you encounter difficulties and HowToForge provides a guided walkthrough.
- On the Partition disks screen, if you have only one hard drive installed, the simplest option is Guided - use entire disk, but be warned that this will delete all prexisting data on that harddrive.
- During the installation you will be asked what server components to install on the Software selection page. The list will include options for OpenSSH and LAMP.
- Select LAMP. LAMP is a combination of software that support the website interface that is the method used for monitoring your surveillance system through ZoneMinder.
- OpenSSH can optionally be selected if you would like the option of administrating your new server from a different machine.
- Once installation is complete you should be prompted to remove the CD and reboot the system.
- Once the system has rebooted, login with the user id and password you provided during installation. Note that Num Lock may be off by default which would cause attempts to use the number pad to enter a password to be unsuccessful. Throughout the rest of this guide, you may be prompted for a password when using a command that begins with sudo, which will be the same password you setup during installation.
- It is recommended that you configure your ZoneMinder server to have a static IP, so that you may easily connect when accessing it's web interface. This requires editing a configuration file which can be accomplished with the command:
- sudo pico /etc/network/interfaces
- Change iface eth0 inet dhcp to iface eth0 inet static
- Add the following lines with the exception that address should be the desired static IP address, and gateway is often the IP address of your router that provides your internet access:
- iface eth0 inet static
- address 192.168.1.50
- netmask 255.255.255.0
- network 192.168.1.0
- broadcast 192.168.1.255
- gateway 192.168.1.1
- Once you have finished editing the file, hit Ctrl+W to save the file, pressing Enter to overwrite the existing file, and then press Ctrl+X to exit the editor.
- Install ZoneMinder using the command:
- sudo apt-get install zoneminder
- You may receive a series of prompts advising you the amount of data that will be downloaded and asking you to confirm this action.
- After you installation completes, run this command which will expose a web interface for ZoneMinder:
- sudo ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf
- Restart the apche web server so that it loads this new configuration:
- sudo apache2ctl restart
- At this point you can test the web server by opening up a browser on another machine and entering the address:
- http://192.168.1.50/ except you may enter a different address based on the address setting in step 5 above.
- You should see It works! indicating the apache web server is operational.
- Now add zm to the address(must be lower case) and browse to http://192.168.1.50/zm to verify that you are presented with the ZoneMinder console.
- If you have difficulty with these tests, try rebooting the server with sudo shutdown -r now then repeating the tests. Also ensure you have connectivity with ping google.com -c3 or from a different machine try to ping the server. On Windows use Start->Run, type cmd to open a command prompt, then type ping 192.168.1.50
- Run the following commands which are documented in the Installing from a .deb:
- TODO: Document the purpose of these three commands which may assist others who may encounter problems if they were to miss these steps
- sudo chmod 4755 /usr/bin/zmfix
- zmfix -a
- sudo chown www-data.www-data /usr/share/zoneminder/temp
- Increase the amount of shared memory available. Note that Installing from a .deb suggests a value of 134217728 (134 mb), but there are cases where users found that color cameras or monitoring at higher resolutions required a higher setting such as 268435456.
- sudo pico /etc/sysctl.conf
- Add two lines to the file:
- kernel.shmall = 268435456
- kernel.shmmax = 268435456
- Save your changes and exit with Ctrl+W, Enter, then Ctrl+X.
This walkthrough is incomplete. Until this is completed, note that all the remaining steps are documented in one form or another in the Main Documentation or on the forums.