ispCP ω (OMEGA) HowTo Install for OpenBSD
================================================================================
For other Linux distributions please check the other INSTALL files.
================================================================================

Table of Content
================
1) Version Info
2) Requirements
3) Introduction
4) Installation
5) Update
6) Uninstall
7) Credits

================================================================================
1) Version Info
---------------
ispCP ω Version: 1.0.7
INSTALL Script:		2.6
Maintainer:
Homepage:			http://www.isp-contol.net
Distros:			OpenBSD

================================================================================
2) Requirements
---------------
There is no must have for a system using ispCP ω. This is only a recommendation:

Pentium III or K6-4 with 500 MHz
512 MB RAM
100 MB disk space (only for install of ispCP ω)
Debian (or even any other *NIX-Distribution)

All OpenBSD required packages are listed in
./docs/OpenBSD/openbsd-packages

================================================================================
3) Introduction
---------------
ISPCP ω delivers a complete hosting automation appliance by offering significant
security, total-cost-of-ownership, and performance advantages over competing
commercial solutions.

With ispCP ω you can configure your server and applications, create user with
domains with a few point-and-click operations that take less than a minute.
There is no limit to the number of resellers, users and domains that can be
created. The core of ispCP ω are 3 easy-to-use, web-based control panels. ispCP
provides graphic user interfaces for the administrators, resellers and users.

================================================================================
4) Installation
---------------
Make sure you are logged in as root and MySQL is running.

1. Untar or unzip the distribution files to a secure directory:
	# cd /usr/local/src
	# tar xjvf ispcp-omega-1.0.7.tar.bz2

2. Change to the newly created directory:
	# cd ./ispcp-omega-1.0.7

3. Install the required modules
	install all packages from packagelist 'openbsd-packages'

	# wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.1.tar.bz2
	# bunzip2 proftpd-1.3.1.tar.bz2
	# tar -xvf proftpd-1.3.1.tar
	# cd proftpd-1.3.0a
	# ./configure --sysconfdir=/etc \
		--enable-ctrls \
		--enable-ipv6 \
		--enable-sendfile \
		--enable-facl \
		--with-modules=mod_sql:mod_sql_mysql:mod_tls:mod_rewrite:mod_ratio:mod_readme:mod_ifsession:mod_ctrls_admin:mod_quotatab:mod_quotatab_file:mod_quotatab_sql \
		--with-includes=/usr/local/include/mysql \
		--with-libraries=/usr/local/lib \
		--localstatedir=/var/run
	# make
	# make install

	install required perl modules
	# perl -MCPAN -e shell
	cpan> install Crypt::PasswdMD5
	cpan> install Term::ReadPassword

   if package p5-MIME-tools can't be installed, install it with cpan
	cpan> install MIME::Tools

4. (optional) Check the ispcp.conf and adapt it to your requirements.

5. Build the System by using make:
	# make -f Makefile.inc install

6. Add root user to root group
	# groupadd -o -g 0 root
	# ln -s /usr/local/libexec/makedatprog /usr/local/bin/makedatprog

6. Copy all the directories into your system (you may make backups)
	# cp -Rv /tmp/ispcp/* /

7. Now it's time to set up the frontend. Change into the engine directory:
	# cd /usr/local/www/apache22/ispcp/engine/setup

7a. Set the MySQL password, if not set:
	# /usr/local/share/mysql/mysql.server start
	# mysqladmin -u root password YOUR_PASSWORD

8. Start the engine setup:
	# perl ispcp-setup

9. Install ispCP ω step-by-step

	If you get no error, all went good; if you get one, look at
	http://isp-control.net to solve the problem.

10. Edit /etc/rc.local and add the following lines:
	# mkdir -p /var/run/courier-imap
	# /usr/local/libexec/authlib/authdaemond start
	# /usr/local/libexec/imapd.rc start
	# /usr/local/libexec/imapd-ssl.rc start
	# /usr/local/libexec/pop3d.rc start
	# /usr/local/libexec/pop3d-ssl.rc start
	# /usr/local/share/mysql/mysql.server start
	# mkdir -p /var/run/proftpd
	# /etc/proftpd.rc start
	# /etc/ispcp_daemon.rc start

11. Edit /etc/rc.conf.local and add the following lines:
	# ntpd_flags=             # enabled during install
	# httpd_flags=-u         # enabled / -DSSL
	# inetd=NO
	# syslogd_flags=          # "-a /var/spool/postfix/dev/log"
	# sendmail_flags="-bd -q30m"
	# named_flags=

12. Edit /var/www/conf/httpd.conf and insert
	# AddType application/x-httpd-php .php
	# Include /var/www/conf/ispcp.conf to the last line

13. Run following commands to activate php module extensions
	# /usr/local/sbin/phpxs -s
	# /usr/local/sbin/phpxs -a curl
	# /usr/local/sbin/phpxs -a dbx
	# /usr/local/sbin/phpxs -a domxml
	# /usr/local/sbin/phpxs -a filepro
	# /usr/local/sbin/phpxs -a gmp
	# /usr/local/sbin/phpxs -a imap
	# /usr/local/sbin/phpxs -a mcrypt
	# /usr/local/sbin/phpxs -a mhash
	# /usr/local/sbin/phpxs -a mysql
	# /usr/local/sbin/phpxs -a pdf
	# /usr/local/sbin/phpxs -a shmop
	# /usr/local/sbin/phpxs -a xmlrpc
	# /usr/local/sbin/phpxs -a xslt

