-
Node.js and npm: Node v9.3 (prefer
yarntonpm) -
Bower: (
npm install --global bower) -
Ruby and then
sudo apt-get install ruby-sass(ubuntu) orgem install sass -
Gulp (
npm install --global gulp, oryarn global add gulpifyarninstalled) -
MongoDB : Keep a running daemon with
mongod -
Elasticsearch - Full text search engine for MongoDB: Elasticsearch
v6.xrequiresJava 8 or later.
- Git: default installed on Ubuntu Linux
$ git --version
git version 2.7.4
$ git --help
- Node.js Node v9.x :
Installing Node.js via package manager,
# for Node.js v9.x: $ curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash - $ sudo apt-get install -y nodejs # Alternatively, for Node.js 8: $ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - $ sudo apt-get install -y nodejsNote:
Ubuntu 17.04comes withcmdtestinstalled by default. If you’re getting errors from installingyarn, you may want to runsudo apt remove cmdtestfirst. Refer to this for more information.
- Yarn is a package manager for your code.
It allows you to use and share code with other developers from around the world.
# On Debian or Ubuntu Linux, # configure the repository: $ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - $ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list # On `Ubuntu 16.04` or below and Debian Stable, # you will also need to configure the # [NodeSource repository](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions) # to get a new enough version of `Node.js`. # Then you can simply: $ sudo apt-get update && sudo apt-get install yarn # Test that Yarn is installed by running: $ yarn --versionPath Setup :
To have access to Yarn’s executables globally, you will need to set up the
PATHenvironment variable in your terminal. To do this, addexport PATH="$PATH:`yarn global bin`"to your profile.Note: your profile may be in your
.profile,.bash_profile,.bashrc,.zshrc, etc.#$ `nano ~/.profile` to edit `.profile` file: export PATH="$PATH:`yarn global bin`"Then, for the changes to take effect:
$ source ~/.Profile
-
Bower (
yarn global add bower) -
Ruby and then
sudo apt-get install ruby-sass(ubuntu) orgem install sass
# Installing `Ruby`(2.4.2) using `rbenv`(Ruby Version Manager): # (First you install rbenv, and then ruby-build) $ cd $ git clone https://github.com/rbenv/rbenv.git ~/.rbenv $ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc $ echo 'eval "$(rbenv init -)"' >> ~/.bashrc $ exec $SHELL $ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build $ echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc $ exec $SHELL $ rbenv install 2.4.2 $ rbenv global 2.4.2 $ ruby -v # The last step is to install `Bundler`. # Bundler: The best way to manage a Ruby application's gems. # `rbenv` users need to run `rbenv rehash` after installing `bundler`: $ gem install bundler $ rbenv rehash # Install `ruby-sass` package: $ sudo apt-get install ruby-sassUse rbenv to pick a Ruby version for your application and guarantee that your development environment matches production. Put
rbenvto work with Bundler for painless Ruby upgrades and bulletproof deployments.
- Gulp
(
npm install --global gulp, oryarn global add gulpifyarninstalled)
$ yarn global add gulp
- MongoDB - Keep a running daemon with
mongod
Install MongoDB Enterprise on Ubuntu 16.04 :
MongoDBonly provides packages for64-bitLTS (long-term support) Ubuntu releases. For example, 12.04 LTS (precise), 14.04 LTS (trusty), 16.04 LTS (xenial), and so on. These packages may work with other Ubuntu releases, however, they are not supported.
- Import the public key used by the package management system:
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
- Create a
/etc/apt/sources.list.d/mongodb-enterprise.listfile for MongoDB. Ubuntu 16.04:$ echo "deb [ arch=amd64,arm64,ppc64el,s390x ] http://repo.mongodb.com/apt/ubuntu xenial/mongodb-enterprise/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
- Reload local package database:
$ sudo apt-get update
- Install the MongoDB Enterprise packages:
# Install the latest stable version of MongoDB Enterprise: $ sudo apt-get install -y mongodb-enterpriseRun MongoDB Enterprise :
The MongoDB instance stores its data files in
/var/lib/mongodband its log files in/var/log/mongodbby default, and runs using the mongodb user account. You can specify alternate log and data file directories in/etc/mongod.conf.If you change the user that runs the MongoDB process, you must modify the access control rights to the
/var/lib/mongodband/var/log/mongodbdirectories to give this user access to these directories.
- Start MongoDB: Elasticsearch - Full text search engine : Elasticsearch requires
Java 8 or later.$ sudo service mongod start
- Verify that MongoDB has started successfully by checking the contents of the log file:
$ sudo vim /var/log/mongodb/mongod.log $ [initandlisten] waiting for connections on port [port] where <port> is the port configured in `/etc/mongod.conf`, 27017 by default.
- Stop MongoDB:
$ sudo service mongod stop
- Restart MongoDB:
$ sudo service mongod restart
- Begin using MongoDB: See Getting Started for the available editions.
- Elasticsearch - Full text search engine :
Elasticsearch
v6.xrequiresJava 8 or later.
1. Installing the Oracle JDK:
First, add Oracle's PPA, then update your package repository:
$ sudo add-apt-repository ppa:webupd8team/java $ sudo apt-get updateThen, Oracle
JDK 9:$ sudo apt-get install oracle-java9-installeror, Oracle
JDK 8:$ sudo apt-get install oracle-java8-installer2. Managing Java :
There can be multiple Java installations on one server. You can configure which version is the default for use in the command line by using
update-alternatives:$ sudo update-alternatives --config java # This can also be done for other Java commands, # such as the compiler(javac), the documentation generator(javadoc), # the JAR signing tool(jarsigner), and more: #$ sudo update-alternatives --config javac #$ sudo update-alternatives --config javadoc #$ sudo update-alternatives --config jarsigner3. Setting the
JAVA_HOMEEnvironment Variable :Many programs, such as Java servers, use the
JAVA_HOMEenvironment variable to determine the Java installation location.# To find out where Java is installed: $ sudo update-alternatives --config java # Copy the path from your preferred installation # and then open `/etc/environment` using `nano` editor: $ $ sudo nano /etc/environment ... # At the end of this file, add the following line, JAVA_HOME="/usr/lib/jvm/java-9-oracle"Save and exit the file, and reload and test it:
# Reload environment: $ source /etc/environment # View `JAVA_HOME`: $ echo $JAVA_HOME /usr/lib/jvm/java-9-oracle# Import the Elasticsearch PGP Key: $ -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - Installing from the APT repository: # You may need to install the apt-transport-https package on Debian before proceeding $ sudo apt-get install apt-transport-https # Save the repository definition $ echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list # You can install the Elasticsearch Debian package with $ sudo apt-get update && sudo apt-get install elasticsearch Running Elasticsearch with `systemd` to start automatically when the system boots up: $ sudo /bin/systemctl daemon-reload $ sudo /bin/systemctl enable elasticsearch.service # Elasticsearch can be started and stopped as follows: $ sudo systemctl start elasticsearch.service $ sudo systemctl stop elasticsearch.serviceChecking that Elasticsearch is running:
# this information will be written in the log files located in $ sudo tail -f /var/log/elasticsearch/elasticsearch.logYou can test that your Elasticsearch node is running by sending an HTTP request to port
9200onlocalhost:$ curl -XGET 'localhost:9200/?pretty' # which should give you a response something like this: { "name" : "DGJeJk2", "cluster_name" : "elasticsearch", "cluster_uuid" : "p-XSaQChSPymZ6QCzb1D_g", "version" : { "number" : "6.0.0", "build_hash" : "8f0685b", "build_date" : "2017-11-10T18:41:22.859Z", "build_snapshot" : false, "lucene_version" : "7.0.1", "minimum_wire_compatibility_version" : "5.6.0", "minimum_index_compatibility_version" : "5.0.0" }, "tagline" : "You Know, for Search" }
Analysis pluginsextendElasticsearchby adding newanalyzers,tokenizers,token filters, orcharacter filtersto Elasticsearch.For Korean Text Search, use the usemodj/elasticsearch-analysis-korean Korean Analysis Plugin for ElasticSearch 6.x
- PhantomJS - a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG.
Before installing PhantomJS, you will need to install some required packages on your system. You can install all of them with the following command:
$ sudo apt-get update -y $ sudo apt-get upgrade -y $ sudo apt-get install build-essential chrpath libssl-dev libxft-dev libfreetype6-dev libfreetype6 libfontconfig1-dev libfontconfig1 -yNext, you will need to download the
PhantomJS:$ sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 # Extract the downloaded archive file to desired system location: $ sudo tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/share/ # Next, create a symlink of PhantomJS binary file to systems bin dirctory: $ sudo ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/ # Verify PhantomJS: $ phantomjs --version