Creating a Basic Development Environment

To allow us to use our super computer as a via development environment we need to install some essential software and then we can begin installing the languages and supporting tools.

Underpinning all the installs we are about to do is ‘build-essential’. The build-essential is a reference for all the packages needed to compile a debian package. It generally includes the gcc/g++ compilers an libraries and some other utils

sudo apt-get install build-essential

Now we have the core tools lets install the 2 most common version control systems, subversion and git

sudo apt-get install subversion
sudo apt-get install git-core

As Python is the defacto language on the Pi lets install some python package management tools. This section is scraped from SaltyCrane Blog

Pip is a tool for installing and managing python packages

sudo apt-get install python-pip python-dev 
sudo pip install --upgrade pip

Next we are going to turn out Pi into a LAMP Server. LAMP stands for Linux, Apache, MySQL and PHP, a common framework for web development

This section was helped from Chris Potters Blog

Note, that during the below Lamp install you will be asked for certain information, specifically userid/password for MySQL and some supporting tools. The installers typically run their own application to configure.

First we install Apache, our web server

sudo apt-get install apache2

You can now test that Apache is installed correctly by opening your browser and entering the url http:// where is the name of the server you are installing into, this should show the following screen

Next we install PHP which is one of the easiest languages to write dynamic web pages

sudo apt-get install php5 libapache2-mod-php5

We can now check that PHP is installed correctly. First create a file in /var/www called info.php and include the following information

Open a browser and then open the url http:///info.php, again where server name is the name of the server you are installing on. You should get the following screen

Next we add MySQL a relational database that integrates well with Apache and PHP

sudo apt-get install mysql-server

Now we hook up Apache, PHP and MySQL by installing the PHP libraries for Apache and the libraries that allow you to make SQL calls to MySQL from PHP code

sudo apt-get install libapache2-mod-auth-mysql php5-mysql

And then we add in PHPMyAdmin a great web based tool for managing your MySQL databases which integrates with Apache

sudo apt-get install phpmyadmin

We can check that PHPMyAdmin is installed by loading it up into our browser. Enter the url http:///phpmyadmin and the following screen should be displayed

Login and you should see

Finally we can add some additional PHP libraries which are useful including PEAR which is a PHP package manager

sudo apt-get install php5-cli php5-common php5-curl php5-dev php-pear

Thats it, you have a decent LAMP server that you can write applications in Python and PHP, create websites and hook them up to a back end database, cool or what ?

Your email address will not be published. Required fields are marked *