Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install GenieACS on Ubuntu 14.04
#!/bin/sh
set -e
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo add-apt-repository -y ppa:chris-lea/redis-server
sudo add-apt-repository -y ppa:chris-lea/node.js
sudo apt-add-repository -y ppa:brightbox/ruby-ng
sudo apt-get -qq update
sudo apt-get -y install tmux mongodb-org redis-server nodejs ruby2.1 ruby2.1-dev git build-essential libsqlite3-dev
sudo npm install -g coffee-script
sudo npm install -g nodemon
sudo gem install rails --no-ri --no-rdoc
sudo chmod -R 777 ./tmp
#GenieACS
git clone https://github.com/zaidka/genieacs.git
cd genieacs/
npm install
npm run configure
npm run compile
cd ..
#GenieACS GUI
git clone https://github.com/zaidka/genieacs-gui
cd genieacs-gui/
bundle
cp config/summary_parameters-sample.yml config/summary_parameters.yml
cp config/index_parameters-sample.yml config/index_parameters.yml
cp config/parameter_renderers-sample.yml config/parameter_renderers.yml
cp config/parameters_edit-sample.yml config/parameters_edit.yml
cp config/roles-sample.yml config/roles.yml
cp config/users-sample.yml config/users.yml
cp config/graphs-sample.json.erb config/graphs.json.erb
cd ..
cat << EOF > ./genieacs-start.sh
#!/bin/sh
if tmux has-session -t 'genieacs'; then
echo "GenieACS is already running."
echo "To stop it use: ./genieacs-stop.sh"
echo "To attach to it use: tmux attach -t genieacs"
else
tmux new-session -s 'genieacs' -d
tmux send-keys './genieacs/bin/genieacs-cwmp' 'C-m'
tmux split-window
tmux send-keys './genieacs/bin/genieacs-nbi' 'C-m'
tmux split-window
tmux send-keys './genieacs/bin/genieacs-fs' 'C-m'
tmux split-window
tmux send-keys 'cd genieacs-gui' 'C-m'
tmux send-keys 'rails server' 'C-m'
tmux select-layout tiled 2>/dev/null
tmux rename-window 'GenieACS'
echo "GenieACS has been started in tmux session 'geneiacs'"
echo "To attach to session, use: tmux attach -t genieacs"
echo "To switch between panes use Ctrl+B-ArrowKey"
echo "To deattach, press Ctrl+B-D"
echo "To stop GenieACS, use: ./genieacs-stop.sh"
fi
EOF
cat << EOF > ./genieacs-stop.sh
#!/bin/sh
if tmux has-session -t 'genieacs' 2>/dev/null; then
tmux kill-session -t genieacs 2>/dev/null
echo "GenieACS has been stopped."
else
echo "GenieACS is not running!"
fi
EOF
chmod +x genieacs-start.sh genieacs-stop.sh
echo
echo "DONE!"
echo "GenieACS has been sucessfully installed. Start/stop it using the following commands:"
echo "./genieacs-start.sh"
echo "./genieacs-stop.sh"
@stefanmarti
Copy link

stefanmarti commented Jun 17, 2015

nice quick-start script for genieacs on ubuntu, but you should also add zlib1g-dev to the package list. without it it's not possible to building libxml2.

@andsch
Copy link

andsch commented Oct 16, 2015

based on a fresh Ubuntu Server 14.04.3 LTS i had to

> apt-get install git build-essential zlib1g-dev libxslt-dev libsqlite3-dev

to get this script running without Errors

@ShampieAtGitHub
Copy link

ShampieAtGitHub commented Oct 22, 2015

Having a problem with this script on Ubuntu 15:

W: Failed to fetch http://ppa.launchpad.net/chris-lea/node.js/ubuntu/dists/vivid/main/binary-i386/Packages 404 Not Found

@karimrok
Copy link

karimrok commented Oct 30, 2015

im new to Ubuntu but i think i start to understand and i want to thank you all

@mando1985
Copy link

mando1985 commented Nov 4, 2015

tled
im new to Ubuntu
This shows at inauguration

Fetching: activejob-4.2.4.gem (100%)
Successfully installed activejob-4.2.4
Fetching: actionmailer-4.2.4.gem (100%)
Successfully installed actionmailer-4.2.4
Fetching: thor-0.19.1.gem (100%)
Successfully installed thor-0.19.1
Fetching: railties-4.2.4.gem (100%)
Successfully installed railties-4.2.4
Fetching: bundler-1.10.6.gem (100%)
Successfully installed bundler-1.10.6
Fetching: sprockets-3.4.0.gem (100%)
Successfully installed sprockets-3.4.0
Fetching: sprockets-rails-3.0.0.beta2.gem (100%)
Successfully installed sprockets-rails-3.0.0.beta2
Fetching: rails-4.2.4.gem (100%)
Successfully installed rails-4.2.4
32 gems installed
chmod: cannot access â./tmpâ: No such file or directory
mando@ubuntu:$ sudo chmod -R 777 ./tmp
[sudo] password for mando:
chmod: cannot access â./tmpâ: No such file or directory
mando@ubuntu:
$

chmod: cannot access â./tmpâ: No such file or directory

@bigcraig
Copy link

bigcraig commented Jun 4, 2016

Just add a tmp directory below where you are running the script, other than that worked fine for me on Ubuntu 14.04.4
thanks @AllenMc for the script

@ibrahimelsawy
Copy link

ibrahimelsawy commented Jul 20, 2016

i am using Ubuntu 14.0.4 TLS server 32 bit and i applied above steps and i a facing below problem
capture

@Vozglobal
Copy link

Vozglobal commented Aug 1, 2016

