Phillip Pearson - web + electronics notes

tech notes and web hackery from a new zealander who was vaguely useful on the web back in 2002 (see: python community server, the blogging ecosystem, the new zealand coffee review, the internet topic exchange).

2006-10-20

PeopleAggregator on CentOS (on vmware) [IN PROGRESS]

NOTE: This is just a log of what I did to get PA going on CentOS, not really an install guide as such. I'll write up a better guide for the wiki later. For the moment read this, then try not to make the same mistakes as me! :-)

After doing a vmware install demo on Ubuntu, I might as well do one for CentOS, another big Linux distribution these days.

I've created a new vmware virtual machine, otherwise identical to the Ubuntu one, but with "Other Linux" selected as the OS.

I'm installing using the Centos 4.4 Server CD.

I started with the default 8GB SCSI HDD, but deleted that and created an IDE one after the installer couldn't find it.

Accepted the default partition scheme - /dev/hda was split into /dev/hda1, a 102MB /boot partition, and /dev/hda2, an LVM volume containing a 7.5GB ext3 partition and a 512MB swap partition.

Accepted the default GRUB bootloader.

Opted to set hostname manually, to 'minic'.

Selected to keep the firewall, and enable SSH and HTTP.

Added English (New Zealand) to the language selection and made it the default.

Set timezone to Pacific/Auckland.

Set a root password.

Selected to customize package installation. Chose the 'Minimal' option right down the bottom (to ensure I have to install everything manually!)

OK, now it's all installed. Booted up, logged in as root.

service sshd start ifconfig

[now I can connect in using SSH to eth0's IP address.]

yum --enablerepo=centosplus install mysql-server php php-pear php-mysql php-gd ImageMagick subversion chkconfig --add httpd
chkconfig --add mysqld
chkconfig httpd on
chkconfig mysqld on
service httpd start
service mysqld start

[now I can browse to http://192.168.223.129/ and see a CentOS start page.]

cd /var/www/html/
svn checkout http://update.peopleaggregator.org/svn/release/pa/

[browse to http://192.168.223.129/pa/web/ , follow link to installer.]

chmod a+w /var/www/html/pa/web/config

[refresh installer, follow instructions to chmod various folders.]

chmod a+w /var/www/html/pa/log /var/www/html/pa/networks/ /var/www/html/pa/web/files/ /var/www/html/pa/web/cache/ /var/www/html/pa/web/sb-files/

[refresh config page - ok, it's ready! enter an admin and a mysql password, and click 'Set up PeopleAggregator']

Argh - the setup took ages, then stopped after "running database upgrade script ...". I seem to recall this being a symptom of a missing DOMDocument class; obviously the check for that in the install process hasn't made it through to the public distribution yet.

yum --enablerepo=centosplus install php-xsl
service httpd restart
mysql -e 'drop database peopleaggregator'

[now browsing to http://192.168.223.129/pa/web/config/ just hangs...?]

[ok, it was just slow. entered passwords and clicked 'set up peopleaggregator, and it all worked.]

mv /var/www/html/pa/web/config/local_config.php /var/www/html/pa/

[browse to http://192.168.223.129/pa/web/ and it's working!]

... more like this: [, ]

Ubuntu and Debian on Windows (and PeopleAggregator on Ubuntu)

I've been getting some support e-mails for PeopleAggregator from people running it on Ubuntu, so I thought it was about time I at least set up a vmware install of Ubuntu. There's a mirror in New Zealand, so the 400 meg CD download (for the server version) took less than an hour. The installation was really quick, I guess because I was using the minimal version. Generally it looks very much like plain Debian so far. So now, while Windows XP is my primary OS on this laptop, I have Debian running under colinux, which is what I'm using to write this blog post, and Ubuntu running under vmware. Total memory+swap usage is showing as 0.99 GB right now, which is pretty reasonable for three simultaneous operating systems :-)

I'm going to write down everything I've done to configure it here, in the process of making a "how to install PA on Ubuntu" guide (which will go on the wiki).

Initial setup: vmware with NAT networking. Ubuntu server 6.06.1 install with LVM on an 8GB virtual disk. After installation and some apt-getting, the vmdk file is about 500MB, so it's fairly 'light'.

apt-get install samba emacs21 ssh

[now I can ssh in to the IP address for eth0 with PuTTY, which is nicer than using the vmware console.]

emacs /etc/samba/smb.conf

[change workgroup = MYELIN, uncomment [homes] (plus comment, valid users, writable, create mask, directory mask).]

smbpasswd -a phil

[enter password for phil twice.]

/etc/init.d/samba restart

[now I can successfully 'ping ubuntu' from the windows host and access \\ubuntu\phil.]

emacs /etc/hostname /etc/hosts

[change hostname from ubuntu to miniu - ubuntu is a PITA to type! - and s/ubuntu/miniu/g in the ubuntu.mshome.net line in /etc/hosts. if repeating this at home, keep a root shell open in another screen as sudo failed for me the first, until I edited /etc/hosts!.]

hostname `cat /etc/hostname`
apt-get install php5 mysql-server subversion

[wait as 30MB downloads from security.ubuntu.com.]

cd /var/www
svn checkout http://update.peopleaggregator.org/svn/release/pa/

[browse to http://miniu/pa, click link to config page.]

chmod a+w /var/www/pa/web/config

[refresh config page, get huge list of errors.]

emacs /etc/apt/sources.list

[uncomment the two lines required to access packages in the 'universe' distribution.]

apt-get update
apt-get install php5-mysql php-db php5-gd php5-xsl imagemagick
/etc/init.d/apache2 restart
chmod a+w /var/www/pa/log /var/www/pa/networks /var/www/pa/web/files /var/www/pa/web/cache /var/www/pa/web/sb-files

[refresh config page, find that PA is now installable! enter an admin password, database password, and click 'Set up PeopleAggregator'.]

mv /var/www/pa/web/config/local_config.php /var/www/pa/

[browse to http://miniu/pa/web/ - and it's working!]

[browse to http://miniu/pa/web/api/doc/peopleaggregator.echo.html and click on the test links - and they work!]

So now we have a working PeopleAggregator install on Ubuntu. There are plenty of things you'd want to do to make it a bit more usable - in particular:

- install on a system with a real domain, with wildcard DNS configured, so network spawning will work.

- configure a root password for MySQL.

- set the DocumentRoot to /var/www/pa/web so the URL is http://miniu/ rather than http://miniu/pa/web/.

All these details are covered in installation guide (also linked from the download/update page).

... more like this: [, , ]