Search This Blog

Tuesday, April 21, 2009

Installing PostgreSQL (hard version)

In a previous post I showed how to install PostgreSQL using Windows installer. It was quite easy. But ...
There are people that do not play with such ease, what is more, they can not stand when the system is doing something for them in the background, when something is installed - some services, user accounts... They feel insecure, they are suspicious - only the execution of all activities from the command line calms their nerves.

This time, I prepared the description for the people who love technical masturbation and who love to do everything manually and have everything under control. We'll become the PostgreSQL installer and manually execute all the installation steps to get an effect similar to using Windows Installer. So, let's get to work.

Requirements:
  • we are working on the account with Administrator rights (or we belong to the Administrators group)
  • database will be installed to C:\Development\PostgreSQL (the same as when using Windows Installer)
  • disable all antivirus/firewall (this one from Windows too)
Step 1: download the version of the installation file (.zip) of PostgreSQL from here. Download the file with the "binaries-no-installer" part in its name.

Step 2: extract the contents of the file from step 1, to C:\Development\PostgreSQL (zip has the pgsql directory and rest of the folders inside it - I recommend to get rid of it and move all subfolders to C:\Development\PostgreSQL - we will have a shorter path). We should get something like this:


Step 3: we need to create an empty directory named "data" in the directory C:\Development\PostgreSQL (along with the rest of the directories from the picture above).

Step 4: create and initialize the database cluster (remember that we are working on the account with Administrator rights). To do this go to the console to the directory C:\Development\PostgreSQL\bin and execute the command:


Desription:
  • option "-U root" means the owner of the database named root - such user account will be created in database (as a superuser)
  • option "-W" means that You will be prompted for a password for this user
  • option "-D .. \ data" means the location of the files for generated database
  • option "- encoding = UTF8" means that the server will have UTF8 encoding by default (each newly created database too!)
After executing this command, we should see sometling like this:


At the bottom, PostgreSQL offers us to run a newly created database using two different commands. It will not work (You can execute those command to see what error is generated) - remember that we are working on account with Administrator rights, and for safety reasons, we can not start and stop the PostgreSQL server on that account. We should create a system service which will run PostgreSQL server process.

--------------------------------------------
The short version:

Step 5: Perform the following command in the console:


That's all. You're done. The service will be created and registered for the Local System Account. This is a special account which can run services, but it is not a typical account with administrator privileges (more info here).

Do not run the service yet.

--------------------------------------------
Long version:

Step 5: continue to imitate the installer. PostgreSQL installer creates a special account with no administrator privileges - so we will also create such account. Acount login and password will be both set to "postgres". We go to Computer Management, then Users:


Now we add new user with login and password postgres:


For the security reason we do not allow to change the password.

We would like now to make "postgres" account able to run the PostgreSQL server. So we need to create and register a special service for this account, which will carry out these operations. Before we do that we need to assign to this account the appropriate permissions to directories where database server is installed.

Step 6: Change the access permissions for the directory server for the postgres account.

And so:
1. Directory C:\Development should only have read permission.
2. Directory C:\Development\PostgreSQL (and its subdirectories) should have all possible permissions.

Step 7: Registering the service.

Using the console go to the directory C:\Development\PostgreSQL\bin and execute there this command:


Description:
  • option -N "PostgreSQL Service" defines the service name
  • option -U postgres says on what account the service is launched
  • option -P postgres gives the password for service account
  • option -D "C:\Development\PostgreSQL\data" tells where database cluster is located (be careful it is very important here to give the full path to the directory "data")

We do not run the service.

--------------------------------------------
Configuration:

Before starting the service must change the basic settings. Move to the directory C:\Development\PostgreSQL\database and open the file postgresql.conf. In this file, You must find and uncomment the following lines:
  • listen_addresses = 'localhost'
  • port = 5432

Now You can start a service in the panel management services.

If everything was done properly, the service should start. If we chose the longer version, in case of trouble with starting the service we should go to the configuration of a service, then select an account for this service and retype password for that service (in our case: postgres)

Theoretically we have the ability to log from the console to the database using the command line (marked red colour):