Hello
I'm trying script with both versions of Ubuntu 14.04, 32 and 64 bit, and leave the following error
ERROR: Error installing rails:
activesupport requires Ruby version >= 2.2.2.

@Alex198213
Copy link

Alex198213 commented Sep 9, 2016

Need to update the script and change
sudo apt-get -y install tmux mongodb-org redis-server nodejs ruby2.1 ruby2.1-dev git build-essential libsqlite3-dev
by
sudo apt-get -y install tmux mongodb-org redis-server nodejs ruby2.3 ruby2.3-dev git build-essential libsqlite3-dev

ruby2.1 is too old version and not compatible with activesupport: installation will failed

@kimsonson
Copy link

kimsonson commented Sep 26, 2017

I also got this problem.
~/work/source$ ./genieacs-start.sh
failed to connect to server
arranging in: tiled
GenieACS has been started in tmux session 'geneiacs'
To attach to session, use: tmux attach -t genieacs
To switch between panes use Ctrl+B-ArrowKey
To deattach, press Ctrl+B-D
To stop GenieACS, use: ./genieacs-stop.sh

Can you help me to solve this problem? Thank you!

Copy link

ghost commented Feb 27, 2018

Install script on Ubuntu 16.04. I use it to install on my machine.

#!/bin/sh
set -e

sudo apt-get -q update
sudo apt-get -y install python build-essential checkinstall tmux mongodb ruby2.3 ruby2.3-dev git zlib1g-dev libsqlite3-dev

###Nodejs
#download
if ( ! test -e node-v9.6.1.tar.xz -a -e node-v9.6.1 ); then
rm -f node-v9.6.1.tar.xz
rm -rf node-v9.6.1
wget https://nodejs.org/download/release/v9.6.1/node-v9.6.1.tar.xz
tar -xvf node-v9.6.1.tar.xz
fi

#make .deb
if ( ! test -e node_9.6.1-1_amd64.deb ); then
cd node-v9.6.1
./configure
CPUS=$(grep -c ^processor /proc/cpuinfo | sed 's/^0$/1/')
make -j $CPUS
fakeroot checkinstall -y --pakdir=../ --install=no --fstrans=yes --pkgversion=9.6.1
cd ..
fi
sudo dpkg -i node_9.6.1-1_amd64.deb

sudo npm install -g coffee-script
sudo npm install -g nodemon
sudo gem install rails --no-ri --no-rdoc

if [ -e tmp ]; then
rm -rf tmp
fi
sudo mkdir -p tmp
sudo chmod -R 777 tmp

#GenieACS
git clone https://github.com/zaidka/genieacs.git
cd genieacs/
npm install
npm run configure
npm run compile
cd ..

#GenieACS GUI
git clone https://github.com/zaidka/genieacs-gui
cd genieacs-gui/
bundle
cp config/summary_parameters-sample.yml config/summary_parameters.yml
cp config/index_parameters-sample.yml config/index_parameters.yml
cp config/parameter_renderers-sample.yml config/parameter_renderers.yml
cp config/parameters_edit-sample.yml config/parameters_edit.yml
cp config/roles-sample.yml config/roles.yml
cp config/users-sample.yml config/users.yml
cp config/graphs-sample.json.erb config/graphs.json.erb
bin/rails db:migrate RAILS_ENV=development
cd ..

cat << EOF > ./genieacs-start.sh
#!/bin/sh
if tmux has-session -t 'genieacs'; then
echo "GenieACS is already running."
echo "To stop it use: ./genieacs-stop.sh"
echo "To attach to it use: tmux attach -t genieacs"
else
tmux new-session -s 'genieacs' -d
tmux send-keys './genieacs/bin/genieacs-cwmp' 'C-m'
tmux split-window
tmux send-keys './genieacs/bin/genieacs-nbi' 'C-m'
tmux split-window
tmux send-keys './genieacs/bin/genieacs-fs' 'C-m'
tmux split-window
tmux send-keys 'cd genieacs-gui' 'C-m'
tmux send-keys 'rails server -b 0.0.0.0' 'C-m'
tmux select-layout tiled 2>/dev/null
tmux rename-window 'GenieACS'

echo "GenieACS has been started in tmux session 'geneiacs'"
echo "To attach to session, use: tmux attach -t genieacs"
echo "To switch between panes use Ctrl+B-ArrowKey"
echo "To deattach, press Ctrl+B-D"
echo "To stop GenieACS, use: ./genieacs-stop.sh"
fi
EOF

cat << EOF > ./genieacs-stop.sh
#!/bin/sh
if tmux has-session -t 'genieacs' 2>/dev/null; then
tmux kill-session -t genieacs 2>/dev/null
killall ruby2.3
echo "GenieACS has been stopped."
else
echo "GenieACS is not running!"
fi
EOF

chmod +x genieacs-start.sh genieacs-stop.sh
sudo chown -R $USER:$(id -gn $USER) ~/.config

echo
echo "DONE!"
echo "GenieACS has been sucessfully installed. Start/stop it using the following commands:"
echo "./genieacs-start.sh"
echo "./genieacs-stop.sh"

@morilloalee
Copy link

morilloalee commented May 14, 2018

Hi,

I followed the instructions using the last script of this timeline in my local server with ubuntu 14.04. Well, apparently all that was good but i can´t do connect my devices with GenieACS.

i have this messages running: tmux attach -t genieacs
image

Anybody here who knows what my problem would be?
Any information about the XML SOAP message firmeware in the device?

@holloo
Copy link

holloo commented May 6, 2019

Hi,

I try to install the GenieACS according to script of PetroPliuta but I get the following error:

rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:
Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for: ...

What should I do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment