Saturday, 17 August 2013

Setting up a drupal enviroment dev, live and production so it all works...

Setting up a drupal development environment on Ubuntu.

1. Virgin ubuntu install.

  • sudo apt-get update
  • sudo apt-get dist-upgrade #make ubuntu the latest and greatest.
  • sudo apt-get install tasksel# fantastic install tool (tasksel on cmd line)
  • sudo tasksel install lamp-server (reference)#(Will set up apache php etc)
Enter your root password
  • mysql -u root -p (Log in and ensure name/password combo work)
  • sudo apt-get install build-essential php5-dev php5-gd php-pear 
  • phpmyadmin php5-curl
(FYI: This loaded 82.5 MB on my server)
I ran apt-get autoremove afterwards; YMMV
  1. sudo a2enmod rewrite
  2. sudo pecl install uploadprogress
  • sudo vim /etc/php5/apache2/php.ini (Add extension=uploadprogress.so as instructed)
  • sudo vim /etc/apache2/sites-available/default
  1. Change the "AllowOverride None" line to "AllowOverride All"
  2. (Ensure that default site settings are what you expect and are on valid paths)
  • sudo service apache2 restart
  1. You may see the inconsequential warning about "Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName" If that bugs you, you can always add "ServerName localhost" to the bottom of /etc/apache2/apache2.conf
  • sudo apt-get install drush # better to wget the latest version from drupal.org as ubuntu is always out of date. 
  • cd /var
  • sudo drush dl drupal --drupal-project-rename=www
  1. Install location /var/www already exists. Do you want to overwrite it? (y/n): y FYI: This will overwrite the apache default www directory
  • sudo chown -Rv www-data:www-data /var/www
  1. cd www
  2. sudo drush site-install standard --db-url="mysql://root:s73jd76sj3wu1@localhost/drupaltest" --site-name=drupaltest
  • Go to http://localhost/admin/reports/status and enjoy the report -

    Full credit to : http://www.skrinakcreative.com/2012/12/23/making-ubuntu-server-1210-drupal-ready#sthash.NvEShlGR.dpuf for all this.

  • I did not place my www in var - i stuck it on my desktop.
    I will add the following to this guide. All this is from my working setup - obviously you will have to replace all the paths yourself for your setup.
    You will want to set up drush bashrc for your shell in your home directory. See the Drush examples folder - you can find this using locate or whereis to find where drush lives and setup the bash shell.#
    sudo nano ~/.bashrc
    and add this at bottom of file
# 20130810 - Add path to .drush_bashrc to bash command line
if [ -f ~/.drush_bashrc ] ; then
        . ~/.drush_bashrc
fi
     
    I edited /Etc/hosts and added; 
127.0.0.1       ukipliverpool.org
127.0.0.1       www.ukipliverpool.org
127.0.0.1       dev.ukipliverpool.org
127.0.0.1       www.dev.ukipliverpool.org

    You will also need to setup drush aliases for www/yoursite.org/dev live and production. 
    I placed mine in - here is a working file and its location. 
/home/tony/Desktop/www/ukipliverpool/live/aliases.drushrc.php
    sites/all/drush/
    <?php
      // File: ukipliverpool.aliases.drushrc.php
       $aliases['dev'] = array(
         'root' => '/home/tony/Desktop/www/ukipliverpool/dev',
         'uri' => 'dev.ukipliverpool.org',
       );
    /*
       $aliases['live'] = array(
         'root' => '/home/tony/Desktop/www/ukipliverpool/live',
         'uri' => 'ukipliverpool.org',
       );
    */
    ?>
 The next thing to know is that in ubuntu's install of apache2 you have
sites-available and sites-enabled

locate sites-enabled

sudo nano ..xxx/sites-available/dev.ukipliverpool.org
<VirtualHost *:80>

    ##ServerAdmin webmaster@dummy-host.example.com

    DocumentRoot "/home/tony/Desktop/www/ukipliverpool/dev"

    ServerName dev.ukipliverpool.org

    ServerAlias www.dev.ukipliverpool.org

    ##ErrorLog "logs/dummy-host.example.com-error.log"

    ##CustomLog "logs/dummy-host.example.com-access.log" common

        <Directory "/home/tony/Desktop/htdocs/www/ukipliverpool/dev">

                Options Indexes FollowSymLinks

                AllowOverride All

                Order allow,deny

                allow from all

        </Directory>

