Need help installing NodeBB on CentOS
-
Can someone please walk me through the steps for installing NodeBB on CentOS from the very begining? I have installed plenty of forum platforms before but never anything like NodeBB and i have never installed anything through an SSH terminal before.
Would I upload the NodeBB files to my server's root directory (public_html)?
And then from my SSH terminal paste per the instructions:
sudo yum update
Press enter and then paste:
sudo yum groupinstall "Development Tools" -y
Press enter and then paste:
sudo yum install nodejs git redis ImageMagick npm
Press enter and then at "Next, clone the repository." where it says:
cd /path/to/nodebb/install/location
Change it to something like cd /home/mysite/public_html/install/ ?
I would like NodeBB to be accessed at http://mysite.com. Any help would be greatly appreciated.
-
hey @Paul welcome TBH I don't have much experience with your distro but I'm sure others have over here. Have a look at the CentOS instructions on our docs: https://docs.nodebb.org/en/latest/installing/os.html
If you're still stuck pls report what went wrong and hopefully we can help
-
Thank you, @ psychobunny. I saw that and unfortunately it assumes that you know how to use a SSH terminal and that you know what to do with the down loaded NodeBB files. I need instructions that are written for someone who has never done anything like this before.
-
@Paul said:
Would I upload the NodeBB files to my server's root directory (public_html)?
Nope, in this case the source-files would be readable by everyone which isn't recommended
You should rather store them in some directory that's not public like/home/YOURUSERNAME/nodebb/
(eg. by runninggit clone git://github.com/designcreateplay/NodeBB.git nodebb
from within/home/YOURUSERNAME/
.
After this follow the steps fromObtain npm Dependencies.
You should also set up a redis-password.
The
./nodebb start
command from within/home/YOURUSERNAME/nodebb/
will do everything therefor you can access the site viahttp://yourhost:4567
. to get rid of the port-number you need to follow one of these instructions. -
I need instructions that are written for someone who has never done anything like this before.
There is a "for dummies" guide available, but its written for Ubuntu. It basically goes through every step one at a time and explains what you're doing. I wonder if reading this guide makes sense to you, it would make the CentOS guide more understandable.
http://burnaftercompiling.com/nodebb/setting-up-a-nodebb-forum-for-dummies/
-
@Paul
Are you using nginx or apache and what version? Your going to have to setup a proxy after the installation is complete to make it accessible via your domain and not a port. Are you on CentOS 6.5?I can probably write up super specific instructions with that information.
Also, do you use a control panel of any sort? If you do, the location of files can be completely different, so setting up the proxy might be more difficult. I found that with DirectAdmin on CentOS I couldn't find the correct files to setup a proxy for apache very easily, and just decided to get rid of DirectAdmin altogether before actually spending too much time on it.
Oh, also, let me know what you are using to ssh into it. That way I can make sure my screenshots match what you will see.
-
Thank you for replying @frissdiegurke @psychobunny (again) and @HolyPhoenix.
@HolyPhoenix said:
Are you using nginx or apache and what version? Your going to have to setup a proxy after the installation is complete to make it accessible via your domain and not a port. Are you on CentOS 6.5?
I am using Apache version 2.2.26, I am on CentOS 5.10 and I use cPanel. I use cPanel to access the SSH terminal. I'm guessing I will need to have my version of CentOS updated and I will send my host (HostGator) a support ticket.
I'm afraid most of this is way over my head and I will probably have to stick with something less complicated.
-
What's nice is that good hosts may help you out with installs as well. There was this guy early days who literally had his host walk him through the entire NodeBB installation process, which I thought was pretty nice of them. I guess after all, you're paying them and they might lose your business.
I would say take it baby steps, don't worry about setting up a proxy right now or anything advanced, just get a basic forum running on any port and work from there. Could you let us know at what point in the install you got stuck / or what exactly doesn't make sense?
-
@psychobunny , my host is going to update CentOS for me today and I will try again from the beginning once that is done. NodeBB looks outstanding and I really would like to learn how to install it, so I'll be taking baby steps.
-
Cool.
I will try to get those instructions written up after work today. I think I got it all figured out using a virtualbox setup so if you can't get it running before I can finish getting them written up you may have a slightly more specific guide.
-
After almost two days of having my host install CentOS 6.5 and then having them add permissions back, I tried installing NodeBB again. I am using PuTTY now and I am stuck at cd /path/to/nodebb/install/location. I uploaded NodeBB within the nodebb folder like so: home/mysite/public_html/nodebb, should I change cd /path/to/nodebb/install/location to cd /home/mysite/public_html/nodebb/instal/I-don't-know-what-should-go-here ?
Also, when, where and how should I install the Redis databse?
-
@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 npmcd /home/{yourusername}
git clone git://github.com/designcreateplay/NodeBB.git nodebbcd nodebb
sudo npm install -g npm
sudo npm installsudo 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
makeThen 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 npmcd /home/{yourusername}
git clone git://github.com/designcreateplay/NodeBB.git nodebbcd nodebb
sudo npm install -g npm
sudo npm installsudo 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.
-
@HolyPhoenix
root@server [~]# yum install -g npm
Loaded plugins: fastestmirror, securityroot@server [~]# yum install npm
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
Setting up Install Process
No package npm available.
Error: Nothing to doany suggestion for these erors ?