Photon OS

  • 1.  How to install an rpm with tdnf?

    Posted Sep 11, 2015 01:07 AM

    I want a install influxdb into a container.  The project's web page says that RedHat and CentOS users can install by downloading and installing the rpm like this:

    # 64-bit system install instructions
    wget http://influxdb.s3.amazonaws.com/influxdb-0.9.3-1.x86_64.rpm
    sudo yum localinstall influxdb-0.9.3-1.x86_64.rpm

    I'm clever, so after downloading the file, I try this instead:

    root [ ~ ]# tdnf install influxdb-0.9.3-1.x86_64.rpm

    Error(905) : Nothing to do

    root [ ~ ]# tdnf info influxdb-0.9.3-1.x86_64.rpm

    Error(1011) : No matching packages to list

    So, how do I install an rpm with tdnf?



  • 2.  RE: How to install an rpm with tdnf?

    Posted Sep 14, 2015 02:00 AM

    Apparently, the best option is to skip tdnf and just use the rpm command.

         rpm --install influxdb-0.9.3-1.x86_64.rpm --noscripts

    The --noscripts is because the package wants to set up init.d for me, and as we all know, Photon uses systemd.  So, along with adding RUN commands for about half of the post-install script, I need to build an influxdb.service file.  I see a pull request in my future, once i work all this out.  :smileyhappy:



  • 3.  RE: How to install an rpm with tdnf?
    Best Answer

    Posted Sep 14, 2015 04:47 PM

    Building a .service file turned out to be overkill.  After briefly growing to a huge mess, my final Dockerfile looks like this:

    FROM    vmware/photon

    MAINTAINER    sam.denton@emc.com

    ADD     http://influxdb.s3.amazonaws.com/influxdb-0.9.3-1.x86_64.rpm my.rpm

    RUN     rpm --install my.rpm --noscripts

    RUN     ln -s /opt/influxdb/versions/0.9.3/influx /usr/local/bin/.

    EXPOSE 8086

    CMD     ["/opt/influxdb/versions/0.9.3/influxd"]

    The "ln" seemed easier than adding the installation directory to my PATH, and lets me run the administrative CLI via docker exec.  There's still a couple of tweaks to make, like setting up a VOLUME to hold the database, but this seems to be working well for me.