Need help installing NodeBB on CentOS

General Discussion
  • @a_5mith yes, sudo npm install -g npm is where i get error the previous ones went fine

  • I've never used centos, but it appears you're not installing npm inside your nodebb folder, but instead in root?

  • @a_5mith
    root@server [/home/chanrad]# cd nodebb
    root@server [/home/chanrad/nodebb]# sudo npm install -g npm
    sudo: npm: command not found
    root@server [/home/chanrad/nodebb]# sudo yump install -g npm
    sudo: yump: command not found
    root@server [/home/chanrad/nodebb]# sudo yum install -g npm
    ^[[ALoaded plugins: fastestmirror, security

    root@server [/home/chanrad/nodebb]# yum install npm
    Loaded plugins: fastestmirror, security
    Loading mirror speeds from cached hostfile

    • base:
    • extras:
    • updates:
      base | 3.7 kB 00:00
      extras | 3.4 kB 00:00
      pgdg93 | 3.6 kB 00:00
      updates | 3.4 kB 00:00
      Setting up Install Process
      No package npm available.
      Error: Nothing to do
      root@server [/home/chanrad/nodebb]# yum npm install
      Loaded plugins: fastestmirror, security
      No such command: npm. Please use /usr/bin/yum --help

    i'm sure i'm in nodebb folder thats the log..

  • @nakre you are in nodebb, didn't look like it from first logs, lack of npm might suggest you've not got everything from the software stack part. Can you try

    cd ../
    sudo yum install npm
    cd nodebb  
    sudo npm install -g npm  
    sudo npm install
    
  • @a_5mith
    root@server [/home/chanrad/nodebb]# cd ../
    root@server [/home/chanrad]# sudo yum install npm
    Loaded plugins: fastestmirror, security
    Loading mirror speeds from cached hostfile

    • base:
    • extras:
    • updates:
      Setting up Install Process
      No package npm available.
      Error: Nothing to do
      root@server [/home/chanrad]# cd nodebb
      root@server [/home/chanrad/nodebb]# sudo npm install -g npm
      sudo: npm: command not found
      root@server [/home/chanrad/nodebb]# sudo npm install
      sudo: npm: command not found

    when i used sudo yum install nodejs git redis ImageMagick npm

    Setting up Install Process
    No package nodejs available.
    Package git-1.7.1-3.el6_4.1.i686 already installed and latest version
    No package redis available.
    Package ImageMagick-6.5.4.7-7.el6_5.i686 already installed and latest version
    No package npm available.
    Nothing to do

  • @nakre

    If I remember correctly npm is in the EPEL repository, and based on your error it looks like you don't have the repo enabled. This guide looks pretty good.
    http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x

    Make sure you use the right EPEL release for your version of centos.

    Once you finish that then run the npm command again and it should work. You shouldn't need to install it to the nodebb directory.

  • @nakre

    Did adding the EPEL repository work for you?

  • @HolyPhoenix maybe i should give up.. if i can't manage to install it how could i maintenance it ;x still thanks a lot for helping me out, these comments may help some others as well..

    Here are latest logs i have.. i'm kinda very sure i have epel enabled.

    root@server [/]# cd home
    root@server [/home]# cd chanrad
    root@server [/home/chanrad]# cd nodebb
    root@server [/home/chanrad/nodebb]# sudo npm install -g npm
    sudo: npm: command not found
    root@server [/home/chanrad/nodebb]# cd ..
    root@server [/home/chanrad]# sudo yum install npm
    Loaded plugins: fastestmirror, security
    Loading mirror speeds from cached hostfile

    Command line error: no such option: -g
    root@server [/home/chanrad]# cd ../
    root@server [/home]# sudo yum install npm
    Loaded plugins: fastestmirror, security
    Loading mirror speeds from cached hostfile

    • base: centos.chi.host-engine.com
    • extras: mirror.fdcservers.net
    • remi: mirrors.mediatemple.net
    • updates: mirror.wiredtree.com
      Setting up Install Process
      No package npm available.
      Error: Nothing to do
      root@server [/home]# cd home/chanrad
      -bash: cd: home/chanrad: No such file or directory
      root@server [/home]# cd chanrad/nodebb
      root@server [/home/chanrad/nodebb]# sudo npm install -g npm
      sudo: npm: command not found
      root@server [/home/chanrad/nodebb]# sudo npm install
      sudo: npm: command not found
      root@server [/home/chanrad/nodebb]#

    root@server [/home/chanrad]# sudo vim /etc/yum.repos.d/remi.repo

    [remi]
    name=Les RPM de remi pour Enterprise Linux 6 - $basearch
    #baseurl=http://rpms.famillecollet.com/enterprise/6/remi/$basearch/
    mirrorlist=http://rpms.famillecollet.com/enterprise/6/remi/mirror
    enabled=1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

  • @nakre

    Could you show me the output of
    - cd /etc/yum.repos.d
    - ls

    ?

  • @HolyPhoenix Sure here it is..

    root@server [~]# cd /etc/yum.repos.d
    root@server [/etc/yum.repos.d]# ls
    ./ epel.repo pgdg-93-centos.repo
    ../ epel.repo.rpmnew remi.repo
    CentOS-Base.repo epel-testing.repo .remi.repo.swp
    CentOS-Debuginfo.repo mirrors-rpmforge rpmforge.repo
    CentOS-Media.repo mirrors-rpmforge-extras webtatic.repo
    CentOS-Vault.repo mirrors-rpmforge-testing
    root@server [/etc/yum.repos.d]#

  • @nakre

    and what happens if you run?
    - cat /etc/release

  • @HolyPhoenix

    root@server [/etc]# cat /etc/release
    CentOS release 6.5 (Final)
    LSB_VERSION=base-4.0-ia32:base-4.0-noarch:core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
    cat: /etc/lsb-release.d: Is a directory
    CentOS release 6.5 (Final)
    CentOS release 6.5 (Final)
    cpe:/o:centos:linux:6:GA
    root@server [/etc]#

  • Hmmm... It looks like the repo files are there, but it appears it isn't loading the repo.

    I guess the last thing to check is yum itself. I think you can list the repos yum has loaded with a

     - sudo yum repolist
    

    Edit: I found these instructions online. They mention enabling the EPEL repository within the command itself. That might prove useful.

    Node.js and npm are available from the Fedora Extra Packages for Enterprise Linux (EPEL) repository. If you haven't already done so, first enable EPEL.

    To check if you have EPEL, run

    yum repolist
    if you don't see epel, install it via RPM (At the time of this writing, the last version is 6.8.).

    First import the key:

    sudo rpm --import https://fedoraproject.org/static/0608B895.txt
    Then install

    sudo rpm -Uvh http://download-i2.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
    And then run the following command to install node and npm:

    sudo yum install nodejs npm --enablerepo=epel
    or if this doesn't work for you install node separately:

    sudo yum install npm --enablerepo=epel

  • @HolyPhoenix here is the last log, i also tried ./nodebb setup to see the errors may help dunno..

    root@server [~]# sudo yum repolist
    Loaded plugins: fastestmirror, security
    Loading mirror speeds from cached hostfile

    module.js:333
    throw err;
    ^
    Error: Cannot find module 'nconf'
    at Function.Module._resolveFilename (module.js:331:15)
    at Function.Module._load (module.js:273:25)
    at Module.require (module.js:357:17)
    at require (module.js:373:17)
    at Object.<anonymous> (/home/chanrad/nodebb/app.js:23:13)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:349:32)
    at Function.Module._load (module.js:305:12)
    at Function.Module.runMain (module.js:490:10)

  • Yeah, I am at a loss at this point. When you run the repolist command I am not seeing it show the EPEL repository, yet when you try to install it it says you already have it.

    This isn't really a NodeBB problem though, so we can't really blame the NodeBB script for it. It's almost like Yum itself is messed up. You might be able to get extra help from the CentOS community though, or if someone else here is more of a CentOS expert?


Suggested Topics


  • 0 Votes
    3 Posts
    342 Views

    @PitaJ Yes.... Forgive my stupid question.......AhAhAhAh..

  • 0 Votes
    1 Posts
    869 Views

    Hello,

    I am trying to setup nodebb with haproxy instead of nginx as frontend. Everything seam to be working however I am getting lots of 403 on /socket.io/ requests.

    frontend http-in mode http bind 0.0.0.0:80 redirect scheme https code 301 if !{ ssl_fc } frontend https-in bind 0.0.0.0:443 ssl crt /etc/letsencrypt/live/test/test.pem http-response set-header strict-transport-security "max-age=31536000; includeSubDomains" http-response set-header Content-Security-Policy "default-src 'self' wss: https: *.startech-rd.tk/*; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://code.jquery.com; style-src 'self' 'unsafe-inline' https:; img-src 'self' https://casper.ghost.org/ https://www.gravatar.com/ data:; font-src 'self' https:" http-response set-header X-XSS-Protection "1; mode=block" http-response set-header X-Content-Type-Options "nosniff" http-response set-header Referrer-Policy "no-referrer" reqadd X-Forwarded-Proto:\ https acl is_websocket hdr(Upgrade) -i WebSocket acl is_websocket path_sub -i /socket.io/ use_backend bk_ws if is_websocket acl acl_comments path_beg -i /comments use_backend comments if acl_comments backend comments mode http balance leastconn timeout connect 1s timeout server 600s timeout queue 600s option redispatch retries 3 acl is_woff capture.req.uri -m sub .woff acl is_ttf capture.req.uri -m sub .ttf acl is_eot capture.req.uri -m sub .eot http-response set-header Cache-Control public if is_eot or is_woff or is_ttf http-response set-header Expires -1 if is_eot or is_woff or is_ttf http-response set-header Pragma cache if is_eot or is_woff or is_ttf cookie nodebb insert indirect nocache secure server node1 10.160.125.81:4567 cookie nodebb_node1 check inter 1000 fastinter 500 rise 2 fall 1 server node2 10.160.125.82:4567 cookie nodebb_node2 check inter 1000 fastinter 500 rise 2 fall 1 backend bk_ws option redispatch balance roundrobin option forwardfor option httpclose server node1 10.160.125.81:4567 maxconn 30000 weight 10 cookie ws_node1 check server node2 10.160.125.82:4567 maxconn 30000 weight 10 cookie ws_node2 check```

    I have tried to connect directly without haproxy and the websockets are connecting correctly. However I've seen that using the haproxy the websocket protocol changed from wss to https.

    Any suggestions on how to fix this?

  • NodeBB + GoDaddy

    Unsolved General Discussion
    4
    0 Votes
    4 Posts
    2k Views

    @Scuzz
    You can get a glimpse of it, when you don't do the ./nodebb setup and instead just go right into start or dev. NodeBB will start into the web installer on port 4567. Of course you would still have to issue that one command, though.

    edit: And I presume, that those hosters won't give you access to port 4567 ^_^

    The problem in general being: Software written in e.g. php is not a complete program itself. It's merely leveraging an already set up web server. You can upload your files and call the URL, the rest is handled by the server software (Apache or what have you).
    NodeJS, on the other hand, is basically just a JavaScript interpreter - namely V8. It doesn't know anything about serving websites, building certain network connections, and so on. That's all up to you and your code.
    But as Scuzz mentioned, a web-installer seems to be in the making. That again lets me guess, that the guys are working towards easy integration the likes of where a hoster can offer their customers a "Click here to install NodeBB" button, which invokes a bunch of scripts setting up your (virtual) server, starting the NodeBB (which actually is not only the forum, but the whole web server* also) and finally redirecting to the web installer. In comparison many uncertain steps, which will have to be clarified between NodeBB and each and every hoster. That's why this will still take some time, I'd say. 😩

    *weeell... that's not very acurate either; but this is pretty tl;dr as it is 😉

  • 3 Votes
    5 Posts
    4k Views

    @pichalite I am still confused that. it need update after install. But our node_module files always in ignore... so I don't thinks it's a good way to put plugs into node_module....

  • 0 Votes
    9 Posts
    3k Views

    I'm impressed...thanks fellas