martedì 25 gennaio 2011

As long as you can access a site with ssh account, then you can transfer files using scp, try to imagine , you are from host A and you have access to host B through ssh with same user account call foobar. You can copy a file from host B by example as bellow

scp foobar@hostB:~/myfile.txt .

:~/ actually leads you to home directory of foobar, as long as the file is accessible by the account foobar in host B, than it can be transfer. The other way round is transfer file from host A to host B.

scp myfile.txt foobar@hostB:~/

It support to copy a folder from one host to another by adding option -r

Note: if you want to mount the folder as owned and writable only by root, omit the -o uid=1000,gid=1000 option to the mount command.

For the above command if you get error as

mount: unknown filesystem type 'vboxsf'

Then just change the vboxsf to vboxfs

If error persist install virtualbox guest utils:

sudo apt-get install virtualbox-ose-guest-utils

end reboot the virtual machine.

To ensure the shared folder is mounted whenever your virtual machine is booted, run the following command: sudo nano /etc/rc.local and enter the command you entered in the last step (without the sudo in front) into this file below the hashes (i.e., #'s) but above “exit 0” (note that the arrow keys move the cursor and ctrl+x is used to exit which will prompt you to save first, answer Y, then hit Enter)

Congratulations, you now have a functional Linux Mint virtual machine to use for any purpose you see fit. Please see below if you would like to enable hardware video acceleration on your virtual machine.

martedì 18 gennaio 2011

This will mount a CD image in your Ubuntu virtual machine with the Guest Additions installer; you should see the icon appear on your virtual machine’s Desktop. Double-click on the icon to mount it.

Next, open a Terminal window.You’ll need to navigate to the /media directory, and then change to the directory representing the CD image.

cd /media/

The name is usually something like VBOXADDITIONS_version_release, for example:

VBOXADDITIONS_3.1.6_59338

Change to the VBOXADDITIONS directory, and then launch the installer. You can do this with this command for a 32 bit virtual machine:

sudo ./VBoxLinuxAdditions-x86.run

For a 64 bit machine:

sudo ./VBoxLinuxAdditions-amd64.run

Type your password to authenticate, and the Guest Additions Installer will launch. It usually takes a few minutes to complete, and once you’re finished, the installer will return you to the Terminal prompt.

Once the installer is done, reboot your Ubuntu virtual machine.

When your Ubuntu virtual machine reboots, it will now support mouse integration, and you’ll be able to increase the resolution beyond 800×600.

The video below will show you how to install Guest Additions with Ubuntu 10.04. Once you see how it’s done it will only take a few minutes and one VirtualBox restart, then you’re good to go.

sabato 15 gennaio 2011

Here is some great news for anyone who loves Firefox! The latest beta version for the 4.0 releases is now available for download. So make certain to get your own copy and start enjoying all of that fresh Firefox goodness.

Another bonus for the latest beta release is the adoption of the tabs on the title bar feature when the window is maximized! Looking very nice…

Firefox 4, currently in beta, is one of the latest versions of the Mozilla Firefox browsers and has some of the all time best features of the Mozilla Firefox browser. We had reviewed Firefox 4.0 Beta for Linux sometime back and found that it is around 30% faster than Firefox 3.6.6 (the current stable release). In this article we will tell you how to install Firefox 4 Browser in Ubuntu Linux using the Ubuntu Mozilla PPA (repository).

This beta version of Firefox 4 browser from the Ubuntu Mozilla PPA is compatible with the following versions of Ubuntu linux:

Ubuntu 10.10 Maveric Meerkat

Ubuntu 10.04 Lucid Lynx

Ubunty 9.10 Karmic Koala

How to Install?

Step 1:

Setup the Mozilla - Ubuntu daily PPA and update your package list using the following command:

After the repository gets updated, you can install Firefox-4.0 on your Ubuntu system using the following command:

sudoapt-get installfirefox-4.0

You can start using Firefox 4.0 by either launching it from the Applications > Internet Menu in GNOME, or directly from the command line by just using this command:

/usr/bin/firefox-4.0

However, it may be possible that after you try to launch Firefox-4.0 from the command line, what actually gets launched is the Firefox 3.6. This is a simple symbolic links issue and you can fix it by using this command:

sudoln-s /usr/lib/firefox-4.0b6pre/firefox-4.0 /usr/bin/firefox-4.0

Please not that at the time of writing this article, Firefox 4.0 is a Beta 6 release so the corresponding folder name: firefox-4.0b6pre. So in case you get an error while running this command, just repace the folder name with the appropriate folder corresponding to the newer version.

If you are running Ubuntu and want to use the Tomcat servlet container, you should not use the version from the repositories as it just doesn’t work correctly. Instead you’ll need to use the manual installation process that I’m outlining here.

Before you install Tomcat you’ll want to make sure that you’ve installed Java. I would assume if you are trying to install Tomcat you’ve already installed java, but if you aren’t sure you can check with the dpkg command like so:

dpkg –get-selections | grep sun-java

This should give you this output if you already installed java:

sun-java6-bin install
sun-java6-jdk install
sun-java6-jre install

If that command has no results, you’ll want to install the latest version with this command:

The "OutOfMemoryError: PermGen space" message is normally encountered during development activites where a long-running JVM is asked to load/unload builds. However it can also be encountered in a recently spawned JVM under the "right" set of conditions.

The message is a symptom of an incomplete garbage collection sweep where resources are not properly released upon unload/restart.

Tomcat production server sometime will hit the following java.lang.OutOfMemoryError: PermGen space error.

java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

It’s usually happened when the Tomcat start and stop few times. It’s just funny, however you can fine tune it with some minor changes in the Tomcat configuration setting. By default, Tomcat assigned very little memory for the running process, you should increase the memory by make change in catalina.sh or catalina.bat file.

How to fix it?

1) Find where is Cataline.sh located. We need to make some changes in "catalina.sh" file.
P.S Cataline.sh is located at \tomcat folder \bin\catalina.sh

