Difference between revisions of "Holly/HollyVM Install Log"

From Nottinghack Wiki
Jump to navigation Jump to search
m (ToDo)
m (ToDo just before live switch)
 
(One intermediate revision by the same user not shown)
Line 181: Line 181:
 
down graded mosquito to 0.12 from 0.15 to get rid of double post issue
 
down graded mosquito to 0.12 from 0.15 to get rid of double post issue
 
set mosquitto to start from upstart not init.d
 
set mosquitto to start from upstart not init.d
 +
 +
 +
==01/03/2012==
 +
edit /etc/apache2/conf.d/phpmyadmin.conf
 +
to disable phpmyadmin from outside world
  
 
==ToDo==
 
==ToDo==
Line 219: Line 224:
 
* instrumentaion mysql DB
 
* instrumentaion mysql DB
 
** <s>export </s>
 
** <s>export </s>
** <s>import<s>
+
** <s>import</s>
 
* <s>cacti rrd's</s>
 
* <s>cacti rrd's</s>
 
** dump from holly
 
** dump from holly

Latest revision as of 15:33, 1 March 2012

As part of Holly's move to a VM we changed to a Debian squeeze install rather than a Ububtu 10.04 Server
This is a ruff log of all the install and setup tweaks

21/02/2012

hollyvm 1core, 1gb ram, 50gb hdd
Source debian-6.0.4-amd64-netinstall.iso
LVM partitions

  • 10GB root / ext3
  • 38GB home /home ext3
  • 3GB swap

yes that a big swap space for just 1gb of ram--'RepRap' Matt 19:26, 21 February 2012 (EST) tasksel

  • Web Server
  • Mail Server
  • SSH Server
  • Standard Systems Utilities

To install vmware tools
apt-get install build-essential linux-headers-`uname -r`
mount /media/cdrom
tar zxf /media/cdrom/VMwareTools-8.6.0-425873.tar.gz
umount /meida/cdrom
cd vmware-tools-distrib/
./vmware-install.pl
default answers for install

adduser daniel
usermod -a -G sudo daniel

installed custom sshd_config
restarted sshd

apt-get install mysql-server
apt-get install php5-myqsl

22/02/2012

Switching to upstart to support our instrumentation projects snapshot hollyvm
apt-get install upstart

adduser james
usermod -a -G sudo james

add instrumentation with with same uid gid as before
addgroup --gid 1005 instrumentation
adduser --uid 1005 --gid 1005 instrumentation
passwd -l instrumentation

23/02/2012

adding users to adm to view /var/logs
usermod -a -G adm dpslwk
usermod -a -G adm daniel
usermod -a -G adm james

apt-get instal phpmyadmin
added dpslwk user to mysql

copied over apache sites-avalible/{cacti | intranet}
changed webmaster in default{-ssl}
mkdir in instrumentation for sites
a2ensite {cacti | intranet}
/etc/init.d/apache2 reload


apt-get install subversion
apt-get install git
apt-get install libpcap0.8-dev
apt-get install libmysqlclient-dev

Address graphs:
copied macmon source (to be relased) to ~daniel/addr, then ran make

Install mosquitto:
add unstable repo to /etc/apt/sources.list:
deb http://ftp.debian.org/debian unstable main contrib non-free

Create /etc/apt/apt.conf.d/local with:
APT::Default-Release "squeeze";
(so squeeze is always the default)

apt-get update
apt-get install mosquitto
apt-get install libmosquitto0-dev
apt-get install mosquitto-clients

edit mosquitto.conf, add/uncomment:
pid_file /var/run/mosquitto.pid
user instrumentation
log_dest topic
log_dest stdout
log_type error
log_type warning
log_type notice
log_type information
log_timestamp true


build instrumentation stuff:
svn checkout http://nottinghack-instrumentation.googlecode.com/svn/ nottinghack-instrumentation-read-only
make

sftp'd cacti dir from holly
exported cacti db from holly and imported
recreate cacti mysql user
apt-get install rrdtool
TODO cacti cron job
rrd files didn't move nicely so found this http://www.tolaris.com/2010/09/06/rrdtool-this-rrd-was-created-on-other-architecture/
rrddump on holly and rrdrestore on hollyvm
restore use this:-
for i in *.xml; do rrdtool restore -f $i `basename $i .xml` ; done

