Adrian Moya's picture


Hi guys! This was a special petition by Jomy Muttathil, and other community members including me felt this appliance is important for what it does. So here it is, so you can test it and give some feedback. 

Known issues

- A message appears in pages where google map is used, telling "This web site needs a different Google Maps API key. A new key can be generated at". I'll investigate about it later to see if it's possible to obtain an API key via an script. 
- I wanted to redirect /admin to ssh, but couldn't get it working and I decided not to delay the release. 


- Ushahidi software
- http and https access enabled. 
- User/pass: admin/admin

What it does

1. Set Hostname
echo "$HOSTNAME" > /etc/hostname
sed -i "s| \(.*\)| $HOSTNAME|" /etc/hosts
hostname ushahidi
2. Update package information
apt-get update
3. Install required packages
install apache2 mysql-server php5 php5-mysql php5-curl php5-mcrypt libapache2-mod-auth-mysql
4. Untar ushahidi
tar xzf /usr/local/src/ushahidi.tgz -C /var/www/
5. Set permissions
chmod 777 /var/www/ushahidi/application/config/config.php
chmod 777 /var/www/ushahidi/application/config
chmod 777 /var/www/ushahidi/application/cache
chmod 777 /var/www/ushahidi/application/logs
chmod 777 /var/www/ushahidi/media/uploads
chmod 777 /var/www/ushahidi/.htaccess
6. Create database and user
mysqladmin -u root create ushahidi
mysql -u root <<-END_PRIVS
GRANT ALL PRIVILEGES ON ushahidi.* TO ushahidi@localhost IDENTIFIED BY "ushahidi";
flush privileges;
7. Configure ushahidi
cp /var/www/ushahidi/application/config/database.template.php /var/www/ushahidi/application/config/database.php
sed -i "s/username/ushahidi/" /var/www/ushahidi/application/config/database.php
sed -i "s/password/ushahidi/" /var/www/ushahidi/application/config/database.php
sed -i "s/db/ushahidi/" /var/www/ushahidi/application/config/database.php
8. Fix a bug in ushahidi sql script. There are some typos with a field name. I reported the error here
sed -i "s/\`int\`/\`id\`/" /var/www/ushahidi/sql/ushahidi.sql
9. Create database tables
mysql -u root ushahidi < /var/www/ushahidi/sql/ushahidi.sql
10. Enable apache modules
a2enmod rewrite ssl
11. Enable sites
a2dissite default
a2ensite ushahidi
a2ensite ushahidi-ssl
12. Clean
apt-get clean

Nice job making this appliance, which I think we all agree can do tremendous good, a priority matter. I look forward to trying the patch out.

Jomy Muttathil's picture

It looks like this is intended to patch TKL Lucid Core.

Is there a reason it is not using the TKL Lucid LAMP patch?

Adrian Moya's picture

That's why my patches always are aimed to patch TKL Lucid Core. I know Basil did a TKLPatch for Lucid LAMP that I could chain into this one, but I prefer to wait until the official images are out to update this patch and base it on LAMP. Chaining the patches has the same effect if what you are looking for is to download less packages from the net. 

Add new comment