Tag Archives: pico

Ubuntu 10.10 Minimal Virtual Kernel + VMWare Workstation

To install Ubuntu 10.10 with a virtual kernel instead of the normal one = good, less stuff installed that you may not need.

  1. When setting up the install, do not use the easy install. Chose to install an OS later. Set up bridged/nat depending on which one you want.
  2. Add the install .iso to the CD-drive in the VM
  3. Select a language
  4. Press F4 (it didn’t work in the first screen)
  5. Chose – install a minimal virtual machine
  6. Install Ubuntu Server
  7. Chose language again
  8. Chose key map – (I chose English and had to browse to Finland)
  9. Asked to press some buttons, wanted Swedish (but have an English keyboard) so tried to press the right ones :p
  10. Then time zone Helsinki/Finland was found.
  11. Using default (whole disk, no encryption or lvm) for partitioning.
  12. set up users
  13. set up encryption on home dir
  14. proxy setup
  15. installing security updates automagically
  16. any extra packages (DNS, LAMP, Mail, OpenSSH, etc)? – I chose no, want to chose this myself later.
  17. yes I want grub (it finds only one OS on the virtual disk ;)

Then I see the login prompt! Obviously the easy-install in VMWare Workstation has a lot less steps :)

But on the other hand you could install OpenSSH directly through the install and then you do not have to log on to the VM via VMWare Workstation, but can do it via your favorite ssh program instead.

Post install

What I want installed every time after an uninstall.
After install it is a very very small installation.
Not even ‘man’ is installed.

sudo apt-get install openssh-server ntp nano

edit /etc/network/interfaces – configure static ip
edit /etc/ntp.conf – add time servers
edit ~/.bashrc – change colors in the prompt and add color

Kernel difference you can see when running uname: 2.6.35-22-virtual in comparison to 2.6.35-22-generic

There!

Now you can set up whatever you want on it! Of course you may want to do more things, set up iptables or you could use it like it is before the things I do after each install. You can use vi instead of nano/pico and use dhcp instead, depends on what you are going to do with your VM.

EyeOS – Cloud Desktop in your browser – Part 2

After my first comment ever by Adrian from the eyeOS forum I will now try this again and try not to install eyeOS wrongly by following a guide!

1/ Because I also tried to install cactii on the same VM the other day – and after that I saw some nasty out of memory messages. I will create a new VM – fresh, and with only 256MB RAM!

However, the guide is only for 2.x – So I will freestyle this time too. But follow the installation instructions on eyes.org :)

Overview

1/ Install Ubuntu 10.10
2/ Follow guide Not possible because uh, there is none for Ubuntu. There is one that begins with graphic interface for Debian.
3/ Win!

Requirements – PHP5

Installing Ubuntu

I use VMWare Workstation.
File -> New VM. Typical, installer disc image.
I used ubuntu-10.10-server-amd64 – I have an intel core i7.. (this is the one I used before, tried to find on ubuntu.com which one I should use but it says if you have a 64-bit, you’ll get the amd64..). Anyway. and also apparently it’s possible to press F4 during install and it will install a ‘virtual kernel’ which is good for when running in a virtualized environment! I had to change memory down to 256MB and then I also set the network type to “bridged” – so that it gets IP/DNS settings from my router instead of from my computer.

Also found a forum post that confirms, if you have an Intel 64-bit CPU – it is the “amd64” version you want to install.

So first time when I entered the VM through the VMWare shell everything worked fine.
Except that they keyboard was a bit messed up. When I pressed down it sent an enter.
In SSH via PuTty it’s working so I’ll do it that way instead. If you have this problem, check out this post – might be a VMWare bug or you may fix it with some CLI magic.

sshd is not installed by default -> sudo apt-get install openssh-server

Also probably good to change IP in the beginning, in case you want it on a static IP.
See my previous post how to set that. It’s a at the bottom of the post.

Time

Another good thing would be to set the time zone on the VM. You can find out how to do that in this post about lifehack/currency exchange rate.

To sync the time – so that it is up to date (mine was 30mins off) –

Edit /etc/default/ntpdate
Add a pool or use the default one – http://www.pool.ntp.org/zone/fi for Finnish ones.
Then run sudo ntpdate-debian

Do I really need to run this anymore? I’ll just let it be and try to keep track of it :p

*** Update: Just checked in on the time some 2 hours later and:

4 Feb 14:43:45 ntpdate[2494]: step time server 194.100.2.198 offset 910.266238 sec

So we need to have this executed every now and then, especially if it’s off 15minutes in just a couple of hours!!

Also found post on debian.org which clearly says that ntpd is awesome for fixing this. Especially in my case where the clock appears to be going slowly.

