Installing cpanel on AWS EC2 with Node - node.js

I'm starting to use EC2 on Amazon and I'm planning to use Node.js as my server and for back end development. But I am really used to managing files via GUI and not CLI. That is why I want to install Cpanel on EC2. But I think cpanel comes with a web server like apache or nginx. So is it alright to install cpanel on EC2 if im planning to use node? Will there be any compatibility errors?
Thanks in advance

I would recommend selecting Instance type and storage accordingly if you are planning to use WHM/Cpannel.
You can install it on any server you want refer this guide. I think WHM Takes care of webserver like apache that is installed with this package.
Although things you need to keep in mind are :
you need pay for licence
Load Balancing etc would be very difficult.
Do not Forget to Assign a Static IP (Elastic IP)
Thanks

Related

How to properly install nvm/node/npm in AWS EC2 for multiple developers?

Trying to understand how node is supposed to be installed for multiple developers in AWS EC2 as an administrator. (I am also one of the devs).
I have an EC2 server with nginx running on port 80. Should I now go to the webroot and install nvm/node/npm as ec2-user? Or my own user, and then all the other users after? (No one can actually use the ec2-user account except server admins.)
How about other developers who need to use node? I was hoping to install nvm/node/npm for everyone in advance who needs it so that they could use it immediately after getting access to the server, but maybe everyone should install nvm/node/npm themselves?
Or it would be nice if there is a way to install it as ec2-user and then share it with all the users properly/securely? What's the right way to set this up?
(When I ran through this myself as my own user and installed nvm for the first time in EC2 Linux 2 AMI, I noticed that when I switched to another user or root, the "node -v" command didn't work for other accounts - and basically I'm trying to do an install that covers all the users.)
In fact, in AWS EC2, you need only one user and one NodeJS running. I would suggest below set-up for development and deployment.
Let all developers have their dev environment set-up in their local machines.
Let developers check-in their code to Github or a similar repository.
Using a CI/CD pipeline. Integrate the code and build the code and deploy it into EC2.
Instead of EC2, I would recommend using AWS Beanstalk.
If this makes sense for you, we can elaborate this into a solution and implement it.

Deploy node.js in production

What are the best practices for deploying a nodejs application in production?
I would like to know how deploy for production Api's nodejs is being done today, today my application is in docker and running locally.
I wonder if I should use a Nginx inside the container and deploy my server on it or just upload my image node that is already running today.
*I need load balance
There are few main types of deployment that are popular today.
Using platform as a service like Heroku
Using a VPS like AWS, Digital Ocean etc.
Using a dedicated server
This list is in the order of growing difficulty and control. So it's easiest with PaaS but you get more control with a dedicated server - thought it gets significantly more difficult, especially when you need to scale out and build clusters.
See this answer for more details on how to install Node on a VPS or a dedicated server:
how to run node js on dedicated server?
I can only add from experience on AWS using a NAT Gateway which is a dedicated Node server with a MongoDB server behind the gateway. (Obviously this is a scalable system and project.)
With or without Docker, you need to control the production environment. This means clearly defining which NPM libraries you will need for production, how you handle environment variables and clusters for cores.
I would suggest, very strongly, using a tool like PM2 to handle clusters, server shutdowns and restarts and logs. (Workers & slaves also if you need them and code for them).
This list can go on and on, but keep in mind this is only from an AWS perspective. Setting up a Gateway correctly on AWS is also not an easy process. Be prepared for some gotcha's along the way.

Deploy a MEAN stack application to an existing server

I have a Ubuntu Server on DigitalOcean which hosts a website, and a Windows Server on AWS which hosts another website.
I just built a mean.js stack app on my MAC, and I plan to deploy it to production.
It seems that most of the existing threads discuss about using a new dedicated server. For example, this thread is about deploying on a new AWS EC2 instance; this video is about deploying on a new Windows Azure server; this is to create a new droplet in DigitalOcean.
My question is, is it possible to use an existing server (which hosts other websites), rather than creating a new server? If yes, will there be any difference in terms of performance?
My question is, is it possible to use an existing server (which hosts other websites), rather than creating a new server?
Yes. Both Windows and Ubuntu allows you to deploy multiple applications on same instance.
For Ubuntu you can read this post which will help you server multiple apps.
In this example used Nginx, but you can follow to this example and use it without any server like Apache or Nginx. If you need subdomains I would suggest to use Apache virtual hosts with reverse proxy module and pm2
For Windows and its IIS I would suggest to use iisnode, in google you can find a lot of articles how to configure it.
will there be any difference in terms of performance?
It is depended on your applications, if you are already serving applications which handles huge traffic and need CPU and memory, I would not suggest you to use multiple apps on same instance, but if you are going to use simple web apps, you can easily use same instance.
Hope this answer will help you!

Unable to access couchbase web console for AWS EC2 RHEL server

I have just installed couchbase 3.0.1 on Amazon Web Services EC2 free RHEL instance (3.10.0-123.8.1.el7.x86_64). The installation was successful and I the couchbase is running on this server.
To access couchbase web console from web browser I need to to use the syntaax http://:8091
unfortunately this is not working. I tried using Public DNS and Public IP both.
For example:
On Google Chrome browser --> http://ec2-54-69-221-173.us-west-2.compute.amazonaws.com:8091
I have also installed the couchbase outside the AWS on VMPlayer. That works fine.
Please let me know is there any additional step I need to take care in case of AWS instance?
Thanks in advance.
I would start troubleshooting this in two ways:
1) Confirm there a couchbase process running on port 8091 on that node using netstat.
2) Make sure you have your security groups for this node set up to allow access to port 8091. If not, add a rule to the security group.
If I had to guess, it is going to be #2 though.

How to run node.js on normal linux hosting

I recently saw a good blogging platform named ghost.
But it is based on node.js so a usual Linux hosting can't handle it.
So is it possible to run node.js on a Cpanel (Linux host) or convert node.js projects to normal php?
DigitalOcean is currently the cheapest and (in my opinion) the easiest way to start a Ghost blog. They offer one-click Ghost installations on their SSD VPSes, which run on Ubuntu. Hmm, DigitalOcean is quite new, they began back in 2011, but are setting new standards - for $5 /month, you can get a VPS with 20Gb SSD, 1TB bandwidth and other cool features...
But beware, they're so cheap because they don't offer 24/7 support, like Mediatemple or other enterprise hosting solutions, but they do have an amazing community-driven forum/blog, where you can find nice tutorials, ranging from how to set up a VPS to hosting OpenVPN.
Usually normal shared hosts do not provide node.js hosting. You can try aws ec2 and install node.js in it or try heroku or other node.js hosting providers.
Regular shared hosts don't support nodejs but you can try a private server like aws or specific nodejs hosting like www.nodejitsu.com
Yalamber answered the question as I would have.
I'm not sure if this applied when Nick wrote his answer, but IMO the cheapest and easiest way to set up a Ghost blog is via Ghost's Hosted Platform: https://ghost.org/subscribe/trial/

Resources