Set Ubuntu Server Time through Terminal

Get the current server time by just typing “date” in the terminal.

Install Time Zone
1 $sudo aptitude install tzdata
2 $dpkg-reconfigure tzdata
3 $sudo vim /etc/ntp.conf

Add NTP server
1 driftfile /var/lib/ntp/ntp.drift
2 server 0.pool.ntp.org
3 server 1.pool.ntp.org
4 server 2.pool.ntp.org
5 server pool.ntp.org

Manually update the time by “$sudo ntpdate pool.ntp.org”

changing port tomcat

If you get this message after start tomcat

SEVERE: Error initializing endpoint
java.net.BindException: Address already in use:8080

Means you will to change tomcat’s port, here is how to do, go to
$CATALINA_HOME/conf/server.xml

change

<connector port:8080

to

<connector port:8083

If you running in multiple catalina services, you should create new shell script and include different $CATALINE_HOME and $CATALINA_BASE into it

First, check on your $CATALINA_HOME/conf/server.xml

Install all programs on a newly installed ubuntu system

If you’re running Ubuntu there is a neat way of installing all of your programs on a newly installed Ubuntu system.
Run the following command on the ‘old’ Ubuntu installation.
“dpkg –get-selections > installed-software”

You’ll end up with a file called installed-software. Copy the file to a usb key and copy it to a location on your backtrack machine.
Run: “dpkg –set-selections < installed-software” in the directory where you copied the file installed-software.
Finally the “sudo apt-get dselect-upgrade” commands completes all of this. Be aware that is might take while until the installtion finishes.

If the above doesn’t work, you probably do not have dselect installed.
In that case, run “apt-get install deselect”
The above instructions also work on BackTrack 5