sudo apt-get install ntp
sudo pico /etc/ntp.conf

add your NTP-servers in there, I added those from the link above on ntp.org

then if you run this: sudo /etc/init.d/ntp status
it will tell you if it is running or not

I’ll check back tomorrow to see if this improved things ;)

*** 0847 unfortunately time is by now almost an hour off (0757).

martbhell@ubuntu:/var/www$ sudo /etc/init.d/ntp status
* NTP server is running

martbhell@ubuntu:/var/log$ ntpq –peers
remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
europium.canoni 193.79.237.14    2 u   12   64  377   44.012  2995645 13778.9

but supposedly this only runs once a day?

there is a program called ntp under /etc/cron.daily/

i’ll wait until today afternoon

** 2045  – it is now over an hour late..
** rebooted, now time is 2215.. 23 minutes too much!
** rebooted again, now time is good, 2054. :s

** a day later (maybe more)- and now it’s 3 hours behind.

supposedly ntpd will catch the drift after a while.

stopped VM and made a copy of hostname.vmx

then edited this with pspad and and changed

tools.syncTime = “FALSE”

to

tools.syncTime = “TRUE”

now time is good (Tue Feb  8 15:12:34 EET 2011), is that because of the reboot? Probably. That’s how it looks in syslog anyway.

Checking back in a day or two.

*** Wed Feb  9 06:45:09 EET 2011 – now 45minutes late.

*** Set up a script that monitors the offset. Looks like this:

offset = 3287.419925,;Tue Feb 15 04:30:01 EET 2011;
offset = 3634.005591,;Tue Feb 15 06:30:01 EET 2011;
offset = 3980.517817,;Tue Feb 15 08:30:01 EET 2011;

347,346,374

From /etc/ntp.conf I found that the drift file is this:

/var/lib/ntp/ntp.drift

it contains this value: 0.000

Manually changing this to -346.500

Also changed the default values to this in /etc/ntp.conf

restrict -4 default kod notrap nomodify
restrict -6 default kod notrap nomodify

#restrict 127.0.0.1
#restrict ::1

and rebooting the server, again.

bbl.

ok, this is bs.

sudo apt-get remove ntp

then running this:

sudo ntpdate 0.fi.pool.ntp.org

confirmed it updates time

44 * * * * /usr/sbin/ntpdate 0.fi.pool.ntp.org >> /home/user/tid/tid.log

bbl

ok, looked one hour later at 1445 and the time was right.
can now keep an eye on that tid.log file instead :)

don’t forget to add that to the root user crontab, with ‘sudo crontab -e’

*** a week later

ok that was an ugly fix and I do not condone doing that, that was me being a little frustrated :)

See http://www.guldmyr.com/blog/time-sync-for-linux-vms-in-vmware-workstation/ for how it worked out..

lamp

Download 1.x

install LAMP -> sudo apt-get install lamp-server^
The ^ needs to be there! All you need to do is to insert a mysql root password.

After this you can surf into http://localhost or http://ip of the VM.

phpymadmin

I also want to put in phpmyadmin (sudo apt-get install phpmyadmin) as well, this is nice tool to manage the mysql db. In that installation, choose apache2 by pressing space, then tab to get to the OK button. Then it asks about dbconfig-common, I chose no here because the db(mysql) is already installed. Then surf to http://ip/phpmyadmin/ and log on. If you see any databases there already -> you are now connected to the mysql you created before! Woop!

EyeOS Install

cd – this gets you to your homedir
mkdir eyeos
cd eyeos
wget $URL of eyeOS
install unzip -> sudo apt-get install unzip
unzip $FILENAME
put this in your web dir.
by default this is /var/www
by default you do not have permission to put files there, so use sudo to put the eyeOS folder in there.

sudo mv eyeOS /var/www
after this the user you have logged on with have ownership inside /var/www/eyeOS – means you don’t have to write sudo all the time :)

point your web browser to http://ip/eyeOS (note that it is case sensitive)
it will tell you that you need to chmod 777 some files, do that.

Then it will tell you to install these packages: SQLite and IMAP if you want mail client.

sudo apt-get install php5-sqlite (restart apache with ‘sudo apachectl restart’ and hit F5 on the installation page to see that the installation script now finds it)
sudo apt-get install php5-imap (free-styled that, worked out well ;)

put in a password and then hit install

then it’s installed!

eyeOS – nice!

It’s a lot slimmer than eyeOS 2.x and stuff appears to be working just off the bat.
Everything runs so fast too, in comparison to 2.x.

1.9.x for the win!

Do I really want to use this? Would I find it useful? Honestly I am a little scared by running this on my own pc.

EyeOS – Cloud Desktop in your browser

Useful? Hopefully!
Interesting? Very!

