Install JDK 6 with the following command:
apt-get install default-jdk
Download the latest OFBiz version, extract it in your home directory and do the following steps described in the README file.
Having apache-ofbiz-XX.XX.XX as the current directory execute the following command:
Today I successfully installed Tomcat 7 on Ubuntu Server 12.4 LTS with the following commands (executed as root):
apt-get install default-jdk
apt-get install tomcat7
apt-get install tomcat7-admin
apt-get install tomcat7-examples
I’ve been making small changes to my Joomla 1.5 (PHP) website for about two years without using any kind of version control, but recently I heard that Git is a good one and it is even supported by MS Visual Studio 2012. So I installed Git Client on my Ubuntu Server and did typical steps to add my website to the local repository.
git add www/
git commit -m "First commit" www/
Git installs as a normal package on Ubuntu Server 12.04.2 LTS:
sudo apt-get install git
Configuring Git user is an optional step:
git config --global user.email "firstname.lastname@example.org"
git config --global user.name "Your Name"
Type the following command to create an empty repository wherever your code is:
This is a draft version of the post. It’ll be revised.
Installing Ubuntu Server
- Download the latest version of Ubuntu Server. Note that it is not possible to convert Ubuntu 32 bit to 64 bit. The only way is to do a clean install.
- Create a bootable USB stick using Pen Drive Linux’s USB Installer.
- Boot up from USB and install Ubuntu Server. During the installation you can switch to terminal mode by pressing Alt+F2 and switch back by pressing Alt+F1.
Update the server:
Install FTP server:
apt-get install proftpd
To jail all users in their home directories uncomment line
in /etc/proftpd/proftpd.conf. To jail all but one users modify this line as follows:
DefaultRoot ~ !<user1>
note that there is a space after ‘~’.
Preventing sendmail from been very slow
The first thing that I did after installing sendmail with
aptitude install sendmail
is I put “gate.localhost” (gate is my server name) to /etc/hosts so it looks like this:
127.0.0.1 localhost.localdomain localhost
127.0.1.1 gate.localhost gate
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
With default /etc/hosts containing only “gate” and “localhost” sendmail hangs up for a while and writes to /var/log/mail.log the following message:
My unqualified host name (gate) unknown; sleeping for retry.
Running Apache virtual hosts as different users
By default, Apache on Ubuntu executes all PHP scripts under www-data user, hence in situations where multiple mutually distrusting users have the possibility to put their PHP scripts on the server they could potentially spy on each other private data.
For example, the user user1 could put a PHP script that access file ‘file1.txt’ belonging to user2: