Installation Guide Ubuntu 16.04

Beside the installation guide on the main page, here is a guide to install GenieACS off a freshly installed Ubuntu 16.04 LTS.

Prequisites and basic components

First you should update all components and install the following perquisites

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install redis-server mongodb npm build-essential ruby-bundler ruby-dev libsqlite3-dev
cd ~
curl -sL https://deb.nodesource.com/setup_7.x -o nodesource_setup.sh
chmod +x nodesource_setup.sh
sudo ./nodesource_setup.sh
sudo apt-get install nodejs
sudo npm install libxmljs

Install GenieACS itself

I installed GenieACS into my home directory.

sudo npm install -g genieacs

Next GenieACS-GUI

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install redis-server mongodb npm build-essential ruby-bundler ruby-dev libsqlite3-dev
cd ~
curl -sL https://deb.nodesource.com/setup_7.x -o nodesource_setup.sh
chmod +x nodesource_setup.sh
sudo ./nodesource_setup.sh
sudo apt-get install nodejs
sudo npm install libxmljs
git clone https://github.com/zaidka/genieacs-gui
cd genieacs-gui/
bundle

Create the config files

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
rake db:migrate
cd ..

And now make some files to start and stop all files in a TMUX Session

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-cwmp' 'C-m'  tmux split-window  tmux send-keys 'genieacs-nbi' 'C-m'  tmux split-window  tmux send-keys '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  echo "GenieACS has been stopped." else  echo "GenieACS is not running!" fi EOF chmod +x genieacs-start.sh genieacs-stop.sh

After all those steps GenieACS and it's GUI should be installed properly and is ready for the first start.

./genieacs-start.sh
tmux attach -t genieacs

转载于:https://www.cnblogs.com/hester/p/10450075.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值