Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Manually adding openjdk7

    General pfSense Questions
    3
    19
    3.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      teslamad
      last edited by

      Trying to figure out now how to change the size of tmp. Since I have been using the NanoBSD image for 4GB CF, doing the installation myself wasn't an option. Also, every time I have tried to do the install manually, it has failed somehow (and I'm no stranger to installing pfSense). Perhaps I can create a new tmpfs?

      Andrew Robinson
      Cloud Infrastructure Engineer
      Cisco Systems, Inc

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        System > Advanced, Misc tab, at the bottom

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • T
          teslamad
          last edited by

          Can that value be easily set/changed via the command line?

          Andrew Robinson
          Cloud Infrastructure Engineer
          Cisco Systems, Inc

          1 Reply Last reply Reply Quote 0
          • T
            teslamad
            last edited by

            Unfortunately this does not seem to work. I set /tmp to 100MB. pfSense is running the NanoBSD version (Obviously) on an Alix 2D3 which I believe only has 256MB of memory. I gave it 100MB as I figured this would be enough for a test (Openjdk7 is only about 55MB), but not enough to cause problems (just to try the download). It's still telling me the file system is full.

            Andrew Robinson
            Cloud Infrastructure Engineer
            Cisco Systems, Inc

            1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              It would need to be much larger than that. ALIX wouldn't have enough RAM.

              The technique used b the gitsync script may work (set fs to rw, then use /root/tmp/ for scratch space). It's lot harsher on the CF though.

              I don't imagine you'll have tons of luck running anything Java on an ALIX though, you may want to reconsider how that platform is being put to use.

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • T
                teslamad
                last edited by

                What version in the FTP site should I be using now for pfSense 2.1.4? I never know what to use… A few versions ago it was 8.1. Now there is 8.2, and I don't even see 8.3 anymore... Now 9.0... I hate all these different version jumps.

                Is there a tale somewhere? For example:

                2.0.1 = 8.1
                2.1 = 8.2
                2.1.4 = 9.0

                Those are just examples. idk if those were even correct old versions. I'm so lost...

                Is this the correct link right?

                ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/i386/

                I ask because I also found this which contains 8.3, 8.4, 9.1, 9.2, Stable versions and current versions.......... SCREW IT

                ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/

                Andrew Robinson
                Cloud Infrastructure Engineer
                Cisco Systems, Inc

                1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  pfSense 2.1.x uses FreeBSD 8.3, which is no longer supported upstream by FreeBSD (but we maintain our own patches).

                  FreeBSD moved the 8.3 files to their ftp-archive server.

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • T
                    teslamad
                    last edited by

                    Therefore I should be using the following correct?

                    ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.3-release/Latest/

                    I chose the link above as the archive server does not list 8.3

                    Andrew Robinson
                    Cloud Infrastructure Engineer
                    Cisco Systems, Inc

                    1 Reply Last reply Reply Quote 0
                    • T
                      teslamad
                      last edited by

                      Ok, little bit of progress (but nothing you probably don't already know)

                      I set the ram disks for /tmp and /var to their max and tried to do the download using the following:

                      /etc/rc.conf_mount_rw    # Set file system temporarily to read write
                      pkg_add -r -v ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.3-release/Latest/openjdk7.tbz    # Fetch openjdk7

                      I set -v so I could watch the process. Last time I tried withhout it and got a "Broken Pipe" error and didn't know what it meant. Watching it closely this time, I noticed it was successfully fetching the package. I was also simultaneously watching the RAM usage. Of course the RAM usage slowly climbed until it maxed out at 100% and crashed. ie "Broken Pipe" error.

                      Again, you probably knew all this was going to happen and warned me. I didn't understand how a package of only aprox 55MB could need so much space, but I guess during the staging process, it extracts, maybe duplicates… who knows. Anyways, I guess this confirms now for sure that I cannot use the /tmp /var RAM disks as a solution.

                      This means I must force pkg_add to use a different location. You keep telling me to use the gitsync code, but I don't know how to do that. I don't even know where to begin utilizing that source code to help me in this situation. My only next thought process was to either force pkg_add to use some other space via the environment variables, or do a custom install where I increase the size of /tmp at install.

                      As for the first method, I tried setting the environment variables TMPDIR and PKG_TMPDIR to point to somewhere else like /root or /mnt (USB drive) using the command below, but it made no change.

                      setenv "TMPDIR" "/mnt"
                      setenv "PKG_TMPDIR" "/mnt"

                      or

                      setenv "TMPDIR" "/root"
                      setenv "PKG_TMPDIR" "/root"

                      Can you please explain your previous suggestion in more detail, or give me some tips on this new potential solution I am trying.

                      I wish I didn't have to get JAVA running on ALIX, but it's for work and they're requesting it. Problem is, I have had it working in the past with an older (non nano) version of pfSense, so now they don't understand why all of a sudden I can't get it to work...

                      Thank you for your continued support

                      Andrew Robinson
                      Cloud Infrastructure Engineer
                      Cisco Systems, Inc

                      1 Reply Last reply Reply Quote 0
                      • T
                        teslamad
                        last edited by

                        WOOOOOOOOOOOOOT finally got it!

                        So I must have had a typo the first go around. Here was the solution:

                        /etc/rc.conf_mount_rw    # Set file system temporarily to read write
                        setenv "TMPDIR" "/root"    # Set the environment variable so pkg_add uses a location with enough space
                        setenv "PKG_TMPDIR" "/root"    # Set the environment variable so pkg_add uses a location with enough space
                        pkg_add -r -v ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.3-release/Latest/openjdk7.tbz    # Fetch openjdk7
                        rehash    # Updates executables available in path
                        java -version    # Tests whether JAVA is working

                        Thank you all for your help

                        Andrew Robinson
                        Cloud Infrastructure Engineer
                        Cisco Systems, Inc

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.