Here is the information on how to set up the mongodb official yum repo: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/
And the node.js official yum repo: https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora On Wed, Mar 8, 2017 at 11:25 AM, Michael Ducharme <[email protected]> wrote: > Hi Rene, > > We use GenieACS on Centos 7. We used the official node.js repository and > it worked fine. Also the problem is that you are installing genieacs from > npm which is an old version, so there is a mismatch with the gui version. > You should use genieacs current version from github rather than installing > the older version in the npm repository. > > This is the procedure we used, if it is helpful. We actually used node.js > 7.5.0 and it works fine, but the official recommendation I realize is for > 6.x. > > - Installed mongodb 3.4.0 from mongodb official repo > then start mongodb > systemctl start mongod > > had to add a fix to create the pid folder in /var/run otherwise mongod > cannot start after reboot since the pid folder disappears in tempfs > > - Installed node.js 7.5.0 from node.js official repo > > useradd genieacs > su - genieacs > - Installed and configured rbenv (ruby environment) from source AS > GENIEACS USER > https://www.digitalocean.com/community/tutorials/how-to- > install-ruby-on-rails-with-rbenv-on-centos-7 > We used that except we installed ruby 2.4.0 instead of 2.2.1, and > rails 5.0.1 instead of rails 4.2.0 > > Then, still as the genieacs user: > > git clone https://github.com/zaidka/genieacs > > git clone https://github.com/zaidka/genieacs-gui > > Then, log out of genieacs user (back in as root) > > npm install -g coffee > npm install -g coffee-script > npm install -g --unsafe-perm libxmljs > npm install -g node-gyp > npm install -g redis > npm install -g redis-server > > yum install redis > > cd /home/genieacs/genieacs > npm install -g --unsafe-perm > > chown -R genieacs:genieacs /usr/lib/node_modules/genieacs > > mkdir /var/log/genieacs > chown genieacs:genieacs /var/log/genieacs > > mkdir /opt/genieacs-gui > chown genieacs:genieacs /opt/genieacs-gui > > Then go back in as genieacs user: > > su - genieacs > cp -R /home/genieacs-gui /opt/genieacs-gui > > cd /opt/genieacs-gui > cp config/graphs-sample.json.erb config/graphs.json.erb > cp config/index_parameters-sample.yml config/index_parameters.yml > cp config/summary_parameters-sample.yml config/summary_parameters.yml > cp config/parameters_edit-sample.yml config/parameters_edit.yml > cp config/parameter_renderers-sample.yml config/parameter_renderers.yml > cp config/roles-sample.yml config/roles.yml > cp config/users-sample.yml config/users.yml > > bundle update json > bundle exec rake db:migrate RAILS_ENV=development > bundle > > Then, create script to start genieacs (/home/genieacs/start-genieacs.sh): > > #!/bin/bash > /bin/redis-server > /var/log/genieacs/redis-server.log 2>&1 & > /bin/genieacs-cwmp > /var/log/genieacs/genieacs-cwmp.log 2>&1 & > /bin/genieacs-nbi > /var/log/genieacs/genieacs-nbi.log 2>&1 & > /bin/genieacs-fs > /var/log/genieacs/genieacs-fs.log 2>&1 & > > Then create script to start genieacs-gui > (/home/genieacs/start-genieacs-gui/sh): > > > #!/bin/bash > cd /opt/genieacs-gui > rails server -b 0.0.0.0 > /var/log/genieacs/genieacs-gui.log 2>&1 & > > to fix error in activesupport (key error must be 32 bytes) do the > following: > > cd */home/genieacs/*.rbenv/versions/2.4.0/lib/ruby/gems/ > 2.4.0/gems/activesupport-5.0.0/lib/active_support > vi key_generator.rb > > Make the following changes: > line 20: > - def generate_key(salt, key_size = 64) > + def generate_key(salt, key_size=32) > > line 35 and 36: > - def generate_key(*args) > - @cache_keys[args.join] ||= @key_generator.generate_key(*args) > + def generate_key(salt, key_size=32) > + @cache_keys["#{salt}#{key_size}"] ||= @key_generator.generate_key(salt, > key_size) > > now, for SSL: > > https://github.com/zaidka/genieacs/wiki/GenieACS-SSL > > Create certificate and key > openssl genrsa 1024 > key.pem > openssl req -new -x509 -days 3650 -key key.pem > cert.pem > > Copy cert.pem and key.pem to /usr/local/node_modules/genieacs/config > directory > > In config directory create symlinks cwmp.crt -> cert.pem and cwmp.key -> > key.pem > > In config directory edit config.json > > change CWMP_SSL to true > > Change FS_IP to reachable valid IP address (used for file server) > > CPE auth: > > In config folder, cp auth-sample.js auth.js > vi auth.js > Make up simple username/password in auth.js (ex mycpe/mycpepass) > > On Wed, Mar 8, 2017 at 7:33 AM, Rene Benner <[email protected]> wrote: > >> So.. As per the discussion on Github, I’ve managed to install most of the >> GenieACS software now, With dirty hacks here and there that probably breaks >> stuff. >> What is the exact software I would need for installing it in it’s most >> stable shape? Do I ‘REALLY’ need to use NVM to get node 4.0.0 installed? >> >> As it is, With version v6+ of Node, LibXMLjs seems to break. So >> installing it through a local package.json override to a specific version >> is a possibility.. Or installing like so: >> >> #npm install node-gyp -g >> #npm install [email protected] -g >> #npm install bson -g >> #npm install mongodb -g >> #npm install genieacs -g --ignore-scripts >> #cd /usr/lib/node_modules/genieacs >> #npm link libxmljs >> #npm link bson >> #npm link mongodb >> #npm install genieacs -g >> >> >> This is in fact rather dirty, As the install scripts first get skipped, >> so I can link libxmljs to it’s nested modules (Rendering it away from >> source once again) >> >> >> I don’t quite see a neater approach other than handling specific versions >> of node.. Does anyone have a proper resolve for this? >> >> >> >> FYI, My full installation cycle attached that gets things to work >> somewhat. After installation I still suffer from tabs in the webinterface >> that are not working as expected (provisions for example. Error below.) >> >> ``` >> Pre: >> #docker run -p 3000:3000 -it centos /bin/bash >> >> In container: >> >> #setenforce 0 >> #yum -y install epel-release centos-release-scl >> #yum-config-manager --enable rhel-server-rhscl-7-rpms >> #yum -y install make gcc gcc-c++ epel-release npm redis mongodb-server >> git zlib-devel libxml2-devel sqlite-devel sudo rh-ruby22* rh-passenger40 >> rh-passenger40-ruby22 nginx16 >> #npm cache clean >> #npm install node-gyp -g >> #npm install [email protected] -g >> #npm install bson -g >> #npm install mongodb -g >> #npm install genieacs -g --ignore-scripts >> #cd /usr/lib/node_modules/genieacs >> #npm link libxmljs >> #npm link bson >> #npm link mongodb >> #npm install genieacs -g >> #cd /opt >> #git clone https://github.com/zaidka/genieacs-gui.git >> #cd genieacs-gui >> #cp config/graphs-sample.json.erb config/graphs.json.erb >> #cp config/index_parameters-sample.yml config/index_parameters.yml >> #cp config/summary_parameters-sample.yml config/summary_parameters.yml >> #cp config/parameters_edit-sample.yml config/parameters_edit.yml >> #cp config/parameter_renderers-sample.yml config/parameter_renderers.yml >> #cp config/roles-sample.yml config/roles.yml >> #cp config/users-sample.yml config/users.yml >> #echo 'source scl_source enable rh-ruby22' > /etc/profile.d/ruby23.sh >> #echo 'source scl_source enable rh-passenger40' > >> /etc/profile.d/passenger40.sh >> #echo 'source scl_source enable httpd24' > /etc/profile.d/httpd24.sh >> #echo 'source scl_source enable nginx16' > /etc/profile.d/nginx16.sh >> #scl enable rh-ruby22 rh-passenger40 bash >> #bin/bundle >> #bin/rails db:migrate RAILS_ENV=development >> #bin/rails server -b 0.0.0.0 >> >> ``` >> >> >> >> And finally the error I stumble on with the tabs that simply do not work. >> >> >> Started GET "/provisions" for **REDACTED** at 2017-03-08 15:22:14 +0000 >> Cannot render console from **REDACTED**! Allowed networks: 127.0.0.1, >> ::1, 127.0.0.0/127.255.255.255 >> Processing by ProvisionsController#index as HTML >> Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.0ms) >> >> >> >> JSON::ParserError (795: unexpected token at 'Not Found'): >> >> app/controllers/provisions_controller.rb:24:in `find_provisions' >> app/controllers/provisions_controller.rb:35:in `block in index' >> app/controllers/application_controller.rb:40:in `can?' >> app/controllers/provisions_controller.rb:30:in `index' >> Rendering /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/actionpack- >> 5.0.0/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb >> within rescues/layout >> Rendering /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/actionpack- >> 5.0.0/lib/action_dispatch/middleware/templates/rescues/_source.html.erb >> Rendered /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/actionpack- >> 5.0.0/lib/action_dispatch/middleware/templates/rescues/_source.html.erb >> (10.1ms) >> Rendering /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/actionpack- >> 5.0.0/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb >> Rendered /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/actionpack- >> 5.0.0/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb >> (1.9ms) >> Rendering /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/actionpack- >> 5.0.0/lib/action_dispatch/middleware/templates/rescues/_ >> request_and_response.html.erb >> Rendered /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/actionpack- >> 5.0.0/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb >> (0.7ms) >> Rendered /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/actionpack- >> 5.0.0/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb >> within rescues/layout (27.5ms) >> >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.genieacs.com/mailman/listinfo/users >> > >
_______________________________________________ Users mailing list [email protected] http://lists.genieacs.com/mailman/listinfo/users
