Installation Guide Ubuntu 16.04
Posted 风清扬001
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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
以上是关于Installation Guide Ubuntu 16.04的主要内容,如果未能解决你的问题,请参考以下文章