I know that this is a little absurd, but sometimes you may have tasks where the use of microcomputers is one of the best options.
In total, I had three microcomputers at my disposal: Radxa, Cubieboard A20 and Raspberry Pi. Radxa was selected as the test subject. It has a 4-core ARM Cortex-A9, 2GB RAM, 8GB PROM, and an integrated Wi-Fi module. Raspberry Pi can of course also be used, but it was not suitable for my tasks in terms of performance. The Cubieboard A20 is weaker than the Radxa, but its main advantage is the presence of a SATA controller on board.
Ubuntu Server 14.04 (Linaro for ARM processors) is installed on all microcomputers:
$ lsb_release -a No LSB modules are available. Distributor ID: Linaro Description: Linaro 14.04 Release: 14.04 Codename: trusty $ uname -a Linux radxa 3.0.36+
')
So, let's begin:
1. Create the file
/etc/apt/sources.list.d/pgdg.list and add the following repositories to it:
deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main 9.4 deb-src http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main 9.4
If you have a different version of the distribution kit, then replace
trusty with the name of the distribution used.
2. Add a new key for apt:
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
3. Update the package list:
sudo aptitude update
4. Install the dependencies for PostgreSQL 9.4:
sudo apt-get install fakeroot sudo apt-get build-dep postgresql-9.4
5. Load and build PostgreSQL 9.4 from source. Attention (
do not execute these commands from under the root ):
cd /tmp apt-get source --compile postgresql-9.4
The assembly process on Radxa took about an hour and flew unnoticed during operation. On the Raspberry Pi, it is better to run such commands before bedtime.
After successful build, you will receive 16 deb-packs.
6. Create a local repository and transfer deb packages to it:
sudo mkdir /var/local/repository sudo mv *.deb /var/local/repository/ cd /var/local/repository sudo dpkg-scanpackages ./ > Packages && gzip -f Packages
7. Add a local repository to
/etc/apt/sources.list.d/pgdg.list :
deb [ trusted=yes ] file:///var/local/repository ./
8. Update the list of available packages:
sudo aptitude update
9. Now we can install PostgreSQL 9.4:
sudo aptitude install postgresql-9.4
10. Check the work:
afedorov@radxa:~$ sudo su - postgres postgres@radxa:~$ psql psql (9.4beta3) Type "help" for help. postgres=