Thus we should get exactly the same result as using the Windows Installer.

Notes: a short way works ok under Windows XP Prof., should also works ok under Windows Vista - in both systems there is the Local System Account for services. For Windows 2000 You must perform the installation in a long way. For safety, PostgreSQL installer always chooses longer way - it creates an account for the service, then creates sevice itself and registers it to the created account.

Sunday, April 19, 2009

Installing PostgreSQL (soft version)

Installing PostgreSQL is theoretically piece of cake, but in my opinion there are some aspects worth saying a little more.
Those who installed MySQL database using the graphic installer on Windows, know that the installation process goes something like this: "Next, next, next, yes I want to have root access from remote machines, quit." This is almost the same as installing any program on Windows. PostgreSQL installer is not much more different in this case.

So what's the point? In a slightly different philosophy of security model - different than in MySQL. Okay, enough of this pseudo-technological gibberish - let's install database.

Step 1: Download the PostgreSQL from here. Download a file named postgresql-8.3.7-1.zip.

Step 2: After unpacking the zip file, run the installer and choose English



Step 3: after the splash screen and license information installer will ask us about the target installation directory. I suggest using directory C:\Development\PostgreSQL.



Step 4: Configure account for the PostgreSQL service.

It is convenient to install PostgreSQL as a service in Windows - the database server will always run at startup. We have something new in this point: PostgreSQL requires a special account in the system that does not have administrator rights in order to start the database service and initialize the database cluster. It is important to set a well-known password for this account, because in case of problems with PostgreSQL we will be able to use this account to peform some fixes on database files.



Step 5: configure the settings of the database server, super user account (root) and access from remote machines.

This is a step similar to step in the installation of MySQL, I recommend setting the server and client encoding to UTF-8 - this is the standard that should be use instead of some bizarre national encoding. Why? Because it gives us the flexibility - perhaps we want to store in our database accented Polish and German umlauts. In addition we will avoid potential problems with conversions etc.


Step 6: Installation.

Warning: before installation make sure that You have enabled and running Windows service named "Secondary Logon". Our system account "postgres" from step 4 needs that service. When it is not enabled, the installer will report an error:


Just turn on the service and the trouble is gone. Then on next screens just click "Next" without changing anything until You get to the last screen - the final step in our installation process.

Step 7: The end of the installation.


The selected checkbox allows You to install additional software and extensions for PostgreSQL. At the moment we do not need them so we can safely uncheck it and complete the installation - voila, we have PostgresSQL :-)

Okay, once we have database installed, let's take a look inside - just to write simple SELECT and be proud of Yourself that You still remember some SQL syntax ;-) Nothing could be more simple. Along with PostgreSQL was installed pgAdminIII - an advanced graphical client. Just find it in the windows start menu and run:


When You double-click the server, You will be asked for Your root password from step 5. After typing the correct password, You will be logged to the server as root (superuser):


PostgreSQL creates a default database named "postgres". We can log in to this default database using command line. Of course, we can also delete this database. Then we have available two more so-called "service" databases that are hidden (they are not visible by default in pgAdmin tree view). The names of those databases are "template0" and "template1". PgAdmin allows us to configure the server, manage users, roles, databases, etc. For details, refer to the documentation.

Wednesday, April 8, 2009

Pooja Chopra trained by Pageant Coach Ritika Ramtri Kumar

Pooja Chopra trained by Pageant Coach Ritika Ramtri Kumar, Pageant Coach of The Tiara won Pantaloons Femina Miss India East 2009 on 17th February 2009, at Kolkata. She also won Miss Perfect 10; Miss Catwalk and Nakshatra Miss Sparkling Beauty. 22 year old Pooja who is 5.8 inches tall has done commercials for Mr Muscle, Big 97 FM, Dabur Honey, Coke (Pakistan) and EZone. She has also walked the ramp for Gitanjali, D'Damas, Manish Malhotra, Vikram Phadnis, Wendell Rodericks, Mihika Mirpuri, and Roberto Cavalli. She was Navy Queen 2007 1st Runner Up, NDA Queen 2004 1st Runner Up and has also acted in Fashion the movie. Pooja’s wardrobe was designed by Fashion Designer Priyanka Rajiv, who has also designed a saree for Angelina Jolie when she was visiting India. Umesh Mohite, Facility Head –World Gym (Pune Branch) took care of her physical fitness.