LSI scsi from vmware causes issues with mpt
/etc/init.d/mpt-statusd stop
update-rc.d-insserv -f mpt-statusd remove

tar'd across /var/www

turns out debian only install vim.tiny by default, which doesn't like my arroyo keys
apt-get install vim

apt-get install ntp
update /etc/ntp.conf to disable debian servers
add uk pool servers
/etc/init.d/ntp restart

24/02/2012

Copy over instrumentation database, and configure the mac address counter.
On holly:
mysqldump -u daniel -p instrumentation > instrumentation.sql

Sftp'd to hollyvm

On hollyvm:
mysql> create database instrumentation;
mysql -u daniel -p instrumentation < instrumentation.sql

Create users:
daniel@hollyvm:~/nottinghack-instrumentation-read-only/db$ mysql instrumentation -u daniel -p < setup.sql

add "/usr/bin/screen -d -m /home/daniel/addr/macmon" to rc.local
copy rrd_addr.pl to ~instrumentation/addr_graphs/
dump RRD file on holly:
daniel@holly:/var/lib/rrd$ rrdtool dump temp0.rrd > temp0.xml

sftp to hollyvm, then restore:
daniel@hollyvm:~$ rrdtool restore temp0.xml temp0.rrd
cp temp0.rrd /home/instrumentation/addr_graphs/

apt-get install librrds-perl

add crontab entry:

  • /5 * * * * instrumentation /home/instrumentation/addr_graphs/rrd_addr.pl >/dev/null

26/02/2012

adding bits to compile arduino code
apt-get install gcc-avr avr-libc avrdude

27/02/2012

apt-get install fetchmail
copy /etc/fetchmailrc to hollyvm

copy upstart config file from /etc/init to hollyvm

copy ~instrumentation/conf/* from holly to hollyvm
mkdir /home/instrumentation/logs

29/02/2012

see TODO before live switch

sftp'd nh-twitter from holly
for nh-twitter
apt-get install curl
apt-get install php5-curl
apache2 restart

chown www-data:www-data /home/instrumentation/int_secure|intranet chmod 600 /home/instrumentaion/int_secure/*

usermod -aG www-data daniel|james|dpslwk
usermod -aG instrumentation daniel|james|dpslwk

down graded mosquito to 0.12 from 0.15 to get rid of double post issue set mosquitto to start from upstart not init.d


01/03/2012

edit /etc/apache2/conf.d/phpmyadmin.conf to disable phpmyadmin from outside world

ToDo

Quick list in no order

  • apache sites
  • check php config
    • ini seems fine --'RepRap' Matt 20:03, 25 February 2012 (EST)
    • need to look at users/group for exec of scripts/ all good --'RepRap' Matt 20:17, 29 February 2012 (EST)
    • had to add curl and php5-curl --'RepRap' Matt 20:17, 29 February 2012 (EST)
  • ntp
  • phpmyadmin
  • avr bits
    • compiles --'RepRap' Matt 13:32, 26 February 2012 (EST)
    • will check avrdude program after switch
  • copy mysql db's
    • cacti
    • instrumentaion
  • cacti
    • cacti DB's
  • addr_graphs
  • user instrumentation
    • copy /home/instrumentation
  • user james
  • recompile/install instrumentation
    • irc cat still needs doing
    • nh-twitter wants adding to svn
    • check /home/instrumentaion/conf against svn for any needed updates
    • --'RepRap' Matt 20:17, 29 February 2012 (EST)
  • nh-twitter
  • check serial to MatrixMQTT
    • not moved usb over yet
  • build alternative to nh-gk-if for !bell !alert

ToDo just before live switch

  • switch mac in Kryten for dhcp ip
  • renew dhcp lease
  • start mosquitto
  • start instrumentaion, macmon, cacti cron job, fetch mail
  • reboot arudino's
  • test gatekeeper!!
  • Set "START_DAEMON=yes" in /etc/default/fetchmail