MEAN is a free and open-source JavaScript software stack. MEAN stack is named using the first letter of its four components MongoDB, Express.js, AngularJS and Node.js. Because all four components of MEAN stack support JavaScript therefore MEAN stack is used for both server-side and client-side execution environments for building dynamic websites and web applications using JavaScript.
In this article, we are installing MEAN stack on CentOS 7 server. Here, we are not emphasizing on the developments and deployments of JavaScript based web applications on MEAN stack. Therefore, if you want to explore MEAN stack in depth, then you should read MEAN Web Development by Packt Publishing.
Table of Contents:
- Environment Specification
- Installing MEAN Stack Prerequisite Packages
- Installing MongoDB 4 on CentOS 7
- Installing Node.js 10 on CentOS 7
- Installing Yarn Package Manager on CentOS 7
- Installing Gulp Task Scheduler on CentOS 7
- Installing MEAN Stack on CentOS 7
- Testing MEAN Stack on CentOS 7
Environment Specification:
We have provisioned a CentOS 7 virtual machine with following specifications.
- CPU – 3.4 Ghz (Single Core)
- Memory – 2 GB
- Storage – 20 GB
- Operating System – CentOS 7.6
- Hostname – nodejs-01.example.com
- IP Address – 192.168.116.190 /24
Installing MEAN Stack Prerequisite Packages:
Connect with nodejs-01.example.com using ssh as root user.
These packages are required by various components of MEAN stack; therefore, we are installing them in one go using yum command.
[root@nodejs-01 ~]# yum install -y gcc-c++ make git
...
Installed:
gcc-c++.x86_64 0:4.8.5-36.el7_6.2 git.x86_64 0:1.8.3.1-20.el7
Dependency Installed:
cpp.x86_64 0:4.8.5-36.el7_6.2
gcc.x86_64 0:4.8.5-36.el7_6.2
glibc-devel.x86_64 0:2.17-260.el7_6.6
glibc-headers.x86_64 0:2.17-260.el7_6.6
kernel-headers.x86_64 0:3.10.0-957.21.3.el7
libmpc.x86_64 0:1.0.1-3.el7
libstdc++-devel.x86_64 0:4.8.5-36.el7_6.2
mpfr.x86_64 0:3.1.1-4.el7
perl.x86_64 4:5.16.3-294.el7_6
perl-Carp.noarch 0:1.26-244.el7
perl-Encode.x86_64 0:2.51-7.el7
perl-Error.noarch 1:0.17020-2.el7
perl-Exporter.noarch 0:5.68-3.el7
perl-File-Path.noarch 0:2.09-2.el7
perl-File-Temp.noarch 0:0.23.01-3.el7
perl-Filter.x86_64 0:1.49-3.el7
perl-Getopt-Long.noarch 0:2.40-3.el7
perl-Git.noarch 0:1.8.3.1-20.el7
perl-HTTP-Tiny.noarch 0:0.033-3.el7
perl-PathTools.x86_64 0:3.40-5.el7
perl-Pod-Escapes.noarch 1:1.04-294.el7_6
perl-Pod-Perldoc.noarch 0:3.20-4.el7
perl-Pod-Simple.noarch 1:3.28-4.el7
perl-Pod-Usage.noarch 0:1.63-3.el7
perl-Scalar-List-Utils.x86_64 0:1.27-248.el7
perl-Socket.x86_64 0:2.010-4.el7
perl-Storable.x86_64 0:2.45-3.el7
perl-TermReadKey.x86_64 0:2.30-20.el7
perl-Text-ParseWords.noarch 0:3.29-4.el7
perl-Time-HiRes.x86_64 4:1.9725-3.el7
perl-Time-Local.noarch 0:1.2300-2.el7
perl-constant.noarch 0:1.27-2.el7
perl-libs.x86_64 4:5.16.3-294.el7_6
perl-macros.x86_64 4:5.16.3-294.el7_6
perl-parent.noarch 1:0.225-244.el7
perl-podlators.noarch 0:2.5.1-3.el7
perl-threads.x86_64 0:1.87-4.el7
perl-threads-shared.x86_64 0:1.43-6.el7
rsync.x86_64 0:3.1.2-6.el7_6.1
Dependency Updated:
glibc.x86_64 0:2.17-260.el7_6.6 glibc-common.x86_64 0:2.17-260.el7_6.6
libgcc.x86_64 0:4.8.5-36.el7_6.2 libgomp.x86_64 0:4.8.5-36.el7_6.2
libstdc++.x86_64 0:4.8.5-36.el7_6.2
Complete!
Installing MongoDB 4 on CentOS 7:
MongoDB is not available in standard yum repositories. Therefore, we have to install MongoDB official yum repository on our CentOS 7 server and then we will be able to install MongoDB database.
Create a yum repository file in /etc/yum.repos.d directory.
[root@nodejs-01 ~]# vi /etc/yum.repos.d/mongodb.repo
and add following configurations therein.
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc
Build cache for MongoDB yum repository.
[root@nodejs-01 ~]# yum makecache fast
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp3.isra.edu.pk
* extras: ftp3.isra.edu.pk
* updates: ftp3.isra.edu.pk
base | 3.6 kB 00:00
extras | 3.4 kB 00:00
mongodb-org-4.0 | 2.5 kB 00:00
updates | 3.4 kB 00:00
mongodb-org-4.0/7/primary_db | 53 kB 00:00
Metadata Cache Created
Install MongoDB 4 on our CentOS 7 server using yum command.
[root@nodejs-01 ~]# yum install -y mongodb-org
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp3.isra.edu.pk
* extras: ftp3.isra.edu.pk
* updates: ftp3.isra.edu.pk
Resolving Dependencies
--> Running transaction check
---> Package mongodb-org.x86_64 0:4.0.11-1.el7 will be installed
--> Processing Dependency: mongodb-org-tools = 4.0.11 for package: mongodb-org-4.0.11-1.el7.x86_64
--> Processing Dependency: mongodb-org-shell = 4.0.11 for package: mongodb-org-4.0.11-1.el7.x86_64
--> Processing Dependency: mongodb-org-server = 4.0.11 for package: mongodb-org-4.0.11-1.el7.x86_64
--> Processing Dependency: mongodb-org-mongos = 4.0.11 for package: mongodb-org-4.0.11-1.el7.x86_64
--> Running transaction check
---> Package mongodb-org-mongos.x86_64 0:4.0.11-1.el7 will be installed
---> Package mongodb-org-server.x86_64 0:4.0.11-1.el7 will be installed
---> Package mongodb-org-shell.x86_64 0:4.0.11-1.el7 will be installed
---> Package mongodb-org-tools.x86_64 0:4.0.11-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
mongodb-org x86_64 4.0.11-1.el7 mongodb-org-4.0 5.8 k
Installing for dependencies:
mongodb-org-mongos x86_64 4.0.11-1.el7 mongodb-org-4.0 12 M
mongodb-org-server x86_64 4.0.11-1.el7 mongodb-org-4.0 21 M
mongodb-org-shell x86_64 4.0.11-1.el7 mongodb-org-4.0 13 M
mongodb-org-tools x86_64 4.0.11-1.el7 mongodb-org-4.0 46 M
Transaction Summary
================================================================================
Install 1 Package (+4 Dependent packages)
Total download size: 93 M
Installed size: 257 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/mongodb-org-4.0/packages/mongodb-org-4.0.11-1.el7.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID e52529d4: NOKEY
Public key for mongodb-org-4.0.11-1.el7.x86_64.rpm is not installed
(1/5): mongodb-org-4.0.11-1.el7.x86_64.rpm | 5.8 kB 00:01
(2/5): mongodb-org-mongos-4.0.11-1.el7.x86_64.rpm | 12 MB 00:18
(3/5): mongodb-org-server-4.0.11-1.el7.x86_64.rpm | 21 MB 00:42
(4/5): mongodb-org-shell-4.0.11-1.el7.x86_64.rpm | 13 MB 00:27
(5/5): mongodb-org-tools-4.0.11-1.el7.x86_64.rpm | 46 MB 00:46
--------------------------------------------------------------------------------
Total 1.0 MB/s | 93 MB 01:29
Retrieving key from https://www.mongodb.org/static/pgp/server-4.0.asc
Importing GPG key 0xE52529D4:
Userid : "MongoDB 4.0 Release Signing Key <packaging@mongodb.com>"
Fingerprint: 9da3 1620 334b d75d 9dcb 49f3 6881 8c72 e525 29d4
From : https://www.mongodb.org/static/pgp/server-4.0.asc
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mongodb-org-server-4.0.11-1.el7.x86_64 1/5
Created symlink from /etc/systemd/system/multi-user.target.wants/mongod.service to /usr/lib/systemd/system/mongod.service.
Installing : mongodb-org-shell-4.0.11-1.el7.x86_64 2/5
Installing : mongodb-org-tools-4.0.11-1.el7.x86_64 3/5
Installing : mongodb-org-mongos-4.0.11-1.el7.x86_64 4/5
Installing : mongodb-org-4.0.11-1.el7.x86_64 5/5
Verifying : mongodb-org-mongos-4.0.11-1.el7.x86_64 1/5
Verifying : mongodb-org-tools-4.0.11-1.el7.x86_64 2/5
Verifying : mongodb-org-shell-4.0.11-1.el7.x86_64 3/5
Verifying : mongodb-org-4.0.11-1.el7.x86_64 4/5
Verifying : mongodb-org-server-4.0.11-1.el7.x86_64 5/5
Installed:
mongodb-org.x86_64 0:4.0.11-1.el7
Dependency Installed:
mongodb-org-mongos.x86_64 0:4.0.11-1.el7
mongodb-org-server.x86_64 0:4.0.11-1.el7
mongodb-org-shell.x86_64 0:4.0.11-1.el7
mongodb-org-tools.x86_64 0:4.0.11-1.el7
Complete!
MongoDB database service ‘mongod.service’ is automatically enabled by the installer. We are only required to start MongoDB service once.
[root@nodejs-01 ~]# systemctl start mongod.service
MongoDB 4 has been installed on our CentOS 7 server.
Installing Node.js 10 on CentOS 7:
Node.js is not available in standard yum repositories. Therefore, we have to install Node.js official yum repository then we will be able to install Node.js.
Node.js provides a binary installer that installs Node.js yum repository. Therefore, download and execute that binary file as follows.
[root@nodejs-01 ~]# curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash -
## Installing the NodeSource Node.js 10.x repo...
## Inspecting system...
+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release
+ uname -m
## Confirming "el7-x86_64" is supported...
+ curl -sLf -o /dev/null 'https://rpm.nodesource.com/pub_10.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'
## Downloading release setup RPM...
+ mktemp
+ curl -sL -o '/tmp/tmp.8FUOG96Pkq' 'https://rpm.nodesource.com/pub_10.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm'
## Installing release setup RPM...
+ rpm -i --nosignature --force '/tmp/tmp.8FUOG96Pkq'
## Cleaning up...
+ rm -f '/tmp/tmp.8FUOG96Pkq'
## Checking for existing installations...
+ rpm -qa 'node|npm' | grep -v nodesource
## Run `sudo yum install -y nodejs` to install Node.js 10.x and npm.
## You may also need development tools to build native addons:
sudo yum install gcc-c++ make
## To install the Yarn package manager, run:
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo yum install yarn
Now, we have installed Node.js yum repository. Note down the commands to install Yarn package manager on CentOS 7. We will use these commands to install Yarn package manager later in this article.
Install Node.js 10 on our CentOS 7 server using yum command.
[root@nodejs-01 ~]# yum install -y nodejs
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp3.isra.edu.pk
* extras: ftp3.isra.edu.pk
* updates: ftp3.isra.edu.pk
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 2:10.16.0-1nodesource will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
nodejs x86_64 2:10.16.0-1nodesource nodesource 19 M
Transaction Summary
================================================================================
Install 1 Package
Total download size: 19 M
Installed size: 56 M
Downloading packages:
nodejs-10.16.0-1nodesource.x86_64.rpm | 19 MB 00:43
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 2:nodejs-10.16.0-1nodesource.x86_64 1/1
Verifying : 2:nodejs-10.16.0-1nodesource.x86_64 1/1
Installed:
nodejs.x86_64 2:10.16.0-1nodesource
Complete!
Verify version of Node.js and relevant libraries.
[root@nodejs-01 ~]# npm version
{ npm: '6.9.0',
ares: '1.15.0',
brotli: '1.0.7',
cldr: '35.1',
http_parser: '2.8.0',
icu: '64.2',
modules: '64',
napi: '4',
nghttp2: '1.34.0',
node: '10.16.0',
openssl: '1.1.1b',
tz: '2019a',
unicode: '12.1',
uv: '1.28.0',
v8: '6.8.275.32-node.52',
zlib: '1.2.11' }
Node.js 10 has been installed on our CentOS 7 server.
npm, the Node.js package manager, is also installed with Node.js. We can use npm to install rest of the components of MEAN stack.
Installing Yarn Package Manager on CentOS 7:
Yarn is a package manager for front-end applications. It is a replacement of Bower package manager, that was used in previous versions of MEAN stack.
Install Yarn official yum repository as follows.
[root@nodejs-01 ~]# curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
[yarn]
name=Yarn Repository
baseurl=https://dl.yarnpkg.com/rpm/
enabled=1
gpgcheck=1
gpgkey=https://dl.yarnpkg.com/rpm/pubkey.gpg
Install Yarn using yum command.
[root@nodejs-01 ~]# yum install -y yarn
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp3.isra.edu.pk
* extras: ftp3.isra.edu.pk
* updates: ftp3.isra.edu.pk
yarn | 2.9 kB 00:00
yarn/primary_db | 20 kB 00:00
Resolving Dependencies
--> Running transaction check
---> Package yarn.noarch 0:1.17.3-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
yarn noarch 1.17.3-1 yarn 1.2 M
Transaction Summary
================================================================================
Install 1 Package
Total download size: 1.2 M
Installed size: 5.1 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/yarn/packages/yarn-1.17.3-1.noarch.rpm: Header V4 RSA/SHA512 Signature, key ID 6963f07f: NOKEY
Public key for yarn-1.17.3-1.noarch.rpm is not installed
yarn-1.17.3-1.noarch.rpm | 1.2 MB 00:04
Retrieving key from https://dl.yarnpkg.com/rpm/pubkey.gpg
Importing GPG key 0x6963F07F:
Userid : "Yarn RPM Packaging <yarn@dan.cx>"
Fingerprint: 9a6f 73f3 4beb 7473 4d8c 6914 9cbb b558 6963 f07f
From : https://dl.yarnpkg.com/rpm/pubkey.gpg
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : yarn-1.17.3-1.noarch 1/1
Verifying : yarn-1.17.3-1.noarch 1/1
Installed:
yarn.noarch 0:1.17.3-1
Complete!
Installing Gulp Task Scheduler on CentOS 7:
Gulp is a JavaScript task scheduler. Gulp is required by Node.js and we can install it using npm command.
[root@nodejs-01 ~]# npm install -g gulp
/usr/bin/gulp -> /usr/lib/node_modules/gulp/bin/gulp.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/gulp/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ gulp@4.0.2
added 314 packages from 217 contributors in 67.397s
Installing MEAN Stack on CentOS 7:
Download latest version of MEAN stack from GitHub using git command.
[root@nodejs-01 ~]# cd /tmp
[root@nodejs-01 tmp]# git clone https://github.com/linnovate/mean
Cloning into 'mean'...
remote: Enumerating objects: 16743, done.
remote: Total 16743 (delta 0), reused 0 (delta 0), pack-reused 16743
Receiving objects: 100% (16743/16743), 8.04 MiB | 415.00 KiB/s, done.
Resolving deltas: 100% (9154/9154), done.
Switch to /tmp/mean directory and install MEAN stack on our CentOS 7 server using npm command.
[root@nodejs-01 tmp]# cd /tmp/mean
[root@nodejs-01 mean]# npm install
npm WARN deprecated @angular/http@6.1.10: Switch to @angular/common/http - see https://angular.io/guide/http
npm WARN deprecated core-js@2.5.7: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
npm WARN deprecated joi@13.7.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated istanbul@0.4.5: This module is no longer maintained, try this instead:
npm WARN deprecated npm i nyc
npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.
npm WARN deprecated topo@3.0.3: This module has moved and is now available at @hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated hoek@5.0.4: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated hoek@6.1.3: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
> node-sass@4.12.0 install /tmp/mean/node_modules/node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.12.0/linux-x64-64_binding.node
Download complete ] - :
Binary saved to /tmp/mean/node_modules/node-sass/vendor/linux-x64-64/binding.node
Caching binary to /root/.npm/node-sass/4.12.0/linux-x64-64_binding.node
> bcrypt@3.0.6 install /tmp/mean/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
[bcrypt] Success: "/tmp/mean/node_modules/bcrypt/lib/binding/bcrypt_lib.node" is installed via remote
> node-sass@4.12.0 postinstall /tmp/mean/node_modules/node-sass
> node scripts/build.js
Binary found at /tmp/mean/node_modules/node-sass/vendor/linux-x64-64/binding.node
Testing binary
Binary is fine
> nodemon@1.19.1 postinstall /tmp/mean/node_modules/nodemon
> node bin/postinstall || exit 0
Love nodemon? You can now support the project via the open collective:
> https://opencollective.com/nodemon/donate
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN karma-jasmine-html-reporter@1.1.0 requires a peer of jasmine@>=3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 1352 packages from 1431 contributors and audited 47449 packages in 233.363s
found 2 low severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
Installer found some known security vulnerabilities in packages. We are fixing them as proposed by the above command.
[root@nodejs-01 mean]# npm audit fix
npm WARN karma-jasmine-html-reporter@1.1.0 requires a peer of jasmine@>=3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
up to date in 10.718s
fixed 0 of 2 vulnerabilities in 47449 scanned packages
2 package updates for 2 vulns involved breaking changes
(use `npm audit fix --force` to install breaking changes; or refer to `npm audit` for steps to fix these manually)
Not all security vulnerabilities can be automatically fixed by audit command. We are required to review and fixed some of them manually.
Allow MEAN stack service port in Linux firewall.
[root@nodejs-01 ~]# firewall-cmd --permanent --add-port=4040/tcp
success
[root@nodejs-01 ~]# firewall-cmd --reload
success
Check installed packages using following command.
[root@nodejs-01 mean]# npm list --depth=0
mean@2.0.2 /tmp/mean
âââ @angular-devkit/build-angular@0.7.5
âââ @angular/animations@6.1.10
âââ @angular/cdk@6.4.7
âââ @angular/cli@6.2.9
âââ @angular/common@6.1.10
âââ @angular/compiler@6.1.10
âââ @angular/compiler-cli@6.1.10
âââ @angular/core@6.1.10
âââ @angular/flex-layout@6.0.0-beta.18
âââ @angular/forms@6.1.10
âââ @angular/http@6.1.10
âââ @angular/language-service@6.1.10
âââ @angular/material@6.4.7
âââ @angular/platform-browser@6.1.10
âââ @angular/platform-browser-dynamic@6.1.10
âââ @angular/router@6.1.10
âââ @types/jasmine@2.8.16
âââ @types/jasminewd2@2.0.6
âââ @types/node@10.3.6
âââ angular-pipes@8.1.1
âââ angular-tree-component@7.2.1
âââ bcrypt@3.0.6
âââ body-parser@1.19.0
âââ codelyzer@4.3.0
âââ compression@1.7.4
âââ concurrently@3.6.1
âââ cookie-parser@1.4.4
âââ core-js@2.5.7
âââ cors@2.8.5
âââ dotenv@6.2.0
âââ events@3.0.0
âââ express@4.17.1
âââ express-async-handler@1.1.4
âââ express-jwt@5.3.1
âââ express-validation@1.0.2
âââ formidable@1.2.1
âââ helmet@3.20.0
âââ http-errors@1.7.3
âââ UNMET PEER DEPENDENCY jasmine@>=3
âââ jasmine-core@3.1.0
âââ jasmine-spec-reporter@4.2.1
âââ joi@13.7.0
âââ jsonwebtoken@8.5.1
âââ karma@3.1.4
âââ karma-chrome-launcher@2.2.0
âââ karma-coverage-istanbul-reporter@2.0.1
âââ karma-jasmine@1.1.2
âââ karma-jasmine-html-reporter@1.1.0
âââ method-override@2.3.10
âââ mongoose@5.6.7
âââ morgan@1.9.1
âââ ng2-dragula@1.5.0
âââ nodemon@1.19.1
âââ passport@0.4.0
âââ passport-jwt@4.0.0
âââ passport-local@1.0.0
âââ protractor@5.4.2
âââ rxjs@6.2.0
âââ rxjs-compat@6.5.2
âââ swagger-ui-express@3.0.10
âââ ts-node@6.1.2
âââ tslint@5.10.0
âââ typescript@2.9.2
âââ webpack-dev-server@3.7.2
âââ zone.js@0.8.26
Testing MEAN Stack on CentOS 7:
To test our MEAN stack configurations, we are running a sample application as follows.
[root@nodejs-01 mean]# cd /tmp/mean
[root@nodejs-01 mean]# cp .env.example .env
[root@nodejs-01 mean]# npm start
> mean@2.0.2 start /tmp/mean
> concurrently -c "yellow.bold,green.bold" -n "SERVER,BUILD" "nodemon server" "ng build --watch"
[SERVER] [nodemon] 1.19.1
[SERVER] [nodemon] to restart at any time, enter `rs`
[SERVER] [nodemon] watching: *.*
[SERVER] [nodemon] starting `node server`
[SERVER] ../../dist/
[SERVER] (node:7803) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
[SERVER] server started on port 4040 (development)
[SERVER] (node:7803) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
[BUILD]
[BUILD] Date: 2019-07-31T16:21:26.793Z
[BUILD] Hash: e51cc472579f782c888b
[BUILD] Time: 28886ms
[BUILD] chunk {main} main.js, main.js.map (main) 78.5 kB [initial] [rendered]
[BUILD] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 241 kB [initial] [rendered]
[BUILD] chunk {runtime} runtime.js, runtime.js.map (runtime) 5.22 kB [entry] [rendered]
[BUILD] chunk {styles} styles.js, styles.js.map (styles) 102 kB [initial] [rendered]
[BUILD] chunk {vendor} vendor.js, vendor.js.map (vendor) 7.01 MB [initial] [rendered]
[SERVER] [nodemon] restarting due to changes...
[SERVER] [nodemon] restarting due to changes...
[SERVER] [nodemon] restarting due to changes...
[SERVER] [nodemon] restarting due to changes...
[SERVER] [nodemon] restarting due to changes...
[SERVER] [nodemon] starting `node server`
[SERVER] ../../dist/
[SERVER] (node:7838) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
[SERVER] server started on port 4040 (development)
[SERVER] (node:7838) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
Browse URL http://nodejs-01.example.com:4040 in a client's browser.
MEAN Stack is successfully installed on CentOS 7 server.
very nice Article!
ReplyDeleteCould you please write on next steps to learn mean stack ?
Thanks for appreciation.
DeleteI honor your request but this blog is about system administration of Linux servers.
If you want to learn MEAN stack then please read the recommended book in the above article.