NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Apache and PHP on cRIO

So I am trying to install PHP and Apache on a cRIO but am having some difficulties. I have an application that collects information with LabVIEW and want it hosted on a webserver. However, I already have the PHP code, I would like to use that rather than being force to rewrite it. For this reason, I wanted to install PHP and Apache on the cRIO, if I am not mistaken, it can be done?

From what little information I have found (https://decibel.ni.com/content/message/54837), it sounds like to install PHP and Apache I will first need to "install/enable" opkg on the cRIO. How do I go about doing this?

Once the opkg is installed on the cRIO is it a simple command to install PHP and Apache?

I am a Linux newbie (please keep that in mind) and will try to keep up with any lingo

0 Kudos
Message 1 of 2
(3,007 Views)

jotnarlee, what you're working towards is the sort of reason that this board exists! Welcome!

opkg is already on the cRIO controller, and, depending on what version of the base OS you have on the controller, it may already be enabled. The first step is to find out the version of the OS installed on the controller by checking MAX

opkg.jpg

This will tell us whether or not you need to enable opkg or if it is already enabled.

While you're there, you should either enable console out (and connect up a serial console over a null modem connection, same as older cRIOs) and/or enable Secure SHell server (ssh) and download an appropriate ssh client for your desktop OS (Windows users tend to prefer PuTTY, OS X and Linux generally have an ssh client on a normal installation).

If the software is from 2013, this is the only case where things are going to be a little problematic: the package repository (or feed) is no longer present (NI did not host the feeds at that point), if that's the case let us know and we can work through an alternate solution.

If you have a more recent instalaltion, use either the serial console or the ssh remote login to the target. Once you have logged in as the "admin" user, issue the following command opkg update. This will download the package listings from the package repository/feed that are available to install through opkg.

One thing to keep in mind when needing to use another webserver on the controller is that there is already a webserver running on NI Linux RT and you have conflicting port issues. Depending on what your needs are, you could configure apache to run on a different port. There are some fairly important systems that are tied to the System WebServer, and while you could probably disable it and still use LabVIEW, all calls to the SysAPI may not work.

0 Kudos
Message 2 of 2
(2,796 Views)