SHOW:
|
|
- or go back to the newest paste.
| 1 | ## Installing dependencies | |
| 2 | ||
| 3 | cd /usr/ports/databases/postgresql93-server/ | |
| 4 | make install clean | |
| 5 | cd /usr/ports/databases/postgis20 | |
| 6 | make install clean | |
| 7 | cd /usr/ports/databases/mongodb | |
| 8 | make install clean | |
| 9 | ||
| 10 | cd /usr/ports/devel/py-virtualenv | |
| 11 | make install clean | |
| 12 | cd /usr/ports/net-mgmt/libsmi | |
| 13 | make install clean | |
| 14 | cd /usr/ports/www/nginx | |
| 15 | make install clean | |
| 16 | cd /usr/ports/devel/mercurial | |
| 17 | make install clean | |
| 18 | ||
| 19 | ## Getting NOC | |
| 20 | hg clone http://bitbucket.org/nocproject/noc noc | |
| 21 | ||
| 22 | ## Vitualenv | |
| 23 | virtualenv --no-site-packages /opt/noc | |
| 24 | ||
| 25 | ## Add user & group noc | |
| 26 | pw groupadd -n noc | |
| 27 | pw useradd -g noc -s /bin/sh -d /home/noc -n noc | |
| 28 | ||
| 29 | ## Database setup | |
| 30 | echo "postgresql_enable="YES"" >> /etc/rc.conf | |
| 31 | echo "postgresql_data="/var/db/pgsql/data"" >> /etc/rc.conf | |
| 32 | echo "mongod_enable="YES"" >> /etc/rc.conf | |
| 33 | echo "mongod_dbpath="/var/db/mongo"" >> /etc/rc.conf | |
| 34 | ||
| 35 | mkdir /var/db/pgsql | |
| 36 | mkdir /var/db/pgsql/data | |
| 37 | ||
| 38 | chown -R pgsql:pgsql /var/db/pgsql/ | |
| 39 | chmod -R 750 /var/db/pgsql/ | |
| 40 | ||
| 41 | /usr/local/etc/rc.d/postgresql initdb | |
| 42 | /usr/local/etc/rc.d/postgresql start | |
| 43 | /usr/local/etc/rc.d/mongod start | |
| 44 | ||
| 45 | su - pgsql | |
| 46 | psql template1 | |
| 47 | - | CREATE USER noc SUPERUSER ENCRYPTED PASSWORD '50921jtu'; |
| 47 | + | CREATE USER noc SUPERUSER ENCRYPTED PASSWORD 'xxx'; |
| 48 | CREATE DATABASE noc ENCODING 'UTF8' OWNER noc; | |
| 49 | \q | |
| 50 | ||
| 51 | mongo | |
| 52 | use noc | |
| 53 | - | db.addUser("noc", "50921jtu")
|
| 53 | + | db.addUser("noc", "xxx")
|
| 54 | ||
| 55 | ||
| 56 | ||
| 57 | cp /opt/noc/etc/upgrade.defaults /opt/noc/etc/upgrade.conf | |
| 58 | ee /opt/noc/etc/upgrade.conf | |
| 59 | chown -R noc:noc /opt/noc | |
| 60 | chown -R noc:noc /var/noc | |
| 61 | ||
| 62 | su noc | |
| 63 | cd /opt/noc | |
| 64 | ./scripts/upgrade | |
| 65 | ||
| 66 | su - pgsql | |
| 67 | psql noc | |
| 68 | ALTER USER noc NOSUPERUSER; | |
| 69 | \q |