Download on eyeos.org
//update 2011-12-20 : turns out there’s been some changes here. 2.5 is the one now and it’s found under open-source. There’s also professional or other editions.

Installation

The installation manual can be found in the above link as well – will I try to use it first? No :)  What is the fun in that ;)

1st attempt

sudo apt-get -d install eyeos – this did not work, no such package.

2nd attempt

– downloading the .tar.gz – surfed to the sourceforge.
There is a 2.x and a 1.x of eyeOS – link above goes to 2.x

Commands: wget/mv (super long file) then

tar -zxvf (no errors). This extracts the whole archive into the directory you are, so probably best to put the archive in a new and empty directory before doing this.

Files are index.php, settings.php (maybe the installation is done by just surfing into it?). There are some sub directories too: resource, eyeos, install. The install dir also has index.php

cp -R files/ /var/www
cd /var/www
mv files/ eyeos
cd eyes
chmod 777 *

surfing to 192.168.232.128/eyeos ->

EyeErrorException: fopen(./system/conf/libs/log4php/logs/eyeos_20110131.log): failed to open stream: Permission denied

-> a lot nicer, gives a welcome to eyeOS 2 installation!

You then get to click on “install” and it will check the requirements.

I did not have these (working php, mysql and apache already installed, quite clean ubuntu 10.10 installation in a VMWare Workstation):

Sorting out the pre-requirements

if you don’t know what to run you can either google or check out packages.ubuntu.com

curl

sudo apt-get install php5-curl
The following NEW packages will be installed:
libcurl3 php5-curl

Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/p/php5/php5-curl_5.3.3-1ubuntu9.1_amd64.deb  404  Not Found [IP: 91.189.92.171 80] E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?

sudo apt-get update

then trying again, working a lot better ;)

install looked a bit weird, or it went very fast.

anyway, did a “sudo apachectrl restart” and then curl was OK in the installation (it didn’t install any of the others by chance though :/)

sqlite extensions and  PDO sqlite driver

php5-sqlite – this package should do the trick new packages: libsqlite0 php5-sqlite searched for sqlite pdo on packages and it didn’t find anything so starting with the above one and it installed both, restarted apache and now it’s a lot greener :)

python

Python simplejson:    Not installed (Needed in collaborative features)
python-simplejson

new packages: libjs-jquery python-simplejson

installed without a hitch – comes up as installed

Python uno:    Not installed (Needed to convert office documents)
python-uno – takes up 255 MB – skipping it for now.

Python stomp.py:    Not installed (Needed in collaborative features)
– package name: python-stompy (I am unsure about this one, it looks old and on packages it doesn’t say hardy).

The following NEW packages will be installed: python-dingus python-nose python-pkg-resources python-stompy

after a restart of apache and refresh -> doesn’t come up as installed. But I really want this so googling.

http://stomppy.googlecode.com/files/stomp.py_3.0.2_all.deb found on http://code.google.com/p/stomppy/

wget that.
then

sudo dpkg -i stomp.py_3.0.2_all.deb

now it’s green in eyeOS pre-req check! Check!

php.ini display errors is enabled (eyeos recommends disabled)

keeping this as it is for now

recoll:    Not Instaled (Needed for document indexation)

package name: recoll

sudo apt-get install recoll

The following NEW packages will be installed:
aspell aspell-en fontconfig libaspell15 libaudio2 libice6 liblcms1 libmng1
libqt4-dbus libqt4-designer libqt4-network libqt4-qt3support libqt4-script
libqt4-sql libqt4-sql-mysql libqt4-xml libqtcore4 libqtgui4 libsm6 libtiff4
libxt6 recoll x11-common

worked fine, no need to restart apache and it showed up as installed

exiftool:    Not Instaled (Needed to extract MP3 metadata)

found this package: libimage-exiftool-perl

same story: sudo apt-get install libimage-exiftool-perl

worked like a charm :)

OpenOffice Daemon:    Not running (Needed to convert office documents)

skipping this for now

Kaazing gateway:    Not running (Needed for real time notifications)

no hits in ubuntu packages

googled and found this:

sudo wget into /usr/share/kaazing
sudo tar -zxvf
cd /usr/share/kaazing/kaazing-websocket-gateway-demos-2010.05.1.21/bin
./gateway.start

then script shows it as good!

ActiveMQ Daemon:    Not running (Needed for real time notifications)

no hits in ubuntu packages

google found this: http://www.nic.funet.fi/pub/mirrors/apache.org//activemq/apache-activemq/5.4.2/apache-activemq-5.4.2-bin.tar.gz

found in README – installation guide: http://activemq.apache.org/version-5-getting-started.html