23 year old Karishma Karnik who is 5 feet 10’ also trained by Pageant Coach Ritika Ramtri Kumar was 1st Runners Up at Pantaloons Femina Miss India East 2009. She was also Navy Queen 2007, Mumbai.

The Tiara specializes in preparing pageant in the spotlight. Pageant Coach Ritika Ramtri Kumar teaches aspirants to win! Complete with never-before-shared insights on pageant walking, interviewing, and performing. Our coaching has helped many past Miss India, Mr. India, Mrs. India, Manhunt and Megamodel winners!! Our students have phenomenal presentation skills because we show them how to be in control of their environment and how to communicate effectively with the judges and audience members. Our techniques will help to eliminate any fear or nervousness that they have about competing in the Swimsuit and Evening Gown competitions. The Tiara can help with a winning walk, effective communication, stance, and attitude!

Tuesday, April 7, 2009

Femina Miss India 2009:Pooja Chopra from Pune

Pooja Chopra was crowned Pantaloons Femina Miss India-World 2009 while Ekta Choudhary was crowned the Pantaloons- Femina Miss India-Universe 2009.

Chopra, a resident of Pune, and Delhi resident Choudhary were awarded the titles at the beauty pageant held here. Mumbai-resident Shriya Kishore was crowned Pantaloons Femina Miss Earth 2009.


The Three beauties were crowned by last year's PFMI title holders PFMI World Parvathy Omanakuttan, PFMI Universe Simran Kaur Mundi and PFMI Earth Tanvi Vyas.

This year's beauty Pageant was not without its dose of glamour. Bollywood actresses Priyanka Chopra, Kangana Ranaut and Genelia D'Souza stole the event with their wonderful stage performance. Malaika Arora Khan and actor R. Madhavan hosted the event.

Tuesday, March 31, 2009

Padma Shri: Ovation for Aishwarya

Aishwarya Rai Bachchan was recently awarded the highest civilian honor, the Padma Shri award for her contribution to the arts.The awards, a National honour,were announced on the occasion of India’s Republic Day.It brings the number up to five Padma Shris won by the Bachchan family. The first one was won by Amitabh Bachchan's father the late Harivansh Rai Bachchan. Of course Amitabh Bachchan himself won the Padma Shri twice. Jaya Bachchan took one home too and now the legacy continues with Aishwarya Rai Bachchan walking away with one.

Aishwarya is the youngest person to ever achieve this honour from the film fraternity.

Ms. Patil conferred the Padma Shri awards on Bollywood actors Aishwarya Rai Bachhan and Akshay Kumar, Hindi playback singer Kumar Sanu, eye surgeon Ashok Kumar Grover, Chairman, Board of Editors of Nai Dunia daily, Abhay Chhajlani, surgeon Ashok Kumar Gupta and Ghazal singer Penaz Masani.

Other recipients of the Padma Shri included B.R. Shetty, Bansilal Rathi, Prof. Birendranath Datta, C.K. Menon, Devinder Singh Rana, G. Vijayaraghavan, Geeta Kapur, Geshe Ngawang Sampen, Govind Ram Nirmalkar, Goriparthi Narasimha Raju Yadav, Gurumayum Gourakishor Sharma, Hashmat Ullah Khan, Iravatham Mahadevan, Jalees Ahmed Khan Tareen, John Ralston Marr, K. Viswanathan, K.P. Udayabhanu, Kalamandalam Gopi, Kanneganti Brahmanandam, Kiran Seth, Laxman Mane, Mattannoor Sankarankutty Marar, Niranjan Goswami, Bhai Nirmal Singh Khalsa, Norden Tshering Bhutian and Panchapakesa Jayaraman.

