Posts Tagged utopic unicorn
Install the latest versions of Node.js and npm, into a Docker container, with or without the need for root access. Easily update both applications to the latest versions.
Ubuntu and Node
Recently, I was setting up a new development laptop with Ubuntu 14.10 (Utopic Unicorn). As part of the setup, I needed to install all the several development tools, including Node.js and npm. Researching the current recommendations for installing Node.js and npm on Ubuntu, I found using the traditional ‘apt-get‘ command does not always install the latest versions of either application. Additionally, ‘apt-get’ makes updating those versions difficult.
After a lot of investigation, I created three different snippets of code to install the latest copies of Node.js and npm. Some of my code came from Isaac Z. Schlueter‘s series of installations Gists, and a post on StackOverflow by Pascal Hartig. Joyant and others recommended Isaac’s Gists for installing earlier versions of Node.js and npm. Other code was found in posts by DigitalOcean. Versions are as follows:
- Version 1: using ‘apt-get install’
- Version 2: using curl, make, and npmjs.org’s install script
- Version 3: version 2 without requiring ‘sudo’ to use npm*
*There is some debate on the use of ‘sudo’ with some earlier versions of npm. It appears not to be recommended with the latest versions of npm.
Docker containers and virtual machines (VM) are ideal platforms for developing and testing applications, locally. I often create a Docker container or VirtualBox VM, to install and test new scripts, before running them within our software environments. To test this code, I created three separate Docker containers, based on the official 14.04 Ubuntu base image, located on Docker Hub. I then executed each version of code within a container. After installation testing, I chose version 2 for my laptop.
The three versions of install scripts on gist.github.com, perform the following tasks:
- Creates Docker container
- Updates Ubuntu system packages within container
- Creates new ‘testuser’ account within container (‘testuser’)
- Installs required software to install Node.js, if necessary (curl, make, etc.)
- Installs Node.js and npm
- Verifies installation locations and contents correct
- Architecting a Successful SaaS: Understanding Cloud-based SaaS Models
- Using Amazon Polly Text-to-Speech Service to Expand your Blog’s Audience
- Streaming Data Analytics with Amazon Kinesis Data Firehose, Redshift, and QuickSight
- Getting Started with Data Analysis on AWS using AWS Glue, Amazon Athena, and QuickSight: Part 2
- Executing Amazon Athena Queries from JetBrains PyCharm
Top Posts & Pages
- Event-driven, Serverless Architectures with AWS Lambda, SQS, DynamoDB, and API Gateway
- Spring Integration with Eclipse Using Maven
- Managing AWS Infrastructure as Code using Ansible, CloudFormation, and CodeBuild
- Calling Microsoft SQL Server Stored Procedures from a Java Application Using JDBC
- Getting Started with Data Analysis on AWS using AWS Glue, Amazon Athena, and QuickSight: Part 1
- Truckloads of JUMP Bikes Are Being Destroyed During a Nationwide Shortage - VICE vice.com/en_us/article/… 4 days ago
- Architecting Successful SaaS: Interacting with Your SaaS Customer’s Cloud Accounts, by @GaryStafford: aws.amazon.com/blogs/apn/arch… via @awscloud 5 days ago
- If you have more than one AWS Account in your Organization and your not using AWS Single Sign-On (SSO), you should… twitter.com/i/web/status/1… 1 week ago
- Architecting a Successful SaaS: Understanding Public Cloud SaaS Models, by @GaryStafford twitter.com/awscloud/statu… 1 week ago
- RT @kastenhq: In this blog post by @GaryStafford at @AWS, read about how @kastenhq's K10 provides cloud-native data management (backup, DR,… 2 weeks ago