-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit-feathers-setup.bsh
53 lines (42 loc) · 2.17 KB
/
init-feathers-setup.bsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#! /bin/bash
# init-feathers-setup.bsh last update: 2019-02-11
# script to initally build your feathers environment
#
# you may need to run "[sudo] yum --assumeyes install git;" or "[sudo] yum --assumeyes install wget;"
# to use github.
#
FEATHERS_PORT=3030 ;
if [ '${$(groups)/sudo}' ] ;
then SUDO='sudo' ;
elif [ '${$(whoami)/root' ] ;
then echo SUDO='';
else
echo 'you either need to be have sudo or be logged in as root!';
exit;
fi;
## initial installation:
${SUDO} yum --assumeyes update; ## a good idea to start out with.
${SUDO} yum --assumeyes install bind-utils ; ## for the 'dig' command
${SUDO} yum --assumeyes install expect ; ## for the six feathers generate commands.
${SUDO} yum --assumeyes install firewalld ; ## firewall
${SUDO} systemctl start firewalld ;
${SUDO} systemctl enable firewalld ; ## for next reboot
${SUDO} systemctl status firewalld ; ## double-check firewall
${SUDO} firewall-cmd --zone=public --add-port=${FEATHERS_PORT}/tcp --permanent ; ## open feathers port
${SUDO} firewall-cmd --reload; ## make the new port opening permanent.
## node/npm installation:
## https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora
#### ${SUDO} curl --silent --location https://rpm.nodesource.com/setup_10.x | ${SUDO} bash - ; ## 2021-12-04
#### ${SUDO} yum --assumeyes install nodejs ; ## 2021-12-04
dnf --assumeyes module install nodejs:16 ; ## 2021-12-04
${SUDO} npm --global update npm ; ## update to latest version
## feathers-cli installation:
${SUDO} npm install --global @feathersjs/cli ; ## https://google.com/feathersjs/cli
which feathers; ## /usr/bin/feathers
#
#
echo -n 'node version: ' ; node --version ; ## 8.15.0 at the time of this writing
echo -n 'npm version: ' ; npm --version ; ## 6.7.0 at the time of this writing
echo -n 'feathers version: ' ; feathers --version ; ## 3.9.0 at the time of this writing
#
#