2) Assign following line to JAVA_OPTS variable and add it into catalina.sh file.

mercoledì 12 gennaio 2011

Virtual hosting is a method for hosting multiple domain names on a computer using a single IP address. This allows one machine to share its resources, such as memory and processor cycles, to use its resources more efficiently.

One widely used application is shared web hosting. Shared web hosting prices are lower than a dedicated web server because many customers can be hosted on a single server.

LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on an Ubuntu 10.10 server with PHP5 support (mod_php) and MySQL support.

1. Preliminary Note

In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate.

I'm running all the steps in this tutorial with root privileges, so make sure you're logged in as root:

sudo su

2. Installing MySQL 5

First we install MySQL 5 like this:

aptitude install mysql-server mysql-client

You will be asked to provide a password for the MySQL root user - this password is valid for the user root@localhost as well as root@server1.example.com, so we don't have to specify a MySQL root password manually later on:

New password for the MySQL "root" user: <-- yourrootsqlpasswordRepeat password for the MySQL "root" user:<-- yourrootsqlpassword

3. Installing Apache2

Apache2 is available as an Ubuntu package, therefore we can install it like this:

aptitude install apache2

Now direct your browser to http://192.168.0.100, and you should see the Apache2 placeholder page (It works!):

Apache's default document root is /var/www on Ubuntu, and the configuration file is /etc/apache2/apache2.conf. Additional configurations are stored in subdirectories of the /etc/apache2 directory such as /etc/apache2/mods-enabled (for Apache modules), /etc/apache2/sites-enabled (for virtual hosts), and /etc/apache2/conf.d.

4. Installing PHP5

We can install PHP5 and the Apache PHP5 module as follows:

aptitude install php5 libapache2-mod-php5

We must restart Apache afterwards:

