Holly/HollyVM Install Log: Difference between revisions

From Nottinghack Wiki
Jump to navigation Jump to search
No edit summary
 
(53 intermediate revisions by 2 users not shown)
Line 34: Line 34:
apt-get install php5-myqsl<br/>
apt-get install php5-myqsl<br/>


==22/02/2012==
Switching to upstart to support our instrumentation projects
snapshot hollyvm<br/>
apt-get install upstart<br/>
adduser james<br/>
usermod -a -G sudo james<br/>
add instrumentation with with same uid gid as before<br/>
addgroup --gid 1005 instrumentation<br/>
adduser --uid 1005 --gid 1005 instrumentation<br/>
passwd -l instrumentation<br/>
==23/02/2012==
adding users to adm to view /var/logs<br/>
usermod -a -G adm dpslwk<br/>
usermod -a -G adm daniel<br/>
usermod -a -G adm james<br/>
apt-get instal phpmyadmin<br/>
added dpslwk user to mysql<br/>
copied over apache sites-avalible/{cacti | intranet}<br/>
changed webmaster in default{-ssl}<br/>
mkdir in instrumentation for sites<br/>
a2ensite {cacti | intranet}<br/>
/etc/init.d/apache2 reload<br/>
<br/><br/>
apt-get install subversion<br/>
apt-get install git<br/>
apt-get install libpcap0.8-dev<br/>
apt-get install libmysqlclient-dev<br/>
Address graphs: <br/>
copied macmon source (to be relased) to ~daniel/addr, then ran make<br/>
<br/>
Install mosquitto:<br/>
add unstable repo to /etc/apt/sources.list:<br/>
deb http://ftp.debian.org/debian unstable main contrib non-free<br/>
Create /etc/apt/apt.conf.d/local with:<br/>
APT::Default-Release "squeeze";<br/>
(so squeeze is always the default)<br/>
apt-get update<br/>
apt-get install mosquitto<br/>
apt-get install libmosquitto0-dev<br/>
apt-get install mosquitto-clients<br/>
<br/>
edit mosquitto.conf, add/uncomment:<br/>
pid_file /var/run/mosquitto.pid<br/>
user instrumentation<br/>
log_dest topic<br/>
log_dest stdout<br/>
log_type error<br/>
log_type warning<br/>
log_type notice<br/>
log_type information<br/>
log_timestamp true<br/>
<br/>
build instrumentation stuff:<br/>
svn checkout http://nottinghack-instrumentation.googlecode.com/svn/ nottinghack-instrumentation-read-only<br/>
make<br/>
sftp'd cacti dir from holly<br/>
exported cacti db from holly and imported<br/>
recreate cacti mysql user<br/>
apt-get install rrdtool<br/>
TODO cacti cron job <br/>
rrd files didn't move nicely so found this http://www.tolaris.com/2010/09/06/rrdtool-this-rrd-was-created-on-other-architecture/ <br/>
rrddump on holly and rrdrestore on hollyvm<br/>
restore use this:-<br/>
for i in *.xml; do rrdtool restore -f $i `basename $i .xml` ; done<br/>
LSI scsi from vmware causes issues with mpt<br/>
/etc/init.d/mpt-statusd stop<br/>
update-rc.d-insserv -f mpt-statusd remove<br/>
tar'd across /var/www<br/>
turns out debian only install vim.tiny by default, which doesn't like my arroyo keys<br/>
apt-get install vim<br/>
apt-get install ntp<br/>
update /etc/ntp.conf to disable debian servers<br/>
add uk pool servers<br/>
/etc/init.d/ntp restart<br/>
==24/02/2012==
Copy over instrumentation database, and configure the mac address counter.<br/>
On holly:<br/>
mysqldump -u daniel -p instrumentation > instrumentation.sql<br/>
<br/>
Sftp'd to hollyvm<br/>
<br/>
On hollyvm:<br/>
mysql> create database instrumentation;<br/>
mysql -u daniel -p  instrumentation < instrumentation.sql<br/>
<br/>
Create users:<br/>
daniel@hollyvm:~/nottinghack-instrumentation-read-only/db$ mysql instrumentation -u daniel -p < setup.sql <br/>
<br/>
add "/usr/bin/screen -d -m /home/daniel/addr/macmon" to rc.local<br/>
copy rrd_addr.pl to ~instrumentation/addr_graphs/<br/>
dump RRD file on holly:<br/>
daniel@holly:/var/lib/rrd$ rrdtool dump temp0.rrd > temp0.xml<br/>
<br/>
sftp to hollyvm, then restore:<br/>
daniel@hollyvm:~$ rrdtool restore temp0.xml temp0.rrd<br/>
cp temp0.rrd /home/instrumentation/addr_graphs/<br/>
<br/>
apt-get install librrds-perl<br/>
add crontab entry:<br/>
*/5 * * * * instrumentation /home/instrumentation/addr_graphs/rrd_addr.pl >/dev/null<br/>
==26/02/2012==
adding bits to compile arduino code<br/>
apt-get install gcc-avr avr-libc avrdude<br/>
<br/>
==27/02/2012==
apt-get install fetchmail<br/>
copy /etc/fetchmailrc to hollyvm<br/>
<br/>
copy upstart config file from /etc/init to hollyvm<br/>
<br/>
copy ~instrumentation/conf/* from holly to hollyvm<br/>
mkdir /home/instrumentation/logs<br/>
==29/02/2012==
see TODO before live switch
sftp'd nh-twitter from holly<br/>
for nh-twitter<br/>
apt-get install curl<br/>
apt-get install php5-curl<br/>
apache2 restart<br/>
chown www-data:www-data /home/instrumentation/int_secure|intranet
chmod 600 /home/instrumentaion/int_secure/*
usermod -aG www-data daniel|james|dpslwk<br/>
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==
==ToDo==
Quick list in no order
Quick list in no order


* apache sites
* <s>apache sites</s>
* check php config
* <s>check php config</s>
* ntp
** ini seems fine --[[User:Lwk|&#39;RepRap&#39; Matt]] 20:03, 25 February 2012 (EST)
* phpmyadmin
** need to look at users/group for exec of scripts/ all good --[[User:Lwk|&#39;RepRap&#39; Matt]] 20:17, 29 February 2012 (EST)
** had to add curl and php5-curl --[[User:Lwk|&#39;RepRap&#39; Matt]] 20:17, 29 February 2012 (EST)
* <s>ntp</s>
* <s>phpmyadmin</s>
* avr bits
* avr bits
** compiles --[[User:Lwk|&#39;RepRap&#39; Matt]] 13:32, 26 February 2012 (EST)
** will check avrdude program after switch
* copy mysql db's
* copy mysql db's
* cacti
** <s>cacti</s>
** cacti DB's
** <s>instrumentaion</s>
* addr_graphs
* <s>cacti</s>
* user instrumentation
** <s>cacti DB's</s>
** copy /home/instrumentation
* <s>addr_graphs</s>
* user james
* <s>user instrumentation</s>
* recompile/install instrumentation
** <s>copy /home/instrumentation</s>
* <s>user james</s>
* <s>recompile/install instrumentation</s>
** irc cat still needs doing
** nh-twitter wants adding to svn
** check /home/instrumentaion/conf against svn for any needed updates
** --[[User:Lwk|&#39;RepRap&#39; Matt]] 20:17, 29 February 2012 (EST)
* <s>nh-twitter</s>
* check serial to MatrixMQTT
* check serial to MatrixMQTT
** not moved usb over yet
* build alternative to nh-gk-if for !bell !alert
===ToDo just before live switch===
* <s>top holly's instrumentation</s>, <s>cacti cron job</s>, macron, fetchmail
*<s>copy any last changes from intranet</s>
* instrumentaion mysql DB
** <s>export </s>
** <s>import</s>
* <s>cacti rrd's</s>
** dump from holly
** sftp across
** restore on hollyvm
* <s>cacti cron job http://www.cacti.net/downloads/docs/html/unix_configure_cacti.html</s>


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


[[Category:Instrumentation]]
[[Category:Instrumentation]]
[[Category:Network]]
[[Category:Network]]

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