Weblog of: Derek Keats
Blog Quick Search
Type a search term into the text box to perform simple searches through all blog posts
Follow me on Twitter Follow me on Twitter
Friend me on Facebook Add me on Facebook
Chisimba Facebook group Chisimba Facebook group


Related tweets
Login




Remember me

Forgot your password?
YES, HELP ME LOGIN

Latest Post - Category: Top Level Category

Install Chisimba on a Rackspace OpenStack next generation server
98 days ago

I have just finished installing Chisimba on a Rackspace OpenStack next generation server for a client, and although it was quick and simple, I thought I would document what I did here in case anyone else wants to do a similar install. 

Firstly, I chose a rackspace Ubuntu 12.04 (LTS) installation, logged into it via ssh and ran a standard post install apt-get update and apt-get upgrade. 

Then I installed the application stack that Chisimba needs, that is Apache, MySQL, PHP and a variety of PHP and Apache modules as well as git and subversion. This was done with the command below:

apt-get install subversion apache2 mysql-server mysql-client php5 php5-mysql php5-imap php5-gd php5-curl php-pear php5-imagick php5-imap php5-ldap php5-mapscript php5-mcrypt php5-memcache php5-mysql php5-pgsql php5-pspell php5-snmp php5-sqlite php5-tidy php5-uuid php5-xmlrpc php5-xsl git

Chisimba draws some of its functionality from the PHP Extension and Application Repository (PEAR), which is a framework and distribution system for reusable PHP components. Chisimba bundles some PEAR libraries, but some we need to install via the PEAR installer. We make sure our PEAR code is up to date, and install the required libraries as follows:

pear channel-update pear.php.net
pear upgrade pear
pear upgrade-all
pear install --alldeps -f Config Log
pear install MDB2-2.5.0b2 
pear install  --alldeps -f  MDB2_Driver_mysql
pear install  --alldeps -f  MDB2_Driver_pgsql
pear install  --alldeps -f  MDB2_Driver_mysqli
pear install  --alldeps -f MDB2_Schema 
 
Note the specific version requirements of the MDB2 library - MDB2-2.5.0b2. Although this is a beta version, it has been stable and used in Chisimba for several years. You actually don't need the pgsql and mysqli drivers, but I always install them for consistency as some people get confused by the Chisimba installer if they are not present. They do no harm if they are there.
 
Now that we have the required application stack present, we can install Chisimba. First make a directory to hold the Chisimba source code:
 
cd /var
mkdir chisimba
cd chisimba
 
Next check the Chisimba core, stable master branch, out of the github repository:
 
git clone git://github.com/chisimba/chisimba.git framework
 
Note that we are probably moving Chisimba back to subversion as for a small number of developers we find git way more complicated than we need right now and this slows down development. I will post the apporpriate command here if we do that move back to subversion.
 
Then you need to check out the Chisimba modules from subversion if the software is going to be used for existing functionality:
 
 
You will probably get something like
 
Error validating server certificate for 'https://cvs2.uwc.ac.za:443':
 - The certificate is not issued by a trusted authority. Use the
   fingerprint to validate the certificate manually!
 - The certificate has expired.
Certificate information:
 - Hostname: cvs2.uwc.ac.za
 - Valid: from Thu, 24 Apr 2008 11:58:35 GMT until Fri, 24 Apr 2009 11:58:35 GMT
 - Issuer: FSIU, AVOIR, Cape Town, Western Cape, ZA
 - Fingerprint: 94:19:98:f5:90:6b:79:2e:85:ef:26:a2:79:53:a2:74:8f:07:94:1a
(R)eject, accept (t)emporarily or accept (p)ermanently? 
 
Please select either 'p' or 't' as your response.
 
You will want to create your own user interface design (called a skin or canvas), but as a basis for that you can check out the Chisimba Canvases repository from subversion:
 
 
Now you can create your Chisimba website. In this case, I am going to install in /var/www simply because this server will not have to host other sites. Otherwise, I recommend hosting sites in /var/sites/site1, /var/sites/site2, and so on. In this case, we are using the stock standard Apache2 default site in /var/www. 
 
First we need to link the various scripts in the Chisimba core application root (which is now in /var/chisimba/framework/app/) to the root of /var/www/ as follows:
 
cd /var/www
ln -s /var/chisimba/framework/app/index.php .
ln -s /var/chisimba/framework/app/gateway.php .
ln -s /var/chisimba/framework/app/xd_receiver.htm .
 
Next we do the same for the directories that we need from Chisimba core application root.
 
ln -s /var/chisimba/framework/app/classes/ .
ln -s /var/chisimba/framework/app/core_modules/ .
ln -s /var/chisimba/framework/app/installer/ .
ln -s /var/chisimba/framework/app/lib/ .
 
For cron, which you probably won't use, we need to create a directory for it as multiple sites cannot share the same cron. Although we are only doing one site, it is still good practice.
 
