Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Installing dependencies
- cd /usr/ports/databases/postgresql93-server/
- make install clean
- cd /usr/ports/databases/postgis20
- make install clean
- cd /usr/ports/databases/mongodb
- make install clean
- cd /usr/ports/devel/py-virtualenv
- make install clean
- cd /usr/ports/net-mgmt/libsmi
- make install clean
- cd /usr/ports/www/nginx
- make install clean
- cd /usr/ports/devel/mercurial
- make install clean
- ## Getting NOC
- hg clone http://bitbucket.org/nocproject/noc noc
- ## Vitualenv
- virtualenv --no-site-packages /opt/noc
- ## Add user & group noc
- pw groupadd -n noc
- pw useradd -g noc -s /bin/sh -d /home/noc -n noc
- ## Database setup
- echo "postgresql_enable="YES"" >> /etc/rc.conf
- echo "postgresql_data="/var/db/pgsql/data"" >> /etc/rc.conf
- echo "mongod_enable="YES"" >> /etc/rc.conf
- echo "mongod_dbpath="/var/db/mongo"" >> /etc/rc.conf
- mkdir /var/db/pgsql
- mkdir /var/db/pgsql/data
- chown -R pgsql:pgsql /var/db/pgsql/
- chmod -R 750 /var/db/pgsql/
- /usr/local/etc/rc.d/postgresql initdb
- /usr/local/etc/rc.d/postgresql start
- /usr/local/etc/rc.d/mongod start
- su - pgsql
- psql template1
- CREATE USER noc SUPERUSER ENCRYPTED PASSWORD '50921jtu';
- CREATE DATABASE noc ENCODING 'UTF8' OWNER noc;
- \q
- mongo
- use noc
- db.addUser("noc", "50921jtu")
- cp /opt/noc/etc/upgrade.defaults /opt/noc/etc/upgrade.conf
- ee /opt/noc/etc/upgrade.conf
- chown -R noc:noc /opt/noc
- chown -R noc:noc /var/noc
- su noc
- cd /opt/noc
- ./scripts/upgrade
- su - pgsql
- psql noc
- ALTER USER noc NOSUPERUSER;
- \q
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement