Thanks Jules, <br><br>The target host is running 64-bit but it's 'only' an AMD NEO dual core chip so burdening it with a VM too is something I hoped to avoid. Personally, I'd use CentOS, but in my new role I have an IT Director above me and he's welded to Ubuntu!<br>
<br>All the best.<br><br><br><br><div class="gmail_quote">On Wed, Feb 9, 2011 at 2:25 PM, Jules <span dir="ltr"><<a href="mailto:Jules@zend.to">Jules@zend.to</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
This is why I distribute it as a VM, so you don't have to do all
this stuff by hand (it's quite a long list of instructions). But
from my notes on building the VMs, here are what I have to say on
the subject. For starters, do this on a 64-bit build of Ubuntu, not
32-bit, or you will be limited to 2 Gbyte uploads due to limitations
in PHP. You still have to rebuild the Apache PHP library with some
code edits to get past the 2 Gbyte upload limit, but at least in
64-bit it can be done. I will leave out all the stuff to do with
https, as you can add that later yourself (and it's on the website
Documentation page).<br>
<br>
Here we go.....<br>
<br>
Install Ubuntu 10 server 64-bit<br>
Partition manually.<br>
Part 1 = primary 2.0 GB swap at beginning of disk<br>
Part 2 = primary max / ext4 bootable<br>
Install security updates automatically.<br>
Software selection: Basic, LAMP, OpenSSH.<br>
Install GRUB in master boot record.<br>
<br>
Remove CD/DVD and reboot.<br>
<br>
SSH in remotely, stop using console.<br>
<br>
sudo su -<br>
<br>
This chunk rebuilds the Apache PHP5 library so that uploads can be
more than 2 Gbytes.<br>
<br>
mkdir php-source<br>
cd php-source<br>
apt-get -y install debhelper bison chrpath freetds-dev
libcurl4-openssl-dev libedit-dev libgd2-xpm-dev libgmp3-dev
libmhash-dev libpam0g-dev libpspell-dev librecode-dev libsasl2-dev
libsnmp-dev libsqlite0-dev libt1-dev libtidy-dev re2c unixodbc-dev<br>
apt-get -y install apache2-prefork-dev autoconf automake flex
hardening-wrapper libapr1-dev libbz2-dev libdb-dev libenchant-dev
libgcrypt11-dev libglib2.0-dev libicu-dev libmysqlclient-dev
libpcre3-dev libpq-dev libsqlite3-dev libxmltok1-dev libxml2-dev
libxslt1-dev quilt<br>
apt-get -y install clamav clamav-daemon<br>
apt-get -y install php5 php5-cli php5-sqlite php5-ldap php5-apc<br>
apt-get -y install rrdtool<br>
apt-get -y source php5-cgi<br>
cd php5*<br>
perl -i -pe 's/int zend_atoi/long zend_atoi/'
Zend/zend_operators.[ch];<br>
perl -i -pe 's/\n/@@@@@@/g' Zend/zend_operators.c;perl -i -pe
's/(long zend_atoi.*?)int retval/$1long retval/m'
Zend/zend_operators.c;<br>
perl -i -pe 's/@@@@@@/\n/g' Zend/zend_operators.c;perl -i -pe
's/atoi\(content_length\)/atol(content_length)/' `find sapi -name
'*.c'`perl -i -pe 's/\(uint\)( SG\(request_info\))/$1/' `find sapi
-name '*.c'`;<br>
perl -i -pe 's/uint post_data_length, raw/uint
IGNORE_post_data_length, IGNORE_raw/' main/SAPI.h;perl -i -pe 's/}
sapi_request_info/\tlong post_data_length, raw_post_data_length;\n}
sapi_request_info/' main/SAPI.h;<br>
perl -i -pe 's/int read_post_bytes/long read_post_bytes/'
main/SAPI.h;<br>
perl -i -pe 's/int boundary_len=0, total_bytes=0/long total_bytes=0;
int boundary_len=0/' main/rfc1867.c;<br>
# Omit this for the 32-bit build<br>
dpkg-buildpackage -rfakeroot -uc -b -j2<br>
cd debian/libapache2-mod-php5/usr/lib/apache2/modules<br>
mv /usr/lib/apache2/modules/libphp5.so
/usr/lib/apache2/modules/libphp5.so-UBUNTU<br>
cp libphp5.so /usr/lib/apache2/modules/<br>
# End Omit this for the 32-bit build<br>
<br>
Bit of cleaning up.<br>
cd<br>
apt-get remove mysql-server<br>
rm -rf ~/php-source<br>
<br>
Setup PHP for ZendTo<br>
cd /etc/php5/apache2<br>
Edit php.ini<br>
allow_call_time_pass_reference = On<br>
max_execution_time = 7200<br>
max_input_time = 7200<br>
memory_limit = 300M<br>
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED<br>
display_errors = On<br>
post_max_size = 50000M<br>
upload_tmp_dir = /var/zendto/incoming<br>
upload_max_filesize = 50G<br>
max_file_uploads = 200<br>
<br>
Edit conf.d/apc.ini<br>
apc.rfc1867 = on<br>
apc.max_file_size = 50G<br>
<br>
Setup the ZendTo website.<br>
cd /etc/apache2/sites-enabled<br>
rm 000-default<br>
cat <<EOF > 000-zendto<br>
<VirtualHost *:80><br>
ServerAdmin webmaster@localhost<br>
<br>
HostnameLookups On<br>
<br>
DocumentRoot /opt/zendto/www<br>
<Directory /><br>
Options FollowSymLinks<br>
AllowOverride None<br>
</Directory><br>
<Directory /opt/zendto/www/><br>
Options Indexes FollowSymLinks MultiViews<br>
AllowOverride None<br>
Order allow,deny<br>
allow from all<br>
</Directory><br>
<br>
LogLevel notice<br>
ErrorLog /var/log/apache2/error.log<br>
CustomLog /var/log/apache2/access.log combined<br>
</VirtualHost><br>
EOF<br>
<br>
Set all the permissions required and make sure that AppArmor doesn't
get in the way of the virus scanning.<br>
usermod -a -G www-data clamav<br>
<br>
Edit /etc/apparmor.d/usr.sbin.clamd<br>
- Add " /var/zendto/** r," just before the last line<br>
<br>
cd /var<br>
mkdir zendto zendto/dropoffs zendto/incoming zendto/rrd<br>
touch zendto/zendto.log<br>
chown www-data zendto/*<br>
chgrp www-data zendto zendto/*<br>
chmod g+w zendto<br>
<br>
Housekeeping jobs.<br>
export EDITOR=vi<br>
crontab -e<br>
Add these 3 lines at the end:<br>
5 0 * * * /usr/bin/php /opt/zendto/sbin/cleanup.php
/opt/zendto/config/preferences.php<br>
2 10 * * * /usr/bin/php /opt/zendto/sbin/rrdInit.php
/opt/zendto/config/preferences.php<br>
2 12 * * * /usr/bin/php /opt/zendto/sbin/rrdUpdate.php
/opt/zendto/config/preferences.php<br>
<br>
Unpack all the source under /opt/ZendTo-3.63.<br>
Build all the source code owned by root.root under /opt/zendto,<br>
making /opt/ZendTo-3.63 the real dir with /opt/zendto a symlink to
it.<br>
<br>
Basically, the web server must be able to write into the directories
cache and templates_c (ignore the MyZendTo stuff for now, that's a
slightly different project that ships with ZendTo). And the web
server must be able to read everything else.<br>
cd /opt/zendto<br>
chown -R www-data cache *templates_c<br>
chgrp -R www-data cache *templates_c<br>
chmod -R ug+rwX cache *templates_c<br>
chmod -R o+rX *<br>
<br>
service apache2 restart<br>
<br>
Load the home page of the new website in a web browser.<br>
Click on the "About" button.<br>
That will create the database.<br>
<br>
Login and "sudo su -" to get root access.<br>
<br>
cd /opt/zendto/sbin<br>
php rrdInit.php /opt/zendto/config/preferences.php<br>
Ignore any "PHP Notice" output from that.<br>
<br>
Then start setting up the authentication in
/opt/zendto/config/preferences.php. If you are using AD or LDAP then
play with "ldapsearch" until you can get it to read users'
information, and then you will have the right strings to put into
preferences.php.<br>
<br>
If you are going to use the "Local" authentication to start with,
then look in /opt/zendto/bin for all the commands required to add
and edit the user table. It *never* stores plain-text passwords,
don't worry!<br>
<br>
Customise the user interface with /opt/zendto/config/zendto.conf. If
you want to make bigger changes, then it's all templated in
/opt/zendto/templates.<br>
<br>
Hopefully that will get you started.<br>
Do you see why I distribute it as a pre-built VM now? :-)<br>
<br>
Jules.<div><div></div><div class="h5"><br>
<br>
On 09/02/2011 13:09, Nigel Kendrick wrote:
</div></div><blockquote type="cite"><div><div></div><div class="h5">Hi Jules and everybody else,<br>
<br>
I'm looking to install ZendTo on a Ubuntu server so I have to
start with the tar version. I've unpacked it and now deeply
missing the comfort of an install.sh a la MailScanner!<br>
<br>
I've checked the docs on site and as supplied in the tar file but
can't see where to dive in. Any pointers appreciated.<br>
<br>
Thanks<br>
<br>
</div></div><pre><fieldset></fieldset>
_______________________________________________
ZendTo mailing list
<a href="mailto:ZendTo@zend.to" target="_blank">ZendTo@zend.to</a>
<a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto" target="_blank">http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto</a></pre>
</blockquote>
<br>
<pre cols="72">Jules
--
Julian Field MEng CITP CEng
<a href="http://www.Zend.To" target="_blank">www.Zend.To</a>
Follow me at <a href="http://twitter.com/JulesFM" target="_blank">twitter.com/JulesFM</a>
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
'All programs have a desire to be useful' - Tron, 1982
</pre>
</div>
<br>_______________________________________________<br>
ZendTo mailing list<br>
<a href="mailto:ZendTo@zend.to">ZendTo@zend.to</a><br>
<a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto" target="_blank">http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto</a><br></blockquote></div><br>