NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Compiling Mysql

Hy,

it is possible to have the missing components for compiling mysql?

Someone in the forum has already tried to install mysql server on the cRIO 9068?

Do you think there are alternate database that you can use already tested with cRIO9068?

0 Kudos
Message 1 of 10
(8,085 Views)

Dear All,

we need to install MySQL Server Engine on cRIO-9068 in order to collect data from a plant. We want to work with MySQL because our LV source code is already written for work with it, in other words we want to change hardware non-NI platform in order to use NI-Platform (cRIO-9068). Our problem is that we need the missing component for compiling MySQL source code and would be great if someone NI-Developer could help us to understand if will be possibile to do this. After that, we want try to install into cRIO-9068 also PHP and Apache.

Our database will not be very large, anyway is it possible to expand the flash disk of cRIO?

Thanks in advance,

Andrea

0 Kudos
Message 2 of 10
(4,907 Views)

Hi Andrea,

Yes, it should be possible to install MySQL to the cRIO 9068 -- in a related effort, I have successfully put together a demo in which I installed PostgreSQL to the cRIO 9068 and logged data from LabVIEW to the Postgres DB.

Yes, it is also possible to install PHP and Apache. We may have to deal with the fact that Apache and the web server we already have on the cRIO will compete for port 80, but we can get to that subsequently.

You can use USB or network storage to expand the disk space that the cRIO has access to -- I don't belive there is a way to increase the size of the onboard flash itself.

Regarding the installation of MySQL, PHP, and Apache, I recommend that you first try downloading from the Angstrom repository (as you can likely avoid having to build these packages manaully as the binaries on the Angstrom repository have for the most part been compatible on the cRIO 9068). I believe that on the cRIO you have, you'll need to first uncomment the feeds to the repositories. To do this, you'll want to go to /etc/opkg/ -- there you will find four *.conf files. You'll want to edit each of these .conf files to uncomment out the feeds that we commented out (it's so that nobody accidentally downloads any packages -- we want users to be explicit about exploring with Linux RT. Feel free to experiment with packages/code/applications in the Linux ecosystem, but realize that we can't provide much support). Each of the *.conf files has text to explain how to uncomment etc.

Once you have the feeds properly uncommented, run "opkg update" to refresh the list of packages. Then you should be able to search and install MySQL, PHP, and Apache with opkg.

Sanjay C.
Embedded Software Product Manager| National Instruments
0 Kudos
Message 3 of 10
(4,907 Views)

Sanjay is correct that there is no way to change or expand the built-in storage. The cRIO-9068 has a total 1GB of onboard storage. You could exapnd this in many ways, mostly through the USB port (flash drive, attached USB, HD, SD card reader, etc.) But you could implement network attached storage by mounting a network drive as well. You would need to use the opkg to install SAMBA support for a network attached windows drive, or use NFS for a more Linux friendly and much more easily mountable networked attached storage solution (NFS support should be built-in as it is the native Linux method.)

Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
0 Kudos
Message 4 of 10
(4,907 Views)

Hi Sanjay,

Did you run into issues with postgreSQL and the max_stack_depth? I am getting an error that max_stack_depth cannot be set.

Which version of postgreSQL did you install?

Thanks!

Javier Ruiz - Partner at JKI
jki.net
vipm.io
0 Kudos
Message 5 of 10
(4,907 Views)

Hey jarcTek,

Yes, there is a limit on stack sizes to preserve real-time performance. I got around that particular issue by running the following command as the root/admin user: "ulimit -s unlimited". Note that I'm not sure what the consequence is for real-time performance; I can double check with developers to confirm that this is the best approach (and to also get insight into what may go wrong when you set the stack size to unlimited).

Sanjay C.
Embedded Software Product Manager| National Instruments
0 Kudos
Message 6 of 10
(4,907 Views)