Set Up Apache and Install HelloWorld with OPKG Package Manager

In the last post, we introduced on how to install HelloWorld though IMAGE_INSTALL_append.  In this blog, we will go over the whole set up in OPKG.

After we have compiled an image with OPKG installed (the only way to achieve this is IMAGE_INSTALL_append = ” opkg”), we would need a server where it holds all the package information Yocto.  Hence, this is like a mini Google Play Store.  Since I have been using the convenience Amazon EC2 instance to store data and compile images, it would just take a couple few minutes to set up the Apache2 server.

Setting Apache2 is simple, all we need to do it sudo apt-get install apache2.  Then we would need to create a symlink connect our ipk packages folder located in build/tmp/deploy/ipk to /var/www/html/my-ipk.  In the Amazon EC2 instance Security Group Inbound, we would add HTTP and HTTPS for port forwarding.  We could test the website by going to the IP/my-ipk of the Amazon Instance.  This is like creating an FTP server but instead, we are hosting IPK packages.

In the local HIO Device, we could install, update, upgrade, remove any program available in our server as long as we have it compiled and stored in our ipk folder. By setting up a configuration file in /etc/opkg/opkg.conf, we let opkg knows where to look for our packages on the web. And with command like “OPKG install HelloWorld “,  it would fetch information from the configuration file and install HelloWorld into our /bin folder.

By doing this way, we have a great control over our applications and saving us a lot of time from compiling images.

For more information, please visit