</VirtualHost>

type a2 and then tab (twice) on the command line from sites-available - you can see the apache2 commands.

To enter your site into the sites-enabled sites (which are enabled by apache2) you type sudo a2ensite www.yoursite.org
(then it shows you how to restart apache2)
Ok - some other things to do before you really get going.

You will likely want to  locate apache2/php.ini and increase the size of
the following
memory_limit = 256M
max_execution_limit =-1
post_max_size = 50M

so your dev enviroment doesn't resemble the tiny resources of a shared server and you can operate properly and run scripts properly;

phpmyadmin

http://localhost/phpmyadmin/
If this doesn't work you must follow the troubleshooting guide. It didn't work for me initially, but I got it going on a 2nd attempt by following the guide
http://wiki.phpmyadmin.net/pma/Welcome_to_phpMyAdmin_Wiki










  • sudo apt-get update
  • sudo apt-get dist-upgrade
  • sudo apt-get install tasksel
  • sudo tasksel install lamp-server (reference)
    1. Enter your root password
  • mysql -u root -p (Log in and ensure name/password combo work)
  • sudo apt-get install build-essential php5-dev php5-gd php-pear
    1. (FYI: This loaded 82.5 MB on my server)
    2. I ran apt-get autoremove afterwards; YMMV
  • sudo a2enmod rewrite
  • sudo pecl install uploadprogress
  • sudo vim /etc/php5/apache2/php.ini (Add extension=uploadprogress.so as instructed)
  • sudo vim /etc/apache2/sites-available/default
    1. Change the "AllowOverride None" line to "AllowOverride All"
    2. (Ensure that default site settings are what you expect and are on valid paths)
  • sudo service apache2 restart
    1. You may see the inconsequential warning about "Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName" If that bugs you, you can always add "ServerName localhost" to the bottom of /etc/apache2/apache2.conf
  • sudo apt-get install drush (I love that I can do this)
  • cd /var
  • sudo drush dl drupal --drupal-project-rename=www
    1. Install location /var/www already exists. Do you want to overwrite it? (y/n): y FYI: This will overwrite the apache default www directory
  • sudo chown -R www-data:www-data /var/www
    1. I'm finding sudo chown -R username:www-data /var/www works better
  • cd www
  • sudo drush site-install standard --db-url="mysql://root:s73jd76sj3wu1@localhost/drupaltest" --site-name=drupaltest
  • Go to http://localhost/admin/reports/status and enjoy the report
  • - See more at: http://www.skrinakcreative.com/2012/12/23/making-ubuntu-server-1210-drupal-ready#sthash.NvEShlGR.dpuf







  • sudo apt-get dist-upgrade
  • sudo apt-get install tasksel
  • sudo tasksel install lamp-server (reference)
    1. Enter your root password
  • mysql -u root -p (Log in and ensure name/password combo work)
  • sudo apt-get install build-essential php5-dev php5-gd php-pear
    1. (FYI: This loaded 82.5 MB on my server)
    2. I ran apt-get autoremove afterwards; YMMV
  • - See more at: http://www.skrinakcreative.com/2012/12/23/making-ubuntu-server-1210-drupal-ready#sthash.NvEShlGR.dpuf






  • sudo apt-get update
  • sudo apt-get dist-upgrade
  • sudo apt-get install tasksel
  • sudo tasksel install lamp-server (reference)
    1. Enter your root password
  • mysql -u root -p (Log in and ensure name/password combo work)
  • sudo apt-get install build-essential php5-dev php5-gd php-pear
    1. (FYI: This loaded 82.5 MB on my server)
    2. I ran apt-get autoremove afterwards; YMMV
  • - See more at: http://www.skrinakcreative.com/2012/12/23/making-ubuntu-server-1210-drupal-ready#sthash.NvEShlGR.dpuf






  • sudo apt-get update
  • sudo apt-get dist-upgrade
  • sudo apt-get install tasksel
  • sudo tasksel install lamp-server (reference)
    1. Enter your root password
  • mysql -u root -p (Log in and ensure name/password combo work)
  • sudo apt-get install build-essential php5-dev php5-gd php-pear
    1. (FYI: This loaded 82.5 MB on my server)
    2. I ran apt-get autoremove afterwards; YMMV
  • - See more at: http://www.skrinakcreative.com/2012/12/23/making-ubuntu-server-1210-drupal-ready#sthash.NvEShlGR.dpuf






  • sudo apt-get update
  • sudo apt-get dist-upgrade
  • sudo apt-get install tasksel
  • sudo tasksel install lamp-server (reference)
    1. Enter your root password
  • mysql -u root -p (Log in and ensure name/password combo work)
  • sudo apt-get install build-essential php5-dev php5-gd php-pear
    1. (FYI: This loaded 82.5 MB on my server)
    2. I ran apt-get autoremove afterwards; YMMV
  • sudo a2enmod rewrite
  • sudo pecl install uploadprogress
  • sudo vim /etc/php5/apache2/php.ini (Add extension=uploadprogress.so as instructed)
  • sudo vim /etc/apache2/sites-available/default
    1. Change the "AllowOverride None" line to "AllowOverride All"
    2. (Ensure that default site settings are what you expect and are on valid paths)
  • sudo service apache2 restart
    1. You may see the inconsequential warning about "Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName" If that bugs you, you can always add "ServerName localhost" to the bottom of /etc/apache2/apache2.conf
  • sudo apt-get install drush (I love that I can do this)
  • cd /var
  • sudo drush dl drupal --drupal-project-rename=www
    1. Install location /var/www already exists. Do you want to overwrite it? (y/n): y FYI: This will overwrite the apache default www directory
  • sudo chown -R www-data:www-data /var/www
    1. I'm finding sudo chown -R username:www-data /var/www works better
  • cd www
  • sudo drush site-install standard --db-url="mysql://root:s73jd76sj3wu1@localhost/drupaltest" --site-name=drupaltest
  • Go to http://localhost/admin/reports/status and enjoy the report
  • - See more at: http://www.skrinakcreative.com/2012/12/23/making-ubuntu-server-1210-drupal-ready#sthash.NvEShlGR.dpuf






  • sudo apt-get update
  • sudo apt-get dist-upgrade
  • sudo apt-get install tasksel
  • sudo tasksel install lamp-server (reference)
    1. Enter your root password
  • mysql -u root -p (Log in and ensure name/password combo work)
  • sudo apt-get install build-essential php5-dev php5-gd php-pear
    1. (FYI: This loaded 82.5 MB on my server)
    2. I ran apt-get autoremove afterwards; YMMV
  • sudo a2enmod rewrite
  • sudo pecl install uploadprogress
  • sudo vim /etc/php5/apache2/php.ini (Add extension=uploadprogress.so as instructed)
  • sudo vim /etc/apache2/sites-available/default
    1. Change the "AllowOverride None" line to "AllowOverride All"
    2. (Ensure that default site settings are what you expect and are on valid paths)
  • sudo service apache2 restart
    1. You may see the inconsequential warning about "Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName" If that bugs you, you can always add "ServerName localhost" to the bottom of /etc/apache2/apache2.conf
  • sudo apt-get install drush (I love that I can do this)
  • cd /var
  • sudo drush dl drupal --drupal-project-rename=www
    1. Install location /var/www already exists. Do you want to overwrite it? (y/n): y FYI: This will overwrite the apache default www directory
  • sudo chown -R www-data:www-data /var/www
    1. I'm finding sudo chown -R username:www-data /var/www works better
  • cd www
  • sudo drush site-install standard --db-url="mysql://root:s73jd76sj3wu1@localhost/drupaltest" --site-name=drupaltest
  • Go to http://localhost/admin/reports/status and enjoy the report
  • - See more at: http://www.skrinakcreative.com/2012/12/23/making-ubuntu-server-1210-drupal-ready#sthash.NvEShlGR.dpuf






  • sudo apt-get update
  • sudo apt-get dist-upgrade
  • sudo apt-get install tasksel
  • sudo tasksel install lamp-server (reference)
    1. Enter your root password
  • mysql -u root -p (Log in and ensure name/password combo work)
  • sudo apt-get install build-essential php5-dev php5-gd php-pear
    1. (FYI: This loaded 82.5 MB on my server)
    2. I ran apt-get autoremove afterwards; YMMV
  • sudo a2enmod rewrite
  • sudo pecl install uploadprogress
  • sudo vim /etc/php5/apache2/php.ini (Add extension=uploadprogress.so as instructed)
  • sudo vim /etc/apache2/sites-available/default
    1. Change the "AllowOverride None" line to "AllowOverride All"
    2. (Ensure that default site settings are what you expect and are on valid paths)
  • sudo service apache2 restart
    1. You may see the inconsequential warning about "Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName" If that bugs you, you can always add "ServerName localhost" to the bottom of /etc/apache2/apache2.conf
  • sudo apt-get install drush (I love that I can do this)
  • cd /var
  • sudo drush dl drupal --drupal-project-rename=www
    1. Install location /var/www already exists. Do you want to overwrite it? (y/n): y FYI: This will overwrite the apache default www directory
  • sudo chown -R www-data:www-data /var/www
    1. I'm finding sudo chown -R username:www-data /var/www works better
  • cd www
  • sudo drush site-install standard --db-url="mysql://root:s73jd76sj3wu1@localhost/drupaltest" --site-name=drupaltest
  • Go to http://localhost/admin/reports/status and enjoy the report
  • - See more at: http://www.skrinakcreative.com/2012/12/23/making-ubuntu-server-1210-drupal-ready#sthash.NvEShlGR.dpuf






  • sudo apt-get update
  • sudo apt-get dist-upgrade
  • sudo apt-get install tasksel
  • sudo tasksel install lamp-server (reference)
    1. Enter your root password
  • mysql -u root -p (Log in and ensure name/password combo work)
  • sudo apt-get install build-essential php5-dev php5-gd php-pear
    1. (FYI: This loaded 82.5 MB on my server)
    2. I ran apt-get autoremove afterwards; YMMV
  • sudo a2enmod rewrite
  • sudo pecl install uploadprogress
  • sudo vim /etc/php5/apache2/php.ini (Add extension=uploadprogress.so as instructed)
  • sudo vim /etc/apache2/sites-available/default
    1. Change the "AllowOverride None" line to "AllowOverride All"
    2. (Ensure that default site settings are what you expect and are on valid paths)
  • sudo service apache2 restart
    1. You may see the inconsequential warning about "Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName" If that bugs you, you can always add "ServerName localhost" to the bottom of /etc/apache2/apache2.conf
  • sudo apt-get install drush (I love that I can do this)
  • cd /var
  • sudo drush dl drupal --drupal-project-rename=www
    1. Install location /var/www already exists. Do you want to overwrite it? (y/n): y FYI: This will overwrite the apache default www directory
  • sudo chown -R www-data:www-data /var/www
    1. I'm finding sudo chown -R username:www-data /var/www works better
  • cd www
  • sudo drush site-install standard --db-url="mysql://root:s73jd76sj3wu1@localhost/drupaltest" --site-name=drupaltest
  • Go to http://localhost/admin/reports/status and enjoy the report
  • - See more at: http://www.skrinakcreative.com/2012/12/23/making-ubuntu-server-1210-drupal-ready#sthash.NvEShlGR.dpuf






  • sudo apt-get update
  • sudo apt-get dist-upgrade
  • sudo apt-get install tasksel
  • sudo tasksel install lamp-server (reference)
    1. Enter your root password
  • mysql -u root -p (Log in and ensure name/password combo work)
  • sudo apt-get install build-essential php5-dev php5-gd php-pear
    1. (FYI: This loaded 82.5 MB on my server)
    2. I ran apt-get autoremove afterwards; YMMV
  • sudo a2enmod rewrite
  • sudo pecl install uploadprogress
  • sudo vim /etc/php5/apache2/php.ini (Add extension=uploadprogress.so as instructed)
  • sudo vim /etc/apache2/sites-available/default
    1. Change the "AllowOverride None" line to "AllowOverride All"
    2. (Ensure that default site settings are what you expect and are on valid paths)
  • sudo service apache2 restart
    1. You may see the inconsequential warning about "Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName" If that bugs you, you can always add "ServerName localhost" to the bottom of /etc/apache2/apache2.conf
  • sudo apt-get install drush (I love that I can do this)
  • cd /var
  • sudo drush dl drupal --drupal-project-rename=www
    1. Install location /var/www already exists. Do you want to overwrite it? (y/n): y FYI: This will overwrite the apache default www directory
  • sudo chown -R www-data:www-data /var/www
    1. I'm finding sudo chown -R username:www-data /var/www works better
  • cd www
  • sudo drush site-install standard --db-url="mysql://root:s73jd76sj3wu1@localhost/drupaltest" --site-name=drupaltest
  • Go to http://localhost/admin/reports/status and enjoy the report
  • - See more at: http://www.skrinakcreative.com/2012/12/23/making-ubuntu-server-1210-drupal-ready#sthash.NvEShlGR.dpuf

    Saturday, 15 September 2012

    Setting up WEBDAV to share files over the Wifi (for a linux server - behind the firewall - i.e. using network addresses only).



    Setup Apache2 if not installed, 
    Also - make sure you enable the dav modules on apache2

    a2enmod dav
    a2enmod dav_fs
    /etc/init.d/apache2 restart
     
    1. Enter the following in httpd.conf (httpd.conf can be found in /etc/apache2 or elsewhere - depends on how apache was installed)

    Alias /mywebdav /YourDirectory/
    <Location /mywebdav>
    Dav On
    Order Allow,Deny
    Allow from all
    AuthType Digest
    AuthName "Remote Drive"
    AuthUserFile /YourDirectory/user.passwd
     require user tony
    </Location>

    2.
     htdigest -c "/YourDirectory/user.passwd" "Remote Drive" YourUser
    (enter your password for YourUser)
    3.
    /etc/init.d/apache2 reload
     
    4.aptitude install cadaver
     
    5.cadaver http://192.168.1.17/mywebdav
    (please install cadaver - it will test access to your webdav filesystem out before setting up your phone)
     access problems can be - mispelt names, apache2 cannot access your directory etc..)
     
    6. On your nokia symbian phone - E72 E6 etc.. use the File Mgr
    Options-> Remote Drive -> Map new drive 
    Name: mywebdav
    Address:  http://192.168.1.17/mywebdav
    UserName: YourUser
    Password: 
    
    
    
    You can now move files between your server/nas and your phone!  

    Saturday, 14 August 2010

    WIFI Hotspots and voip

    Just out of interest and because I was there for other reasons I went into my city centre today, to see what free wifi zones where about. Wetherspoons and McDonalds carry free Wifi, and more and more zones are opening up in Libraries etc... I was pleased at being able to post pictures/photos while sitting in a Wetherspoons/Mcdonalds, and was quite shocked when I tried my voip service to find that it worked on one hotspot and was good quality.

    You will find you have to register and log in via the web to get full use out of them though. It was astonishing that the VOIP worked in Mcdonalds when no STUN server was setup. Anyway had to change my password and account details after trying that on my VOIP account. I have since noticed that FRING, an application you can dload though the OVI store on the mobile has VOIP which can be used presumabley without sending passwords in plaintext to the VOIP service provider, and hopefully will use SSL. Something to check out later.

    Thursday, 12 August 2010

    I have a linux mail server - setting up mail on the Nokia E72

    One of the key things with the Nokia e72 is email - it can sync to outlook via exchange, and although its weaker at push email it's not too bad. Its main drawbacks with email seem to be sent email is not sent to the exchange server 'sent' folder and is instead kept on the phone, and with mail sorted into server side subdirectories their is no 'new mail' indication.
    Anyway - I don't care about all of that I need it to interface with my own non-microsoft server.
     
    I have a very low power 8watt linux sheevaplug server which runs something called DOVECOT as a IMAP mail server. Procmail is used as an MTA (mail transfer agent). It might sound like a pile of alphabetii spagettii but its a lot easier than it looks once you have a decent guide and simply get down to setting it up.

    http://tuxradar.com/content/get-started-fetchmail-procmail-and-dovecot

    Behind the scenes I also run something called FETCHMAIL which logs into all my email accounts and retreives all my mail. Before getting the Nokia e72, I have been happly running a email client on my PC called ThunderBird + Lighting which handles all the DOVECOT mail.


    I setup a pile of rules in Thunderbird to sort all the nonsense mail into various folders. Now I would simply like to configure this setup so that I can login anywhere with my Nokia E72 and read my mail and send from it.

    This means 2 things need to occur ;
    1. The folders have to be organised on my mail-server as the mail comes in, not the client - because the Nokia E72 mail client is not going to be churning through sorting mail when I connect!.
    2.The Mail server has to be exposed to the internet so i can pick up mail from a fixed IP point

    Anyone who knows what its like setting up things in linux knows the trawl you embark on to find this or that setting which is carefully guarded by the chief autistic linux savant know it-all C++ developer, who views anyone who doesn't know how to do it as an idiot, and the only way to get the information on making the THING WORK is accessed after the required 30-40 hours of trawling finding some post on a long forgotton forum. What - it 'sounds like a chance to save hours at my expense'!
    Yes - your right.

    First thing to do is to get a web address for your server via something like DynDNS. Sign up for this and make a note of  your address. Then install ddclient via 'apptitude' or 'apt-get install ddclient' or whatever and edit the /etc/ddclient.conf file, following the instructions and providing the new address. You will always be able to see your server on the internet now, but should not be able to access it other than by ping as your firewall will protect it. 
     For mail:
    1. You need to change the NAT settings in your router so that IMAPSSL on port 993 is allowed and TCP traffic is passed to your server on 192.168.1.x (You may be able to use a 'virtual server' to do this on your router).
    2. You have to change a few settings in dovecot -
    mainly 'protocol = imaps managesieve' and the ssl settings enabled (they are commented out by default)
    all described in this guide http://tuxradar.com/content/get-started-fetchmail-procmail-and-dovecot

    You don't have to create your own SSL certificate as this guide states - so ignore that - you simply use the certificate directory under /etc/ssl by changing this setting in the ssl section of the /etc/dovecot.conf guide. When you connect you accept the client side certificate on the mobile device to establish the SSL connection..

    And thats that - except for sieve...and managing the mail into its folders on the server...

    BTW: handy little add onto thunderbird to manage sieve serverside mailboxes and rules  from Thunderbird!
    https://addons.mozilla.org/af/thunderbird/addon/2548/

    Got myself a Nokia e72

    Great phone. For me - Most important are its SIP (Voip) and WIFI combination. I am not going into the ins and outs of the phone, GPS, Camera etc.. they are all great as far as I can see - you can check out hundreds of other guides for that on youtube whatever. Its nearest rival is the Blackberry bold 9700, better screen but  which has no SIP stack so your WIFI cannot be used for VOIP calls basically (The BB 9700 is also worst build quality - this Nokia e72 is made of steel and feels great).

    SETTING UP SIP ON THE NOKIA E72
    (of course all of this TOOK HOURS - AT MY EXPENSE!!! arrgh meaning you can SAVE HOURS)
    I reset and formatted my phone to ensure no problems before trying this. I got my WIFI all working as well.  
    Another reason for formatting was to get rid of the very sad lill liam n'DUBZ theme which made me feel it was basically a gangsta rappers phone left lying around. God knows what Nokia marketing is on to stick a gansta rapper theme, along with other below Z listers to utterly pollute a top end 'business' phone so you cannot even find the control panel. It looks like they even tried to get rid of SIP.

    1. First thing - SIP CANNOT be accessed and make to work without downloading and installing Advanced VOIP Settings from the Nokia Website.  * SIP 3.x VOIP * is the one you want.

    Then I setup my betamax account for calls as follows;.

    Justvoip is my SIP provider, you will have to subsitute with your own.

    MENU > CRTL PANEL > SETTINGS> CONNECTIONS > SIP Settings
    Create Profile
    Profile Name: justvoip (or whatever you want)
    Service Profile : IETF
    Default Destination : sip.justvoip.com
    public username : myname@justvoip.com
    Use compression : No
    Use Compression : No
    >Proxy Server -
    Proxy Server Address: sip.justvoip.com
    Realm : justvoip.com
    Username : MyName
    Password : MyPassword
    Allow loose routing: Yes
    Transport Type: UDP
    Port:
    > Register - All the same as entered in proxy
    2. Then goto Net Settings > AdvancedVOIP Service, create new service, select Justvoip, and ACTIVATE.
    The service should now be working - but you will notice bad quality or no sound at all when using it.

    The reason for this is because your router and internet firewall is blocking all the internet traffic that is going to and from your external internet ip address (eg; 209.112.344.232:5060) Your phone will have a random addess inside your network of the form (eg; 192.168.1.23) to direct traffic to and from. Your router has to Network Address Translate (NAT) the SIP VOIP traffic to your nokia e71/72 etc.. at 192.168.1.23:5060 (and other ports) from the one external internet IP address, but hasn't been told to do this properly - when it gets traffic to the SIP port what network device does it give it to?. Also your firewall will likely be blocking the 5060 and other SIP ports.

    http://www.feptias.co.uk/AdviceSIPNATSolutions.htm

    At this stage in getting everything to work we want to bypass the router and firewall because thats a pile of complication we don't need to worry about! - so lets set up the Nokia in the DMZ (the routers DeMilitarized zone which exposes the Nokia addess 192.168.1.23 directly to the internet with no protection.

    Getting the Nokia E72 into the DMZ. 
    1. First we need to get the phones mac address (see below codes, or get this from your router's 'leases' ).

    2. Then in your router, find the DHTP server and MANUALLY add the mac address to the desired IP address (eg: 192.168.1.23) so that your nokia ALWAYS connects to this address.

    3. When you make sure thats all working, you set this address to be exposed in the DMZ of the router. Done?.

    OK - now you can call - but the next thing I found I had to change was the codec order as my voice was very low bandwidth and garbed to hell when i called my brother, although he sounded ok.

    FIX UP THE CODECS (what they don't tell you)

    4. Go into Advanced VOIP Settings again, and this time you are looking for VOIP Services. Click on Justvoip (or whatever your service is) and you will find CODECS.
    You will find a list of Codecs Now click OPTIONS->MOVE the 729 Codec to the 1 slot, followed by another high bandwidth codec like iLBC in the number 2 slot.

    NOTE: TO EDIT/CHANGE THE SIP SERVICE - YOU MAY HAVE TO DISABLE THE SIP SERVICE IF ITS ACTIVATED (You do this in the 'standby menu' WIFI search option.

    You will find this option in the first screen/standby screen of the Nokia e72 of enabling and disabling the SIP servers you set up under your WIFI connection. I find you can only run ONE SIP service at a time.

    You can have one for incoming calls and switch to the one for outgoing calls by enabling/disabling each SIP service (its a bit of a pain but not too bad) when you want to make an outgoing call, then when finished you disable it and enable the incoming calls SIP service again.

    OK it was all working ok for me from that point, but I would prefer to get the SIP services STUN server (it negociates the firewall and NAT problems) up and running rather than using the DMZ.

    To do this and have the ATA available (which needs to be in the DMZ) for your phone/answerphone etc for when you are not around, you will have to ;
    A. setup a different incoming SIP listening port and hopefully a different incoming SIP number and account for the E72. This way you can use them together.
    or
    B. Simply turn off/unplug the ATA, and enable the SIP service on the E72 when you want incoming calls diverted to the E72 when your around, you would have previously setup the E72 via STUN settings and fixed WIFI IP to have all the SIP (ports 5060 etc..) traffic diverted to it when the SIP service is enabled. Because there is no ATA active in the DMZ the router has to deal with the SIP traffic rather than the ATA device.

    13/08/2010
    I had real problems when trying to set up sipgate. I configured it all correctly even went into further advanced settings: Media Start Port : 9000 Media End Port: 9004 etc.. which is all shown by going to the sipgate help settings and selecting Nokia N97 rather than Voip Client 3.0.
    I cannot hear the other party whatever setting I use or tweak on incoming calls. They can hear me fine though.
    This implies it could be a UDP issue, because traffic is going out fine but not coming in, trouble is the Nokia is in the DMZ so all incoming traffic goes there first. I tried to set UDP to Automatic seeing if that would make any difference - but it just turned my voice unintelligable. Next thing is to try the TCP setting, but i doubt that would work.

    However, when I call my sipgate voicemail, (by dialing 50000 as an internet call) via the sipgate sip provider I can hear and send keytones perfectly ok. The problem is purely affecting incoming calls. (You can easily setup sipgate voicemail by entering 50000@sipgate.co.uk into the voicemail fields - see the N97 setup under sipgates site.)
    After hours of trawling the internet, there seems to be no solution to this MAJOR fault. OUTGOING caals work fine, but INCOMING calls - you cannot head the other party. I have a sopisticated router which has placed the E92 into the DMZ - so there can be no NAT/Firewall issues causing this. Its unlikely to be a setting I haven't set unless there is one undocumented - it must be purely down to the SIP VOIP client on the E72 and the way it handles calls!
    Anyway - not worth the biscuit to go further into this I will just setup my ATA again and then setup the STUN and NAT forward ports on the router for the E72 so I can make outgoing calls.  

    Nokia E series codes : Access from first screen (standby menu)
    *#0000# -  Software revision, etc.
    *#06# - " N" - IMEI
    *#2820# - "#BTA # - Bluetooth Address
    *#62209526# - *#MAC WLAN# - MAC Address
    *#7780# - *#RST # - Restore Factory Defaults
    *#7370# - *#RES # - Hard Reset
    *#92702689# - *#WAR ANTY# - Life Timer
    *#746025625# - *#SIM CLOCK# - SIM Clock status