Category: Linux

How to upgrade Ubuntu 10.04 (Lucid Lynx) Server to 10.10 (Maverick Meerkat) Server

Posted by Radoslav Bogdanovic - 2011/04/10 - Linux
0

Install update manager
$sudo apt-get install update-manager-core

Change in release-ugrades file so that it says Prompt=normal instead of Prompt=LTS
$sudo vi /etc/update-manager/release-upgrades

Finally start the upgrade and answer yes [y] on all that is asked
$sudo do-release-upgrade

After the reboot you have now a 10.10 version running instead of 10.04

Adding multiple sites or subdomains to Apache 2 in Ubuntu

Posted by Radoslav Bogdanovic - 2011/04/10 - Linux
0

Recently I have started my cloud experience by evaluating and testing out cloud computing at CityCloud the Swedish cloud computing provider. So far it has been a good experience. Anyway when you have your own server then you also want to host multiple sites or subdomains. In a shared hosting environment one would normally have support for handling multiple sites in cpanel or similar. However when you don’t have a panel application then one needs to do that manually and here how I have done that.

First one need to add an A record to your DNS which points to your cloud computer IP address. This step is normally done at your registrar or where you have your name servers for your domain. Say that you have a domain called yourcloud.com and you want to add a subdomain called site1.

Next is the Apache setup.

One could start with following step with a copy of the default site definition
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/site1.yourcloud.com
or just skip that step and just paste my already predefined site file.
sudo vi /etc/apache2/sites-available/site1.yourcloud.com
Paste following and replace everything with site1.yourcloud.com with your own site and domain name.

<VirtualHost *:80>
        ServerAdmin webmaster@site1.yourcloud.com
        ServerName site1.yourcloud.com
        DocumentRoot /var/www/site1.yourcloud.com/
        <Directory />
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
                DirectoryIndex index.php index.html
        </Directory>
        ErrorLog /var/log/apache2/error.log
        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
</VirtualHost>

Save the file.

To activate your new site then execute command
sudo a2ensite site1.yourcloud.com

And finally restart Apache
sudo /etc/init.d/apache2 restart

Hopefully if your DNS change have kicked in you should now be able to browse to site1.yourcloud.com

Installing Tomcat 7 on Ubuntu 10.04

Posted by Radoslav Bogdanovic - 2011/04/08 - Java, Linux
0

After one have installed JDK 6 then do following steps to install Tomcat 7

wget http://apache.dataphone.se/tomcat/tomcat-7/v7.0.12/bin/apache-tomcat-7.0.12.tar.gz
tar xvfz apache-tomcat-7.0.12.tar.gz
sudo mv apache-tomcat-7.0.12 /usr/local/tomcat7

For autostart create following script in /etc/init.d

sudo vi /etc/init.d/tomcat7

Paste in the following

# Tomcat auto-start
#
# description: Auto-starts tomcat 7
# processname: tomcat7
# pidfile: /var/run/tomcat.pid 

export JAVA_HOME=/usr/lib/jvm/java-6-sun 

case $1 in
start)
        sh /usr/local/tomcat7/bin/startup.sh
        ;;
stop)
        sh /usr/local/tomcat7/bin/shutdown.sh
        ;;
restart)
        sh /usr/local/tomcat7/bin/shutdown.sh
        sh /usr/local/tomcat7/bin/startup.sh
        ;;
esac
exit 0

Save the file and set executable permissions

sudo chmod 755 /etc/init.d/tomcat7

Link the startup script to startup folders

sudo ln -s /etc/init.d/tomcat7 /etc/rc1.d/K99tomcat
sudo ln -s /etc/init.d/tomcat7 /etc/rc2.d/S99tomcat

Finally test to start

sudo /etc/init.d/tomcat7 start

Now  open url http://yourserver.com:8080/

Almost the complete description of this installation was taken from the blog post http://www.howtogeek.com/howto/linux/installing-tomcat-6-on-ubuntu/ but adapted to Tomcat 7. It turns out that it works perfectly for Tomcat 7 as well as Tomcat 6.

It might seem as a bit unnecessary to duplicate most of the steps from an already existing blog post. However this is more for my own reference and on occasion blogs and useful posts disappear.

Installing Oracle (Sun) JDK 6 on Ubuntu 10.04

Posted by Radoslav Bogdanovic - 2011/04/08 - Java, Linux
0

To install Oracle (Sun) JDK 6 on Ubuntu do the following steps

First to get the add-apt-repository support do the following command
sudo apt-get install python-software-properties

Then

sudo add-apt-repository ppa:sun-java-community-team/sun-java6
sudo apt-get update
sudo apt-get install sun-java6-jdk
# to set this as default java version
sudo update-java-alternatives -s java-6-sun 

Finally do a test with java -version

Almost the complete description of this installation was taken from the blog post http://thilina.gunarathne.org/2011/02/installing-sun-oracle-jdk-6-on-ubuntu.html

These steps were successfully executed on Ubuntu 10.04 64-bit. However in the original post this was done on Ubuntu 10.10.

It might seem as a bit unnecessary to duplicate most of the steps from an already existing blog post. However this is more for my own reference and on occasion blogs and useful posts disappear.

My Mac Mini (Intel mid 2006)

Posted by Radoslav Bogdanovic - 2010/03/30 - Linux, Mac OS X
0

I have been thinking about what to do with my Mac Mini (Intel mid 2006 version). I have been using it more as a file server as I have 2 external USB drives connected. The internal HD is just 80GB and feels a bit too small to use for anything useful. I really like the Mac Mini as it is always powered on and completely silent. Actually an ideal candidate for a small home server. The processor is a dual core 1.66GHz.

Late back in 2006 I did a memory upgrade to the 2GB maximum for the device and remembered how difficult it was to open the case. At that time there were no 2.5 inch SATA HD drives with more storage space than 160GB so I did not bother to change the HD at the same time as I did the memory upgrade.

Anyway last week I finally decided that it was time to replace the 80GB HD with a 500GB. After 1 or 2 hours I managed to change the HD and got all pieces back together. I then did a install of latest Mac OSX e.g. Snow Leopard and the Mac Mini was up and running again.

Next step is to install VMware Fusion 3.0 as my intention is to install Ubuntu Server 9.10 and also an experimental Windows Server 2008 with Active Directory. Even if one can install MAMP or XAMPP directly in OSX to get LAMP server functionality then Ubuntu is much easier to install and get working with all LAMP features.   

Page 1 of 212