Thursday, February 24, 2011

How to enable/disable root account on Ubuntu

If you want to enable root account (which is not recommended) enter the following command:
sudo passwd root
This will prompt for a new root password and once you confirm it, you can start using the root account to login.
If you want to disable root account in ubuntu you need to lock the root account by using the following command
sudo passwd -l root
If you want to work on a root console you’d better use the following command
sudo -i

Wednesday, February 23, 2011

Hot to Start/Stop/Restart Tomcat on Ubuntu Server (10.10)


During the installation of Ubuntu you can choose to install and configure automaticaly Tomcat 6. Here are the commands to start/stop/restart the server:

Start:
sudo /etc/init.d/tomcat6 start

Stop:
sudo /etc/init.d/tomcat6 stop

Restart:
sudo /etc/init.d/tomcat6 restart

Tuesday, February 22, 2011

How to install BOTS EDI on Ubuntu Server 10.10 with MySQL Database

Bots is complete software for EDI (Electronic Data Interchange): translate and communicate.
All major edi data formats are supported: edifact, x12, tradacoms, xml.
Here some tips for the installation process on ubuntu server using mysql instead of sqlite as database
Fisrst of all we need to install the following packages:
sudo apt-get install python-cherrypy3 python-django python-mysqldb python-sqlalchemy
Let's create a new user and db schema for BOTS:
mysql -h localhost -u root -p
CREATE DATABASE botsdb CHARACTER SET 'utf8';
CREATE USER 'bots'@'localhost' IDENTIFIED BY 'botsbots';
GRANT ALL PRIVILEGES ON botsdb.* TO 'bots'@'localhost';
Download the program and uncompress it, then check if you have installed python (normally should be already installed), if not go to synaptic and search python select it and install it (the dependencis will be installed automatcatly)
tar -xzvf bots-2.0.2.tar.gz
django-admin syncdb --pythonpath='/home/danilo/bots-2.0.2/bots' --settings='bots.config.settings'

sudo python setup.py install
defde

Monday, February 21, 2011

How to share a folder on virtual box with Windows Host and Ubuntu Guest

Start Ubuntu on Virtual Box then follow these steps:
  1. On the virtual box menu go to Device > Shared Folder
  2. Add a new shared folder
  3. Select the windows path to the folder you want to share and then give a name to the folder (f.i. MY_WINDOWS).
  4. Select "Permanent" to permanently share this folder.
  5. Now is the time to mount this shared windows folder on a ubuntu folder. So lets create a folder in our home directory and lets name it WINDOWS_FOLDER
  6. from the command line:
    sudo mkdir /home/danilo/WINDOWS_FOLDER
  7. So now that we created the folder on Ubuntu lets mount on it the windows folder:
    sudo mount.vboxsf MY_WINDOWS /home/danilo/WINDOWS_FOLDER 
  8. Done!
Now you can write/read to/from this folder

If you want to mount this folder when ubuntu start open a terminal and write:

sudo nano -w /etc/rc.local
Add this line to the file:
mount.vboxsf MY_WINDOWS /home/danilo/WINDOWS_FOLDER

<press ctrl-x to save>

Ciao