ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Install NodeBB 1.10.2 on Fedora 28 with Mongo

    IT Discussion
    nodebb nodebb 1.10.2 fedora fedora 28 mongo mongodb
    5
    30
    5.2k
    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.
    • JaredBuschJ
      JaredBusch
      last edited by JaredBusch

      Super simple to install NodeBB on a modern, updated OS.

      As always with my guides, run this as root.

      The basics

      dnf install -y mongodb-server mongodb nodejs git nano policycoreutils-python-utils
      systemctl enable --now mongod
      firewall-cmd --add-port=4567/tcp --permanent
      firewall-cmd --reload
      semanage port -a -t mongod_port_t -p tcp 27017
      semanage port -m -t http_port_t -p tcp 4567
      

      Setup Mongo

      mongo
          use admin
          db.createUser( { user: "admin", pwd: "<Enter a secure password>", roles: [ { role: "readWriteAnyDatabase", db: "admin" }, { role: "userAdminAnyDatabase", db: "admin" } ] } )
          use nodebb
          db.createUser( { user: "nodebb", pwd: "<Enter a secure password>", roles: [ { role: "readWrite", db: "nodebb" }, { role: "clusterMonitor", db: "admin" } ] } )
          quit()
      

      Enable security in Mongo

      nano /etc/mongod.conf
      # Append at end
      security:
        authorization: enabled
      

      Restart Mongo

      systemctl restart mongod
      

      Verify admin creds work

      mongo -u admin -p 'Your Password Here' --authenticationDatabase=admin # can omit the ' if no spaces in password
          quit()
      

      clone nodebb down from github intothe /opt/nodebb folder

      As of this writing 1.20.2 is current on this branch
      git clone -b v1.10.x https://github.com/NodeBB/NodeBB.git /opt/nodebb
      

      Change into the directory and run the setup wizard

      I will do this again later and get screenshots. the wizard asks a few questions that a novice might not be ready for.

      cd /opt/nodebb
      ./nodebb setup
      

      Answer the setup questions

      For this one, you have to answer depending on if you have your FQDN ready or not.
      If you have your FQDN ready then specify the actual URL. In my case https://obelisk.daerma.com
      If not, specify the IP address http://10.254.0.107
      0_1540773758422_ab84fb28-9671-460b-8d15-a2f00ce315ef-image.png

      You can just hit enter here as this is randomly generated each time.
      0_1540773921183_c69def57-c534-4bfc-adb9-90f64d76a940-image.png

      Specify the database being used. Obviously leave the default of mongo if you are following this guide.
      0_1540774002633_2f1220e5-24ec-4021-a4ea-e73feafe06b9-image.png

      You can leave this one blank if you want. If so, you will simply specify the pieces individually.
      0_1540774084176_3600401f-d526-4507-8c39-41112b890c51-image.png

      Personally, I like the single connection string. No idea why really, I just do.

      mongodb://nodebb:YourNodeBBPasswordFromAbove@localhost:27017/nodebb
      

      Doing the single connection string will earn you a warning in the log every time NodeBB starts about no mongo username/password.

      If you enter it properly, you will see this.
      0_1540774329333_37e0dfa2-11d3-4fde-be4a-699b1e04da02-image.png

      Now enter the initial Admin user info
      0_1540774525664_06a99ac7-0915-474f-9283-e85c857f03f1-image.png

      You should see this if it successfully completed.
      0_1540774590814_e29f0f89-597d-478c-a0a7-8f031989a97d-image.png

      Start nodebb and show the log

      I say to use slog instead of start just to make sure you can see any errors.

      ./nodebb slog
      

      You should see a startup log like this.
      0_1540774683010_551990d5-ae31-4790-a761-3687cee7c2ef-image.png

      Verify it is up and running

      Navigate to your site by IP or FQDN and specify port 4567.
      http://your.ip.add.ress:4567
      http://nodebb.domain.com:4567

      0_1540775026180_0f7907e6-ee3e-41f5-8286-59fa8e4375d6-image.png

      You are all done

      Now you can setup your preferred reverse proxy solution, SSL, and anything else you want.

      If you setup the IP address earlier

      You will need to update the /opt/nodebb/config.json file to reflect the correct URL once you have your FQDN and reverse proxy in place.

      Also remember what I said about warnings. It is because the username and password are blank in the config.json.
      0_1540775982161_ed513a34-6f58-43af-b36e-1a74e260befb-image.png

      1 Reply Last reply Reply Quote 2
      • JaredBuschJ
        JaredBusch
        last edited by

        NodeBB does not run a a standard port and you will never want it live to the internet this way.

        So you want to put NginX in front of it as a reverse proxy.

        1 Reply Last reply Reply Quote 3
        • M
          mattbagan
          last edited by

          Are we supposed to change the permissions on the /opt directory? I tried to run the setup and ran into all kinds of permissions errors.

          black3dynamiteB 1 Reply Last reply Reply Quote 0
          • black3dynamiteB
            black3dynamite @mattbagan
            last edited by

            @mattbagan said in Install NodeBB 1.10.2 on Fedora 28 with Mongo:

            Are we supposed to change the permissions on the /opt directory? I tried to run the setup and ran into all kinds of permissions errors.

            Try using sudo or switch to root to run the setup.

            JaredBuschJ 1 Reply Last reply Reply Quote 0
            • JaredBuschJ
              JaredBusch @black3dynamite
              last edited by

              @black3dynamite said in Install NodeBB 1.10.2 on Fedora 28 with Mongo:

              @mattbagan said in Install NodeBB 1.10.2 on Fedora 28 with Mongo:

              Are we supposed to change the permissions on the /opt directory? I tried to run the setup and ran into all kinds of permissions errors.

              Try using sudo or switch to root to run the setup.

              I can see the confusion. I left a couple sudo in there.

              I always try to write my guides done as root to prevent issues like this.

              For the people the know enough to not want to do something, as root, they generally will not need to ask.

              1 Reply Last reply Reply Quote 1
              • JaredBuschJ
                JaredBusch
                last edited by

                OP updated to clarify to run as root.

                1 Reply Last reply Reply Quote 1
                • M
                  mattbagan
                  last edited by

                  I ran through the whole setup with sudo and received the permissions error on ./nodebb setup.

                  JaredBuschJ 1 Reply Last reply Reply Quote 0
                  • JaredBuschJ
                    JaredBusch @mattbagan
                    last edited by

                    @mattbagan said in Install NodeBB 1.10.2 on Fedora 28 with Mongo:

                    I ran through the whole setup with sudo and received the permissions error on ./nodebb setup.

                    What OS are you on? I've never had a problem with this. This guide was created because I had to setup a new instance the other day. The commands above are what is in my command history.

                    M 1 Reply Last reply Reply Quote 0
                    • M
                      mattbagan @JaredBusch
                      last edited by

                      @JaredBusch Fedora 28. After I changed the permissions to /opt I was able to run the setup. I am going to try it again later with a new instance.

                      JaredBuschJ 1 Reply Last reply Reply Quote 0
                      • JaredBuschJ
                        JaredBusch @mattbagan
                        last edited by

                        @mattbagan said in Install NodeBB 1.10.2 on Fedora 28 with Mongo:

                        @JaredBusch Fedora 28. After I changed the permissions to /opt I was able to run the setup. I am going to try it again later with a new instance.

                        No changes.
                        0_1540771004772_eda99076-0ad8-47b7-819d-689222aef902-image.png

                        1 Reply Last reply Reply Quote 0
                        • JaredBuschJ
                          JaredBusch
                          last edited by

                          @mattbagan bingo. SELinux

                          0_1540771091747_5e3f803c-a58f-4931-9416-d2185fb28ca9-image.png

                          M 1 Reply Last reply Reply Quote 0
                          • M
                            mattbagan @JaredBusch
                            last edited by

                            @JaredBusch that makes more sense. Any idea when you are going to finish the guide? I made it to the setup and can't answer some of the questions it asks.

                            JaredBuschJ 2 Replies Last reply Reply Quote 0
                            • JaredBuschJ
                              JaredBusch @mattbagan
                              last edited by

                              @mattbagan said in Install NodeBB 1.10.2 on Fedora 28 with Mongo:

                              @JaredBusch that makes more sense. Any idea when you are going to finish the guide? I made it to the setup and can't answer some of the questions it asks.

                              Where did you get your error? I just did it again with SELinux enforcing and no error to this mpoint.
                              0_1540773348553_902120b9-d9b7-4374-bb2f-4fe572f5a64f-image.png

                              1 Reply Last reply Reply Quote 0
                              • JaredBuschJ
                                JaredBusch
                                last edited by

                                nevermind..

                                The benchpres component puked.
                                0_1540773418494_eadfe543-9f7f-4eb7-b48d-878ad2c927ef-image.png

                                1 Reply Last reply Reply Quote 0
                                • CloudKnightC
                                  CloudKnight
                                  last edited by

                                  Good guide, NodeBB is a nice product.

                                  JaredBuschJ 1 Reply Last reply Reply Quote 0
                                  • JaredBuschJ
                                    JaredBusch
                                    last edited by

                                    @mattbagan I would call this a nodebb problem, or potentially benchpress.

                                    Definitely running as root negates this issue.

                                    1 Reply Last reply Reply Quote 0
                                    • JaredBuschJ
                                      JaredBusch @CloudKnight
                                      last edited by

                                      @StuartJordan said in Install NodeBB 1.10.2 on Fedora 28 with Mongo:

                                      Good guide, NodeBB is a nice product.

                                      I think so too. That is why I run my D&D forum on it.

                                      CloudKnightC 1 Reply Last reply Reply Quote 0
                                      • CloudKnightC
                                        CloudKnight @JaredBusch
                                        last edited by

                                        @JaredBusch Is D&D a game?

                                        scottalanmillerS 1 Reply Last reply Reply Quote 0
                                        • scottalanmillerS
                                          scottalanmiller @CloudKnight
                                          last edited by

                                          @StuartJordan said in Install NodeBB 1.10.2 on Fedora 28 with Mongo:

                                          @JaredBusch Is D&D a game?

                                          Dungeons and Dragons.

                                          CloudKnightC 1 Reply Last reply Reply Quote 0
                                          • CloudKnightC
                                            CloudKnight @scottalanmiller
                                            last edited by

                                            @scottalanmiller ah gotcha, wasn't that a really popular board game in the 90s if I memory serves me correctly?

                                            JaredBuschJ scottalanmillerS 2 Replies Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post