ispCP ω (OMEGA) HowTo Install for FreeBSD 8.0-RELEASE-p2
================================================================================
For other Linux/BSD distributions please check the other INSTALL files.
================================================================================

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

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

================================================================================
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 FreeBSD required packages are listed in docs/FreeBSD/freebsd-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 Nameserver rndc.key has been setup.
If not create a rndc.key file:
	# rndc-confgen -a

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. Install Ports and Portmaster:
	# portsnap fetch extract
	# cd /usr/ports/ports-mgmt/portmaster
	# make install clean
	# rehash

3. Configure Apache to use worker instead of prefork:
	# vi /usr/ports/www/apache22/Makefile
   And change WITH_MPM to worker:
	# WITH_MPM?=      worker # or prefork, event, itk

4. Compile required Packages with Portmaster
	# portmaster `cat ./docs/FreeBSD/freebsd-packages`

	apache 2.2.14_5 Options

	x THREADS
 	x IPV6
 	x AUTH_BASIC
 	x AUTHN_FILE
 	x AUTHN_DEFAULT
 	x AUTHZ_HOST
 	x AUTHZ_GROUPFILE
 	x AUTHZ_OWNER
 	x AUTHZ_DEFAULT
 	x ACTIONS
 	x ALIAS
 	x AUTOINDEX
 	x DEFLATE
 	x DIR
 	x ENV
 	x EXPIRES
 	x INFO
 	x LOG_CONFIG
 	x LOGIO
 	x MIME
 	x MIME_MAGIC
 	x NEGOTIATION
 	x REWRITE
 	x SETENVIF
 	x STATUS
 	x VHOST_ALIAS
	x PROXY
	x PROXY_CONNECT
	x PATCH_PROXY_CONNECT
	x PROXY_HTTP
 	x SSL
 	x SUEXEC
	x CGID

	proftpd 1.3.3 Options

	x CTRLS
	x IFSESSION
	x IPV6
	x NLS
	x OPENSSL
	x QUOTA
	x RATIO
	x README
	x REWRITE
	x WRAP
	x MYSQL

	postfix 2.7.0,1 Options

	x PCRE
	x SASL2
	x TLS
	x MYSQL
	x CDB
	x VDA

	p5-Net-DNS 0.66 Options

	x IPV6

	courier-imap 4.7.0,2 Options

	x IPV6
	x AUTH_USERDB

	cyrus-sasl 2.1.23 Options

	x BDB
	x MYSQL
	x AUTHDAEMOND
	x LOGIN
	x PLAIN
	x CRAM
	x DIGEST

	x IPV6
	x AUTH_MYQL
	x AUTH_USERDB

	courier-authlib 0.63.0 Options

	x AUTH_USERDB

	perl 5.10.1  Options

	x PERL_64BITINT
	x THREADS
	x USE_PERL

	PHP5 5.2.12 Options

	x CLI
	x CGI
	x SUHOSIN
	x IPV6
	x FASTCGI
	x PATHINFO

	PHP5-Extensions 1.3 Options

	x BZ2
	x CTYPE
	x CURL
	x DBA
	x DOM
	x FILEINFO
	x FILTER
	x FTP
	x GD
	x HASH
	x ICONV
	x IMAP
	x JSON
	x MBSTRING
	x MCRYPT
	x MHASH
	x MYSQL
	x MYSQLI
	x PCRE
	x PDO
	x PDO_SQLITE
	x POSIX
	x SESSION
	x SHMOP
	x SIMPLEXML
	x SOAP
	x SOCKET
	x SPL
	x SQLITE
	x TOKENIZER
	x XML
	x XMLREADER
	x XMLRPC
	x XMLWRITER
	x ZIP
	x ZLIB

	PHP5-MBString 5.2.12 Options

	x REGEX

	PHP5-DBA 5.12 Options

	x CDB
	x INIFILE
	x FLATFILE

	PHP5-SQL-lite 5.2.12 Options

	x UTF8

	PHP5-PCRE 5.2.12 Options

	x BUNDLED_PCRE

	awstats 6.95,1 Options

	x IPV6

	curl 7.19.7_1 Options

	x IPV6
	x OPENSSL
	x PROXY

	ca_root_nss 3.12.4 Options

	x ETCSYMLINK

	php5-gd 5.2.12 Options

	x T1LIB
	x TRUETYPE

	libxslt 1.1.26 Options

	x CRYPTO

	rkhunter 1.3.6 Options

	x LSOF

	wget 1.12 Options

	x IPV6
	x NLS
	x OPENSSL

	p5-IO-Socket-SSL 1.31 Options

	x IDN

	amavisd-new 2.6.4_5,1 Options

	x BDB
	x MILTER
	x SPAMASSASSIN
	x FILE
	x UNRAR
	x ARJ
	x LHA
	x ARC
	x CAB
	x RPM
	x ZOO
	x LZOP
	x FREEZE
	x P7ZIP
	x MSWORD

	p5-Mail-SpamAssassin 3.3.0_3 Options

	x AS_ROOT
	x SPAMC
	x DKIM
	x SSL
	x GNUPG
	x RAZOR

5.  Configure the system.
	 # rehash

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

7.  Configure the MySQL Server and set the MySQL password, if not set:
	 # /usr/local/bin/mysql_install_db
	 # chown -R mysql /var/db/mysql/
	 # /usr/local/etc/rc.d/mysql-server onestart
	 # mysqladmin -u root password 'YOUR_PASSWORD'

8.  Build the System by using make:
	 # cd /usr/local/src/ispcp-omega-1.0.7
	 # make -f BSDmakefile install

9.  Copy all the directories into your system.
    If you have not yet, now is a good time to make backups of your server.
    The following steps do fundamental changes to your system configuration.
	 # cp -R /tmp/ispcp/* /

10. Maybe empty the folder /usr/share/skel - otherwise you'll have all the files/folders
    in the home folders:
	 # cp -a /usr/share/skel /usr/share/skel.bkp
	 # rm -r /usr/share/skel && mkdir /usr/share/skel

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

12. Start the engine setup. (Please choose FastCGI and NOT fcgid)
	 # perl ./ispcp-setup

13. 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.

14. Restore /usr/share/skel:
	 # rm -r /usr/share/skel && mv /usr/share/skel.bkp /usr/share/skel

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

16. Log into ispCP and change:
	"Settings"->"Server Ports" "POSTGREY Port" to 10023.

================================================================================
5) ispCP ω in a Jail
--------------------
	We test ispCP still in a Jail! If you want to use it anyway be sure you have
	enable SystemV IPC in the /etc/rc.conf on the Hostsystem.
	 jail_sysvipc_allow="YES"
	If you are unsure check with:
	 sysctl security.jail.sysvipc_allowed

================================================================================
6) 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 /root
	 # 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:
	see: ./docs/FreeBSD/freebsd-packages
	 # portmaster `cat ./docs/FreeBSD/freebsd-packages`

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

5.  Stop the ispcp_deamon and build the System by using make:
	 # /usr/local/etc/rc.d/ispcp_daemon stop
	 # make -f BSDmakefile install

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

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

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

8.	Backup the current ispcp.conf (you may make backups):
	 # mv -v /usr/local/etc/ispcp/ispcp.conf /usr/local/etc/ispcp/ispcp.old.conf

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

10. Now it's time to update your installation. Change into the engine directory:
	 # cd /usr/local/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/

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

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

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

3. Clean up your system

================================================================================
8) 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!