Prakash Narain Dubey, Pratapaditya Pal, R.K. Krishna Kumar, Ram Kishore Chhipa, Shaik Khader Noordeen, Shashi Despande, Shyamlha Pappu, Sunil Kanti Roy, Sunny Varkey, Suresh Dutta, Surinder Mehta and Yash Gulati also received the Padma Shri.

Tuesday, March 17, 2009

Parvathi Omanakuttan :Miss World 2008 first runnerup


Parvathy Omanakuttan Nair, Femina Miss India World 2008, is also the First Runner Up of Miss World 2008. She was crowned at the Miss World Grand Finale at Johannesburg, South Africa on 13 December 2008. She was also the first runner up of Miss World Top Model contest held on 3 December 2008.
She was crowned "Pantaloons Femina Miss India World 2008" in Mumbai on 5 April 2008.Parvathy was born on 13th March 1987 at Kottayam, Kerala as the first child of Mr. Omanakkuttan.
She is originally from Changanacherry - Kottayam, Kerala and now lives in Mumbai. She was only 7 months old when came to Mumbai with parents, because her father had to join Taj Hotel. Her hobbies include listening to music, dancing, glass painting, reading, playing basketball and badminton.
She follows the lineage set by many Keralites in the history of the pageant like Shweta Vijay (Femina Miss India Earth 2003), Annie Thomas (Femina Miss India World 1998), Nafisa Joseph (Femina Miss India Universe 1997), Mini Menon (Femina Miss India Asia Pacific 1996) and Shweta Menon

Monday, March 16, 2009

Miss Universe 2008: Dayana Mendoza


Miss Universe 2008, the 57th Miss Universe beauty pageant, was held at the Crown Convention Center in the Diamond Bay Resort, Nha Trang, Vietnam on July 14 2008. Dayana Mendoza, Miss Venezuela, was crowned Miss Universe 2008 by outgoing titleholder Riyo Mori of Japan.
Dayana Sabrina Mendoza Moncada (born June 1, 1986 in Caracas, Venezuela) is a model, Miss Venezuela 2007, and Miss Universe 2008.
Mendoza has stated that she enjoys "design, photography, advertising and wave surfing." She was once kidnapped in Venezuela, and stated the trauma taught her to remain poised under pressure.

Mendoza was caught in a nude scandal after photos of her modeling naked for a jewellery firm surfaced. Officials from the Miss Universe Organization decided against penalizing her insisting that the candid photos were not pornographic, but instead were "artistic in nature, and they don't have an ounce of pornographic content to them."

Friday, February 27, 2009

Miss World 2008: Ksenia Vladimirovna Sukhinova


Ksenia Vladimirovna Sukhinova is a Russian beauty queen who won the Miss Russia 2007 and Miss World 2008 pageants.
Ksenia Sukhinova was born 1987 in Nizhnevartovsk, Russian SFSR. She lives in Tyumen, Siberia, where she is a fifth-year student at the Tyumen State Oil and Gas University, studying cybernetic systems. She has an excellent academic record; according to the university's deputy president Veronika Yefremova the discipline is very difficult, "but Sukhinova's grades are all A's and B's.
Ksenia's measurements are 1.78m (5”10’), she has blonde hair and blue eyes. Her first name is often romanized Ksenya or Kseniya. Her favorite book is Master and Margarita by Mikhail Bulgakov.When asked a question about her private life, she confessed that her heart was "still free.

Thursday, February 26, 2009

Miss Universe 2000: LARA DUTTA


Lara Dutta is an Indian actress, UNFPA Goodwill Ambassador and the 2000 Miss Universe.She born April 16, 1978.














Dutta was born on April 16, 1978 in Ghaziabad, Uttar Pradesh, India. Her father is Wing Commander L.K. Dutta (retired) and her mother is Jennifer Dutta. She also has two older sisters, one of whom serves in the Indian Air Force and a well known younger sister. Famed composer and DJ Nitin Sawhney is Dutta's cousin. The Dutta family moved to Bangalore in 1981 where she completed high school from St.Francis Xavier Girl's High School. Lara graduated in economics with a minor in communications from Mumbai University. She was crowned Miss Universe in 2000 which led to her appointment as a UNFPA Goodwill Ambassador in 2001.