/etc/init.d/apache2 restart

5. Testing PHP5Getting details about your PHP5 installation

The document root of the default web site is /var/www. We will now create a small PHP file (info.php) in that directory and call it in a browser. The file will display lots of useful details about our PHP installation, such as the installed PHP version.

vi /var/www/info.php

Insert this code in info.php:

<?php
phpinfo();
?>

Now we call that file in a browser (e.g. http://192.168.0.100/info.php):

As you see, PHP5 is working, and it's working through the Apache 2.0 Handler, as shown in the Server API line. If you scroll further down, you will see all modules that are already enabled in PHP5. MySQL is not listed there which means we don't have MySQL support in PHP5 yet.

6. Getting MySQL Support In PHP5

To get MySQL support in PHP, we can install the php5-mysql package. It's a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this:

If you have other installations of java / javac can be configured using the following commands:sudo update-alternatives --config java
sudo update-alternatives --config javac

Also if you want setear JRE_HOME JAVA_HOME or as environment variables, we must go to:sudo gedit /etc/environment

Here we record the routes where we have installed Java, in our case is as follows:JAVA_HOME = "/usr/local/jdk1.6.0_23/bin/" (add)
JRE_HOME = "/usr/local/jdk1.6.0_23/jre" (add)
PATH ="...(other routes):$JAVA_HOME:$JRE_HOME (edit)

PostgreSQL is a database management system relational database and object-oriented free, released under the BSD license.

Installation
To install from Ubuntu to run in console the following line:

sudo apt-get install postgresql postgresql-client pgadmin3

This installs the engine and pgadmin3 client, a graphical tool to manage databases.
The next thing is to change the administrator password system PostgreSQL:

sudo passwd postgres

Now we must change the password of "user postgres" on the engine, it first entered with the following line:

psql -h localhost -U postgres -W template1

and then enter the following command:

ALTER USER postgres WITH PASSWORD 'password';

Finally out of postgres, enter the following command:

\q

With this we have installed PostgreSQL. Settings
We set up remote access to our motor. This step is optional, only if you want to allow access to our server from other hosts.
First we edit the file postgresql.conf:

Then we let in a more appropriate directory, in our case in / usr/share/tomcat7, but can be in any directory. We do this with the command:

sudo mv apache-tomcat-7.0.8/ /usr/share/tomcat7

Now we define the environment variables JAVA_HOME and JRE_HOME. This file is in the "environment" in / etc. Command to edit the file:

sudo gedit /etc/environment

Here we record the routes where we have installed Java in my case this is as follows:

JAVA_HOME="/usr/local/jdk1.6.0_23"

JRE_HOME="/usr/local/jdk1.6.0_23/jre"

PATH="...(other path):$JAVA_HOME:$JRE_HOME"

IMPORTANT: Verify the routes where they have installed Java.

I have had some problems in defining these environment variables, as sometimes tomcat does not recognize, but a surefire way of recognizing that tomcat is to define the file paths inside "catalina.sh"located in tomcat7/bin. To modify this file use the command:

sudo gedit /usr/share/tomcat7/bin/catalina.sh

Now just insert the JAVA_HOME and JRE_HOME after the first line, so the file is as follows:

Using CATALINA_BASE: /usr/share/tomcat7
Using CATALINA_HOME: /usr/share/tomcat7
Using JRE_HOME: /usr/local/jdk1.6.0_20/jre
Using CLASSPATH: /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar

venerdì 7 gennaio 2011

Polifemo is my new project. This is a software that integrates dynamic data, including data about products and services directly from the shared database and management of those with an economic activity. These data are integrated into a geographic map.

The idea then is to create value-added data that until now were only used for personal purposes. Sharing and integration would therefore benefit not only users but also those who decide to share their data. The next goals are to integrate the products and services and implement the search functions, optimizing the connectors so as to minimize the calls to the servers that share data, create a more usable client, view the bus routes and means of transport.