Need help installing NodeBB on CentOS

General Discussion
  • @Paul not sure on centos, but nodebb should be installed outside of public HTML, normally in /home/nodebb/

    Once you've got the files pulled into the directory cd into that directory and run ./nodebb setup Put your URL in the first question, then tap enter until you get to create an admin account. (assuming you've installed redis already along with all the other dependencies as mentioned over the few guides.

    Once it's installed, you'll need to go into redis.conf and un comment the password line, give it a longer complicated password, go back into your nodebb folder and run ./nodebb setup again, this time press enter until you get to redis password and type the same password in here, you'll now have a protected redis db set up. Hope centos isn't hugely different to Ubuntu...

  • sudo yum update
    sudo yum groupinstall "Development Tools" -y
    sudo yum install nodejs git redis ImageMagick npm

    cd /home/{yourusername}
    git clone git://github.com/designcreateplay/NodeBB.git nodebb

    cd nodebb
    sudo npm install -g npm
    sudo npm install

    sudo service redis start

    ./nodebb setup - Here you need to follow the instructions. To access the website from a regular domain you will want to say no to the "use port to access"

    I am still working on the apache proxy part. I'm not following it very well. Centos doesn't create a "sites-available" so you need to modify a file probably at /etc/httpd/conf.d/. I am not sure what to put there though.

    Edit:
    I haven't tested it, but you can try adding:

    <VirtualHost *:80>
        ServerName yourdomain 
        ServerAlias *.yourdomain
        ProxyRequests off
    
        <Proxy *>
            Order deny,allow
            Allow from all
        </Proxy>
        ProxyPass /socket.io/1/websocket ws://127.0.0.1:4567/socket.io/1/websocket
        ProxyPassReverse /socket.io/1/websocket ws://127.0.0.1:4567/socket.io/1/websocket
    
        ProxyPass /socket.io/ http://127.0.0.1:4567/socket.io/
        ProxyPassReverse /socket.io/ http://127.0.0.1:4567/socket.io/
    
        ProxyPass / http://127.0.0.1:4567/
        ProxyPassReverse / http://127.0.0.1:4567/
    </VirtualHost>
    
  • So from a clean start, I added Redis by following the directions located here: http://redis.io/topics/quickstart

    wget http://download.redis.io/redis-stable.tar.gz
    tar xvzf redis-stable.tar.gz
    cd redis-stable
    make

    Then I did the "make test" command and everything looked fine.

    Next (without uploading any files manually to my server) I did:

    sudo yum update
    sudo yum groupinstall "Development Tools" -y
    sudo yum install nodejs git redis ImageMagick npm

    cd /home/{yourusername}
    git clone git://github.com/designcreateplay/NodeBB.git nodebb

    cd nodebb
    sudo npm install -g npm
    sudo npm install

    sudo service redis start

    At this point NodeBB was added to my home/myusername directory.

    Then I did:

    ./nodebb setup

    When the setup ran I got something like the following and started running into problems:

    URL of this installation (http://localhost)
    Port number of your NodeBB (4567)
    Use a port number to access NodeBB? (y)
    IP or Hostname to bind to (0.0.0.0)
    Which database to use (redis)
    info: Now configuring redis database:
    Host IP or address of your Redis instance (127.0.0.1)
    Host port of your Redis instance (6379)
    Password of your Redis database
    Which database to use (0..n) (0)

    What should I add (if anything) after URL of this installation (http://localhost) and before pressing enter?

    At Use a port number to access NodeBB? (y) I typed "n" and pressed enter.

    At Password of your Redis database should I enter a password or is it done later?

    I've tried a few different things with the NodeBB setup and nothing brought me to a point where I could access a NodeBB forum.

    I am still working on the apache proxy part. I'm not following it very well. Centos doesn't create a "sites-available" so you need to modify a file probably at /etc/httpd/conf.d/.

    After running the NodeBB setup nothing was in the "etc" folder to edit.

    What have I missed or done wrong?

    This is very frustrating for someone who has never installed anything like NodeBB before. I might ask my host to install it if i can't do it on my own in the next day or so... I really would like to learn how to do it myself though.

  • @Paul URL of installation is whatever your website is. If you only have an IP address, use that for now. Redis by default comes without a password, so leave it blank for now, you can come back later and change it.

    If you've already got apache or nginx configured, set use port to no, if you don't, you need to set this to yes, once you've got apache and redis configured, you can run setup again, but change the port to no and add the redis password.

    Once you've gone through setup, you'll be asked to create an admin account, do that, then run ./nodebb start, go to the URL you entered in the config followed by :4567 (assuming you didn't change it in setup) and you should have nodebb running.

  • @HolyPhoenix and @a_5mith Thank you for your patience and for trying to help.

    I tried installing NodeBB from the beginning again and when I got to sudo npm install -g npm I noticed that I was getting npm WARN unmet dependency in PuTTY as a result. I think I will send my host another support ticket and ask them to install NodeBB for me.

  • I think the npm WARN message you might be able to safely ignore. Did you try going any further? Good luck with the support ticket!

  • @psychobunny said:

    I think the npm WARN message you might be able to safely ignore. Did you try going any further? Good luck with the support ticket!

    I ended up signing on with a new host, WiredTree, yesterday and will be leaving HostGator once I get a few domains that I have registered with them transferred to Namecheap. I had an idea that my server with HostGator was messed up but didn't know exactly how much until I installed Magento on a new site with WiredTree. The install went flawlessly on WT and was a nightmare when trying to do the same on HG... all of WT's software is up to date as far as I can tell while some of HG's is close to being end of life. I will try installing NodeBB one more time on my own once things settle down and if I still can't do it, I will send WT a support ticket.

  • @Paul hostgator explains a lot. 😆

    Good luck on your magento store, it's great software, I was a senior magento developer a year or two ago, resource heavy though.

  • @HolyPhoenix
    [email protected] [~]# yum install -g npm
    Loaded plugins: fastestmirror, security

    [email protected] [~]# yum install npm
    Loaded plugins: fastestmirror, security
    Loading mirror speeds from cached hostfile
    Setting up Install Process
    No package npm available.
    Error: Nothing to do

    any suggestion for these erors ?

  • @nakre did you follow this guide to install?

  • @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
    [email protected] [/home/chanrad]# cd nodebb
    [email protected] [/home/chanrad/nodebb]# sudo npm install -g npm
    sudo: npm: command not found
    [email protected] [/home/chanrad/nodebb]# sudo yump install -g npm
    sudo: yump: command not found
    [email protected] [/home/chanrad/nodebb]# sudo yum install -g npm
    ^[[ALoaded plugins: fastestmirror, security

    [email protected] [/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
      [email protected] [/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
    [email protected] [/home/chanrad/nodebb]# cd ../
    [email protected] [/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
      [email protected] [/home/chanrad]# cd nodebb
      [email protected] [/home/chanrad/nodebb]# sudo npm install -g npm
      sudo: npm: command not found
      [email protected] [/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.

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

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

    [email protected] [/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..

    [email protected] [~]# cd /etc/yum.repos.d
    [email protected] [/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
    [email protected] [/etc/yum.repos.d]#


Suggested Topics