|
|
(138 intermediate revisions by 31 users not shown) |
Line 1: |
Line 1: |
| The following is a Step-By-Step of how to install ZoneMinder 1.23.3 with CentOS 5.1. It is a current work in progress so first will be listed the steps, and then the explanations will be added this week including a Step-By-Step for installing the base OS of CentOS for ZoneMinder. Most of the content is from users from within the [http://www.zoneminder.com/forums Forums]
| | === Installation Instructions === |
| ----
| | To install ZoneMinder on RHEL, CentOS, and compatible clones, please refer to the instructions shown on our readthedocs site. |
| The intent of this walk through is to install a very base/bare bones installation that will only run ZoneMinder. This would be for a dedicated ZoneMinder server with no GUI or any unnecessary services running. The reason for the very light-weight installation is so that the majority of system resources are available to ZoneMinder and not having to power the OS. With this installation, memory is reduced to around 140-160MB, and CPU usage is practically nonexistent.
| | [https://zoneminder.readthedocs.io/en/latest/installationguide/redhat.html Redhat - ZoneMinder Documentation] |
| ----
| |
| '''Cent OS 5.1 Initial Installation''' (Being Worked On)
| |
|
| |
|
| CentOS is very easy to install the base installation and doesn’t take too much time as long as you have some type of broadband connection. There are many ways to install CentOS, but I will only cover two because they are related.
| | ==== Archived Installation Instructions ==== |
| | | What follows is a link to old installation instructions which predate rpm installations from zmrepo or rpmfusion. They are kept solely for reference. |
| *Step One - Get CentOS
| | [[CentOS/Archived]] |
| You can download the “.iso” file(s) for CentOS from www.centos.org
| |
| Alternatively download the net-install version of CentOS which is basically just the first CD.
| |
| Here is one location to download the net-install version:<br/>
| |
| Download i386: http://mirror.chpc.utah.edu/pub/centos/5.1/isos/i386/CentOS-5.1-i386-netinstall.iso<br/>
| |
| Mirrors List: http://www.centos.org/mirrors/
| |
| | |
| *Step Two - Installation Source
| |
| Regardless of which method you use the next few steps are the same.
| |
| | |
| Begin by booting your system up with either cd/dvd.
| |
| | |
| Choose the options that best fit your environment until you reach the “Installation Method”. <br/>
| |
| Choose “HTTP” ONLY if you are using the net-install method.<br/>
| |
| [[Image:centosnetinstal-http.png]]<br/>
| |
| If you are using the net-install method then enter:<br/>
| |
| Website Name: mirror.centos.org<br/>
| |
| CentOS Directory: /centos/5.1/os/i386
| |
| *Step Three - Installation Packages
| |
| | |
| *Step Four -
| |
| *Step Five -
| |
| ----
| |
| '''Installing ZoneMinder 1.23.3'''
| |
| | |
| *Add the RPM Forge repository to CentOS. This will allow the installation of a number of services/applications later on without having to manually install them.
| |
| rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
| |
| *Download the needed files ZoneMinder 1.23.3 and the Cambozola addon
| |
| wget http://www2.zoneminder.com/downloads/ZoneMinder-1.23.3.tar.gz
| |
| wget http://www.zoneminder.com/fileadmin/downloads/cambozola.jar
| |
| *Screen is a simple program that allows you to run commands from a "Hosted" command line interface. This helps if you loose your connection to the server for any reason in that it allows you to resume (screen -r) right where you left off. Often times I will start a large update/upgrade, leave it for the day, then come back and see where it is at.
| |
| *Install Screen
| |
| yum install screen
| |
| *To start a screen session just type
| |
| screen
| |
| *If you get disconnected and need to resume your session of screen simply type
| |
| screen -r
| |
| *Now let's install all the services and programs that will be needed
| |
| yum install mysql mysql-server mysql-devel php php-gd php-mysql httpd gcc pcre-devel gd mod_ssl glib2-devel gcc-c++ ntp gnutls-devel libjpeg-devel perl-Archive-Tar perl-MIME-Lite perl-MIME-tools perl-Date-Manip perl-Time-HiRes perl-LWP-UserAgent-Determined perl-PHP-Serialization perl-Device-SerialPort perl-Archive-Zip perl-Module-Load
| |
| *Now let's update everything within the new CentOS install
| |
| yum -y update
| |
| *Now we need to make sure we use the lasted "tested" version of "ffmpeg". This is the latest version of ffmpeg that the ZoneMinder developers have tested with
| |
| svn checkout -r 11879 svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
| |
| cd ffmpeg/
| |
| ./configure
| |
| make
| |
| make install
| |
| make install-libs
| |
| *Turn everything on
| |
| chkconfig httpd on
| |
| chkconfig mysqld on
| |
| chkconfig ntpd on
| |
| service httpd start
| |
| service mysqld start
| |
| service ntpd start
| |
| *Next we need to extract the contents of the ZoneMinder "tar" file, and then jump into its directory
| |
| cd /root/
| |
| tar -zxvf ZoneMinder-1.23.3.tar.gz
| |
| cd ZoneMinder-1.23.3
| |
| *Now we are going to configure ZoneMinder with some added statements. What is listed are default CentOS directory placements.
| |
| **Note that the name of the ZoneMinder database is "zm"
| |
| *Change "zmuser" (if you want) with the user that you will use within MySQL to access the ZoneMinder database
| |
| *Change "zmpass" with the password you will be using with the "zmuser" account
| |
| ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass
| |
| make
| |
| make install
| |
| *Need to add a password for the root user of MySQL
| |
| *Create the zm database
| |
| *Create the zm database user with permissions and password
| |
| mysql
| |
| mysql> SET PASSWORD FOR root@localhost=PASSWORD('new_root_password');
| |
| >Query OK, 0 rows affected (0.00 sec)
| |
| mysql> create database zm;
| |
| >Query OK, 1 row affected (0.01 sec)
| |
| mysql> grant CREATE, INSERT, SELECT, DELETE, UPDATE on zm.* to your_zm_user@localhost;
| |
| >Query OK, 0 rows affected (0.02 sec)
| |
| mysql> SET PASSWORD FOR your_zm_user@localhost=PASSWORD('your_zm_password_from_above');
| |
| >Query OK, 0 rows affected (0.25 sec)
| |
| mysql> exit
| |
| >Bye
| |
| *Import the tables into the zm database
| |
| mysql -u root -p < db/zm_create.sql zm
| |
| *Make it so that ZoneMinder will startup automatically when the system is rebooted
| |
| cp scripts/zm /etc/init.d/
| |
| chmod +x /etc/init.d/zm
| |
| chkconfig zm on
| |
| *Add the Cambozola Java web interface
| |
| cp cambozola.jar /var/www/html/zm/
| |
| *Start ZoneMinder
| |
| service zm start
| |
| *tick the box for support for the Cambozola addon within your ZoneMinder installation: http://ip-address/zm
| |