14. Run following command to enable postfix
	# /usr/local/sbin/postfix-enable

15. Restart Apache
	# apachectl restart

16. (Optional) Create imap and pop3 ssl certificates
	# mkimapdcert
	# mkpop3dcert

17. Clean the temporary folders:
	# rm -fR /tmp/ispcp


================================================================================
5) Update
---------
NOTE: ispCP ω can only be updated from post 1.0.0. If you have a
version prior 1.0.0 (final release) installed, update to ispCP ω 1.0.0 first.

Make sure you are logged in as root and MySQL is running.

1. Untar or unzip the distribution files to a secure directory:
	# cd /usr/local/src
	# tar xjvf ispcp-omega-1.0.7.tar.bz2

2. Change to the newly created directory:
	# cd ./ispcp-omega-1.0.7

3. Install the required modules
	install all packages from packagelist 'openbsd-packages'

	# wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.1.tar.bz2
	# bunzip2 proftpd-1.3.1.tar.bz2
	# tar -xvf proftpd-1.3.1.tar
	# cd proftpd-1.3.0a
	# ./configure --sysconfdir=/etc \
		--enable-ctrls \
		--enable-ipv6 \
		--enable-sendfile \
		--enable-facl \
		--with-modules=mod_sql:mod_sql_mysql:mod_tls:mod_rewrite:mod_ratio:mod_readme:mod_ifsession:mod_ctrls_admin:mod_quotatab:mod_quotatab_file:mod_quotatab_sql \
		--with-includes=/usr/local/include/mysql \
		--with-libraries=/usr/local/lib \
		--localstatedir=/var/run
	# make
	# make install

	install required perl modules
	# perl -MCPAN -e shell
	cpan> install Crypt::PasswdMD5
	cpan> install Term::ReadPassword

   if package p5-MIME-tools can't be installed, install it with cpan
	cpan> install MIME::Tools

4. (optional) Check the ispcp.conf and adapt it to your requirements.

5. Stop the ispcp_deamon and build the System by using make:
	# /etc/init.d/ispcp_daemon stop
	# make -f Makefile.inc install

6. Backup files
	# cp -v /usr/local/www/apache22/ispcp/engine/ispcp-db-keys.pl /tmp/ispcp/usr/local/www/apache22/ispcp/engine/
	# cp -v /usr/local/www/apache22/ispcp/engine/messenger/ispcp-db-keys.pl /tmp/ispcp/usr/local/www/apache22/ispcp/engine/messenger/
	# cp -v /usr/local/www/apache22/ispcp/gui/include/ispcp-db-keys.php /tmp/ispcp/usr/local/www/apache22/ispcp/gui/include/
	# cp -v /var/www/ispcp/gui/themes/user_logos/* /tmp/ispcp/var/www/ispcp/gui/themes/user_logos/
	# cp -v /var/www/ispcp/gui/tools/webmail/data/* /tmp/ispcp/var/www/ispcp/gui/tools/webmail/data/

	For ispCP Omega prior version 1.0.7 RC2
	# cp -v /var/www/ispcp/gui/tools/pma/config.inc.php /tmp/ispcp/etc/ispcp/pma/working/

7. Delete old files to avoid security risks:
	# rm -Rf /var/www/ispcp/engine/
	# rm -Rf /var/www/ispcp/gui/{admin,client,include,orderpanel,themes,reseller}/
	# rm -Rf /var/www/ispcp/gui/tools/{pma/,filemanager/,webmail/,index.php}
	# rm -Rf /var/www/ispcp/gui/{*.php,favicon.ico,robots.txt}

8. Copy /usr and /var directories into your system (you may make backups)
	# cp -Rv /tmp/ispcp/usr/* /usr/
	# cp -Rv /tmp/ispcp/var/* /var/

9. Backup ispcp.conf and copy the /etc directory into your system (you may make backups):
	# mv -v /etc/ispcp/ispcp.conf /etc/ispcp/ispcp.old.conf
	# cp -Rv /tmp/ispcp/etc/* /etc/

10. Now it's time to update your installation. Change into the engine directory:
	# cd /var/www/ispcp/engine/setup

11. Start the engine update:
	# perl ispcp-update

12. Update ispCP ω step-by-step

	If you get no error, all went good; if you get one, look at
	http://isp-control.net to solve the problem.

13. Clean the temporary folders:
	# rm -fR /tmp/ispcp/

================================================================================
6) Uninstall
------------
Make sure you are logged in as root and MySQL is running.

1. Change into the engine directory:
	# cd /var/www/ispcp/engine/setup

2. Start the uninstall script:
	# perl ispcp-uninstall

3. Clean up your system

================================================================================
7) Credits
----------

ispCP ω is a project of ispCP | isp Control Panel.
ispCP, ispCP ω, isp Control Panel, the ispCP logo and the ω Logo are trademarks
of the ispCP | isp Control Panel Project Team.

Please visit our site under http://isp-control.net for further information on
ispCP ω, ispCP and other themes.

We hope you enjoy using ispCP ω. If you like it, help us, to make it better. We
would be glad on any help provided!
