Programming languages that you can use to build applications for Raspberry Pi, via Raspbian Stretch Lite

Code file with Raspbian logo

A programming language give programmers an interface to create computer applications to serve different use cases. On the other hand, a Raspberry Pi is one of the things that a programmer should consider getting.

Raspbian Stretch Lite is the official operating system for programmers to run server applications on a Raspberry Pi. You can use Raspbian Stretch Lite for applications that do not require a graphical user interface.

So what programming languages can you use for building applications for Raspbian Stretch Lite?

This post discusses some programming languages that you can use for building applications for Raspbian Stretch Lite.

Python on Raspbian Stretch Lite

Python Logo

Python is one of the most versatile programming languages that can help us build different kinds of applications.

For example, you can use Python to:

  • interact with the GPIO pins on your Raspberry Pi for IOT projects that interface with your home appliances.
  • build a web interface to communicate with your Raspberry Pi
  • include machine learning capabilities into your application.

Both Python 2 and Python 3 are included on Raspbian Stretch Lite.

Since Python 2 is reaching end of life soon, I recommend using Python 3 on Raspbian Stretch Lite. This is how to setup Raspbian Stretch Lite on Raspberry Pi 3 to run Python 3 applications.

Some articles on setting up Python 3 applications on Raspbian Stretch Lite:

PHP on Raspbian Stretch Lite

PHP Logo

While PHP can be used to build command-line applications, it is more widely used for web applications.

Indeed, it is a very popular server-side scripting language designed for web development.

Therefore, it powers many of the popular websites that had became part and parcel of our lives.

In case you had figured out why programmers should blog, you can consider putting up WordPress on Raspbian Stretch Lite. After that, you can write some PHP codes to create customized WordPress page templates for your blog.

When deploying PHP web applications, I personally prefer to deploy an instance of Nginx to serve as a reverse proxy server. As a result of doing so, I can optimize the delivery of static content from my server.

How to install PHP 7 on Raspbian Stretch Lite

To install PHP on Raspbian Stretch Lite, you can run the following commands in a terminal session with Raspbian Stretch Lite:

sudo apt-get update
sudo apt-get install php7.0 php7.0-fpm -y

After the commands complete, your Raspbian Stretch Lite will have the PHP 7 command-line binary and the FastCGI Process Manager.

Some articles on setting up PHP applications on Raspbian Stretch Lite:

Java on Raspbian Stretch Lite

Java logo

The Java programming language is a popular object-oriented programming language that is used for creating many server and mobile applications in the world.

If you are a programmer looking to build Java applications for Raspberry Pi, Java is an option on Raspbian Stretch Lite.

How to install Java on Raspbian Stretch Lite

As I have noted in how I make my Java programs run faster on my Raspberry Pi 3, Oracle Java perform better on Raspberry Pi.

Therefore, we will want to install Oracle Java. To do so, run the following commands in your terminal session with Raspbian Stretch Lite:

sudo apt-get update
sudo apt-get install oracle-java8-jdk -y

After the commands complete, you will be able to run Java applications on your Raspbian Stretch Lite.

Article on setting up Java application on Raspbian Stretch Lite:

Node.js on Raspbian Stretch Lite

Nodejs new pantone black logo

The website of Node.js describes it as a JavaScript runtime built on Chrome's V8 JavaScript engine. What this means is that you can write JavaScript codes to build server applications.

Node.js is ideal for building real-time web applications such as a web chat program.

In case you want to build a Node.js application for your Raspberry Pi, you can install Node.js on your Raspbian Stretch Lite.

How to install Node.js on Raspbian Stretch Lite

Suppose that you want to install Node.js 6.x on your Raspbian Stretch Lite, you will run the following commands in a terminal session with Raspbian Stretch Lite:

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs

After the commands complete, you should be able to run Node.js application on your Raspbian Stretch Lite.

You can find more Node.js setup scripts at Node.js Github repository.

About Clivant

Clivant a.k.a Chai Heng enjoys composing software and building systems to serve people. He owns techcoil.com and hopes that whatever he had written and built so far had benefited people. All views expressed belongs to him and are not representative of the company that he works/worked for.