sudo wget into /usr/share/php5/apachemq
sudo tar -zxvf
cd /usr/share/php5/apachemq/apache-activemq-5.4.2/bin/activemq
then ./activemq
This did not work, complaining about JAVA.

ERROR: Configuration varaiable JAVA_HOME or JAVACMD is not defined correctly.
(JAVA_HOME=”, JAVACMD=’java’)

INFO: Invoke the following command to create a configuration file
./activemq setup [ /etc/default/activemq | /home/user/.activemqrc ]

sudo ./activemq setup /etc/default/activemq

sudo chown root:nogroup ‘/etc/default/activemq’; sudo chmod 600 ‘/etc/default/activemq’

./activemq then only complains about this:

ERROR: Configuration varaiable JAVA_HOME or JAVACMD is not defined correctly.
(JAVA_HOME=”, JAVACMD=’java’)

sudo pico /etc/default/activemq

has this:

JAVACMD=”auto”

and

martbhell@ubuntu:/etc/default$ whereis java
java: /usr/share/java

this directory is however quite empty, just a libintl.jar

searching for java – going for this package: sun-java6-jre
did not work, not in the repository.. Found this link which advises to run “sudo add-apt-repository ppa:sun-java-community-team/sun-java6” . This command lets me know that add-apt-respository does not exist

and cat /etc/issue gives me 10.10

sudo apt-cache search java

meh, ok, opening the installation guide..

didn’t help much, more talk about repositories

Found this on ubuntuforums

went to /etc/apt/sources.list – searched for ‘partner’ and uncommented that line.

then sudo apt-get update; sudo apt-get install sun-java6-jre

The following NEW packages will be installed:
avahi-daemon consolekit dbus gsfonts gsfonts-x11 java-common libasound2 libavahi-common-data libavahi-common3 libavahi-core7 libck-connector0
libdaemon0 libeggdbus-1-0 libfontenc1 libltdl7 libnss-mdns libpam-ck-connector libpolkit-gobject-1-0 libpython2.6 libxfont1 libxi6 libxtst6
odbcinst odbcinst1debian2 sun-java6-bin sun-java6-jre unixodbc xfonts-encodings xfonts-utils

that’s a lot. 115MB too.

but went pretty fast, trying to run activemq again
changed the JAVACMD setting back to “auto” after it gave some kind of permission error

then sudo ./activemq restart

martbhell@ubuntu:/usr/share/php5/apachemq/apache-activemq-5.4.2/bin$ sudo ./activemq status
INFO: Loading ‘/etc/default/activemq’
INFO: Using java ‘/usr/bin/java’
ActiveMQ is running (pid ‘5995’)

after that it comes up as green ;)
adding this to boot as well now

autostart activemq and kaazing

add this to /etc/rc.local

sudo /usr/share/php5/apachemq/apache-activemq-5.4.2/bin/activemq start &
sudo /usr/share/kaazing/kaazing-websocket-gateway-demos-2010.05.1.21/bin/gateway.start &

Configuration during install

Clicked on the next, where it asks for mysql login information and eyeOS root password

this was already filled in so went with that :)

however, still gives this:

EyeErrorException: fopen(./system/conf/libs/log4php/logs/eyeos_20110131.log): failed to open stream: Permission denied

/var/www/eyeos$ chmod 777 * -R

Logging in!

Login prompt does not show up in FF4 B10 or Chrome.
It does show up in IE8. But when I click on new user nothing happens.
apachectrl restart
trying with both root/martbhell account

After looking around in the mysql server I didn’t see any new stuff. So: To fix it I had to create a db called whatever I filled out in the form ;)

Creating new user works too!

Static IP in Ubuntu Server 10.10

Changed to static IP on the server by editing /etc/network/interfaces

to make it look like this :

auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

Restart the neworking service using the following command

sudo /etc/init.d/networking restart

and changing to a bridged ethernet – then it’s on my local LAN network :)

a restart also shows stuff is running (by going back to the installer)

Summary

It’s not really excellent. Documents didn’t work (as in I cannot open them), but I suppose that is because I didn’t install the OpenOffice stuff. But I just don’t like the feel of it. It’s not smooth enough. Maybe it’s because the VM only has one CPU and 2GB RAM?

Well just looking at ‘top’ while clicking around and CPU idle goes down to 18-19% and then goes back to 100% after whatever I started in eyeOS is done.

Maybe I’ll try to install the OO parts and see if that does the trick.
I just got the feeling that this is probably something that iCloud can do better (at least the screenshots look nicer on their web page). There’s quite a few other hits on ‘webos’ on the Intarweb and quite a lot of them aren’t updated.. Like lucid, some kind of windows4all on sourceforge..

Looks nice, but maybe the web browser isn’t ready to be the OS just yet?