The happy days are over for Android developers

If you ever tried to submit an application to the App Store, you know it’s a horribly bureaucratic process and there’s absolutely no guarantee, that the app fairies of Apple will give your software the chance to compete against Angry Birds OR Tiny Wings. Google Play on the other hand used to be a place where you could just upload your app, and share it to the world, at least as long as it’s not malware. But the happy days are over.

Read More

Installing Ruby on Rails to the Raspberry Pi

After turning my Raspberry Pi into a web server, I quickly learned, that the RPi is not powerful enough for any serious web serving. In fact my version 1 board was struggling with serving a minimal Drupal8 installation, I had a bit better results with some hand crafted PHP scripts, but still the 256 MB seemed like a bottleneck. I also noticed, that performance is held back by my storage. I used a Class 4 SD card as the main storage, then moved to a Class 10 (rated at 30MB/s) and was shocked by how much faster everything worked.

Read More

How to install Ruby on Rails on Ubuntu 12.10 with RVM

Ruby on Rails is the famous application stack that provides the framework for many popular web apps, including Twitter, Github and Basecamp. Rails became the go to framework of many developers to quickly create anything thanks to it’s flexibility and scalability. Sounds good isn’t it? Before starting development you’ll need to install RoR to your server so you can run your own code.

Read More

Raspberry Pi web server with Nginx, SQLite and PHP

Today our dear postman delivered the Raspberry Pi Model B, that I was expecting for days. Its basically a tiny computer with a 700Mhz ARM CPU and 256MB RAM. Not much, but it’s enough to run a simple web, if you have minimal load on it, because the hardware is not powerful enough to serve anything public. After several tries with the more conventional LAMP stack I can tell that running Apache and MySQL is too much for the RPi, so instead we will run Nginx as the web server, and SQLite for serving the database for our dynamic content running on PHP5.

Because it’s not running a standard x86 or amd64 CPU, first of all we need an operating system that supports our chip. Fortunately the ARM port of Debian called Raspbian Wheezy is available from the Raspberry Pi Foundation website. But mind you this distro has destop packages installed so the total footprint of it is around 2GB which is quite a waste for our tiny server. You can load this image to an SD card and free up storage by removing the xserver packages by running the following command after you boot up your pi:

sudo apt-get remove purge xserver-xorg

You can do all these steps via SSH (default username:pi, password:raspberry), as the image enables it on boot, so as long as you know the device’s IP address every step here can be done remotely.

Install raspi-config, for easy RPi configuration.

sudo apt-get install raspi-config
sudo raspi-config

After you’ve installed and run raspi-config you will want to select expand_rootfs if you haven’t expanded the partition on your SD before. Restart after saving changes.

Install rpi-update, and the required essentials, run the update with a 240/16 memory split, and reboot

sudo apt-get install git-core wget ca-certificates binutils -y
sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update
sudo chmod +x /usr/bin/rpi-update
sudo rpi-update 240
sudo reboot

Remove the extra tty’s

sudo sed -i '/[2-6]:23:respawn:\/sbin\/getty 38400 tty[2-6]/s%^%#%g' /etc/inittab

Change the size of the swapfile from 100MB to 512MB

sudo nano /etc/dphys-swapfile

Change “CONF_SWAPSIZE=100″ to “CONF_SWAPSIZE=512″ in the file, save and quit nano.

Initialize the swapfile

sudo dphys-swapfile setup

Enable the swapfile

sudo dphys-swapfile swapon

Install and start Nginx

sudo apt-get install nginx
sudo /etc/init.d/nginx start

Install PHP and SQLite, then editthe nginx config file

sudo apt-get install php5-fpm php-gd php5-sqlite
sudo nano /etc/nginx/sites-available/default

Uncomment the following line:

listen 80; ## listen for ipv4.

Add index.php to the enabled index files, so the line looks like this:
index index.php index.html index.htm

Add the following lines:

location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}

Now Nginx and PHP should be all set up and live, reload Nginx config

sudo /etc/init.d/nginx reload

Now create a PHPinfo file so we can test if PHP and Nginx are set up correctly

sudo echo "" > /usr/share/nginx/www/phpinfo.php

Now try to install Drupal 8 on it! :)

Wales in numbers

We found some facts on the interwebs that are quite fascinating regarding Wales. See for yourself!

wales-info

 

Anchors aweigh!

Here we are, Monoport.co.uk is launched! You can expect some posts about technology, the web and project management with an occasional infographic.