mkdir cron
cd cron
cp -s /var/chisimba/framework/app/cron/*.* .
cd ..
 
Now we need to create a directory for skins and canvases, and link it to the existing skins in the Chisimba core framework:
 
mkdir skins
cd skins
ln -s /var/chisimba/framework/app/skins/* .
echo "Created skins directory and linked core skins"
cd ..
 
Then we create a directory to hold the user images, or avatars, used by Chisimba and copy the default images:
 
mkdir user_images
cd user_images/
cp -s /var/chisimba/framework/app/user_images/*.* .
cd ..
 
Now we need to create a symbolic link for the modules which, for legacy reasons, has to be called packages:
 
ln -s /var/chisimba/modules packages
 
Now we need to give ownership to the webserver user and group:
cd ../
chown www-data:www-data /var/www/ -R
 
You may want to link one or more canvases. In this instance, I was setting up for a client whose canvas is in our repository so I did the following:
 
cd /var/www/skins
ln -s /var/chisimba/canvases/sangari-elearn2/ .
You may wish to link them all, in whcih case you could do
ln -s /var/chisimba/canvases/*/ .
 
You will want to restart apache2 before you continue (this one almost always gets me because I forget to do it):
 
service apache2 restart
 
Like most things in Chisimba, there is a script to automate this. I will post about it separately.
 
You might also want to speed up your site and improve performance by installing APC as described in another blog post
 
Now you can open http://yourdomain.com/index.php to start the web installer.
 
Have fun with Chisimba.



Previous Posts

The best presentation on Open Source hardware
99 days ago

I love how Open Source hardware is lowering the barriers to entry and hardware innovation

From http://video.linux.com/ under a CC:BY license.



Tags for this post
This post has not been tagged

Zimbabwe and technology neocolonialism in Zimbabwe - an appeal to David Coltart
119 days ago

I just read a facebook post by David Coltart, who is Minister of Education and Sport for Zimbabwe. I have enormous respect of David, for his MDC party, and for the awesome work that he has done for Human Rights in his country. Also, having taught Computer Science and Biology in Zimbabwe in the 1980s at one of the very few schools that had computers, and - more recently -  seen the decimation of education in Zimbabwe under the Mugabe dictatorship, I know that rebuilding the once-great education system is no easy task.  However, one of the statements made my Minister Coltart scares the living daylights out of me as someone who loves Zimbabwe, and understands the awesome potential of that country once the shackles of Mugabism are finally gone.

Coltart said

I will also be participating in the Ministerial Plenary session on Wednesday the 30th and from there will go on to the Apple Education Leadership Summit. I have been working very closely with Apple in the last few years and as I write this we are in the process of procuring a huge consignment of Apple computers for the rehabilitation of the Education Training Centre and the Curriculum Development Unit in Mount Pleasant. 

Davd Coltart, Minister of Education and Sport, Zimbabwe

Nooooooooooooooooooooooooooooooooooooooooo!

Please, not again. Don't give away the intellectual freedom of young people to a Foreign power. Because that is what Apple is, a Foreign Power. And their technology colonizes the mind. Are there no lessons in the past at all? The mind in the knowledge economy is at least as important as land in the agro-mining economy and it is where the new colonization is happening.

While the efforts to bring technology back into education in Zimbabwe are laudable, the things that the Minister is doing with Apple could be done with a lot more respect for the political implications of technology if he followed a Free and Open Source Software approach. Technology is the new colonialism, and Apple sells mental prisons built to feel sweet so that they infect the mind as quickly as possible. But a prison is a prison no matter how brightly the walls are painted.

Also, companies that sell such mental prisons based on secret software are much like drug dealers who create low cost opportunities to get you hooked early in the game. Microsoft also knows this very well, having infected millions of minds in schools around the world. Such technology pushers then recover their investment in your addiction later. Furthermore, Zimbabwe has so many smart and talented kids, you should be encouraging a maker culture, something that a Free and Open Source Software makes much more feasible than Apple's walled garden in a brightly painted mental prison.

It saddens me to see smart and educated people behaving as if there was no alternative. There are alternatives. Ones that can build INDEPENDENCE in Zimbabwe, instead of giving into the DEPENDENCE that companies such as Microsoft and foreign powers such as Apple would like to see. That alternative is Free and Open Source Software, as well as emerging Free and Open Source Hardware and other things that can help replace the DEPENDENCE and scarcity mentality with an INDEPENDENCE and abundance mentality.

Wake up David Coltart, before you give away Zimbabwe all over again.



Murder is like innovation, the lower the barriers the more you get
161 days ago

I have spent a lot of time over the past 15 years or so trying to understand innovation, and espcially how Freedom and Innovation are linked. This morning it hit me that murder is like innovation. The fewer barriers to it you have, the more of it you get.

This occurred to me after a number of tragic shootings have rocked the US, most recently a shooting yesterday at a Connecticut elementary school that left at least 27 dead, including 20 small children. At the same time, a different kind of murder happens where I live, Johannesburg, on a daily basis. Comments from various pro- and anti- gun people on Facebook, something I seldom bother reading because it is a bit like religion, just made me see the link so clearly. Interestingly, in China, where there are much stricter gun control laws, the same kind of violent attack happened recently, but none of the children were killed because the would-bgune murderer did not have access to a gun. The barrier to murder was higher. Murder is like innovation.

Guns lower the barriers to killing. If you have thing A that lowers the barriers to thing B, the more thing A you have the more thing B you get. This is axiomatic. You can no more stop it than you can stop Pythagoras theorem from being true. Anyone who argues for legitimate ownership of guns is either unaware of this axiom, or is willing to sacrifice the lives of people they do not know in order to maintain the legal and social conditions that enable them own a gun. To put it another way, responsible gun owners are willing to tolerate the deaths of children from guns in order to sustain their privilege.

South Africa and the USA have something in common. We have too many guns. We have increasing numbers of guns. It follows that we will have increasing numbers of deaths. This is enevitable. And those who want to own guns accept this, implicitly.