Workshop #1, Session #2: Pre-session Prep (database installation)

66 visualizzazioni
Passa al primo messaggio da leggere

Calvin Cheng

da leggere,
14 ago 2011, 04:44:5214/08/11
a lad...@googlegroups.com
Hello all,

As usual, there are multiple ways of getting a database software installed on your development machine.   First of all, there are many different types of database software available in the market - open source or commercial.  Which database software to use is - as usual - subject to a lot of debates and depends also on the task-at-hand.

For the purpose of session #2 for LadyPy workshop, we will focus only on using either MySQL or PostgreSQL relational databases.

My personal recommendation is PostgreSQL. But there are others who would prefer to use MySQL so if that's your weapon of choice, feel free!

Here's the step-by-step for Mac users who have chosen to use MacPorts and chosen to install PostgreSQL on your local development machine.
  I am too lazy to type everything all over again because I wrote this some time back in April.  So I am just going to just paste the link to the step-by-step here - http://od-eon.com/blogs/calvin/macports-and-postgresql/  (Please ignore the section on "Reinstall ports" as that pertains to my upgrade from PostgreSQL 8.3 to 9.0. Chances are, this is the first time you are doing a PostgreSQL 9.0 or 9.1 installation on your machine so you will not need my fix relating to "Reinstall ports".)

Other facilitators will contribute step-by-step for other ways of getting your database ready.

And to summarize what we will be focusing on for session #2:-

(0) Before our session #2 on Saturday, prepare your database of choice (with help from facilitators in this topic thread. feel free to ask.)

(1) A recap on what we learnt last weeks and Q&A - limited edition stickers from Google for participants who get the answers right!
(2) Prettify your django templates by serving media - css file, js file - on your development site (i.e. "http://127.0.0.1:8000/" or "http://localhost:8000/")
(3) Django models.py and how you create your newly designed database tables
(4) Django ORMs:  Retrieving and updating/inserting data from and to your database

And here's a diagram depicting our focus for session #2...

Alicia Tan

da leggere,
15 ago 2011, 09:00:0215/08/11
a lad...@googlegroups.com

Hi guys,

I'm trying to follow the directions to install PostgreSQL, but where do I find this /etc/profile file on my Mac, and should we be doing this DMBS tweak thing?

Thanks!




To tweak your DBMS, consider increasing kern.sysv.shmmax by adding an increased kern.sysv.shmmax .. to /etc/sysctl.conf

In addition, you may want to consider editing your /etc/profile (if you want this path to be recognized system wide) or your ~/.bashrc or ~/.bash_profile (whichever you are using, if you want it to only apply for your current logged in user) to include this line:

Victor Neo

da leggere,
15 ago 2011, 09:28:4415/08/11
a lad...@googlegroups.com
Alicia,

Skip the DBMS tweak. Instead of /etc/profile, edit .bash_profile in your home directory. The file may not exist so you will have to create one.

I'm unsure if you are able to run geany from the Terminal so you probably can try opening the file in geany (notice that the filename has a dot in front, it implies that the file is hidden). If the file cannot be found manually in geany, try:

geany ~/.bash_profile

and see if geany opens either an existing file or a new file. You can then continue with other steps. Let us know if you encounter other problems.

Cheers!


On Mon, Aug 15, 2011 at 9:00 PM, Alicia Tan <alic...@gmail.com> wrote:

Hi guys,

I'm trying to follow the directions to install PostgreSQL, but where do I find this /etc/profile file on my Mac, and should we be doing this DMBS tweak thing?

Thanks!




To tweak your DBMS, consider increasing kern.sysv.shmmax by adding an increased kern.sysv.shmmax .. to /etc/sysctl.conf

In addition, you may want to consider editing your /etc/profile (if you want this path to be recognized system wide) or your ~/.bashrc or ~/.bash_profile (whichever you are using, if you want it to only apply for your current logged in user) to include this line:


--
Regards,
Victor Neo

Enning Yow

da leggere,
18 ago 2011, 10:25:5218/08/11
a LadyPy, Singapore
Hi all,

Was just wondering: do we need anything else if we create a
new .bash_profile file in our home directory (as the file did not
previously exist)?

Thanks.

On Aug 15, 9:28 pm, Victor Neo <icyis...@gmail.com> wrote:
> Alicia,
>
> Skip the DBMS tweak. Instead of /etc/profile, edit .bash_profile in your
> home directory. The file may not exist so you will have to create one.
>
> I'm unsure if you are able to run geany from the Terminal so you probably
> can try opening the file in geany (notice that the filename has a dot in
> front, it implies that the file is hidden). If the file cannot be found
> manually in geany, try:
>
> geany ~/.bash_profile
>
> and see if geany opens either an existing file or a new file. You can then
> continue with other steps. Let us know if you encounter other problems.
>
> Cheers!
>
>
>
>
>
> On Mon, Aug 15, 2011 at 9:00 PM, Alicia Tan <alici...@gmail.com> wrote:
>
> > Hi guys,
>
> > I'm trying to follow the directions to install PostgreSQL, but where do I
> > find this /etc/profile file on my Mac, and should we be doing this DMBS
> > tweak thing?
>
> > Thanks!
>
> > To tweak your DBMS, consider increasing kern.sysv.shmmax by adding an
> > increased kern.sysv.shmmax .. to */etc/sysctl.conf*
>
> > In addition, you may want to consider editing your */etc/profile* (if you
> > want this path to be recognized system wide) or your *~/.bashrc* or *
> > ~/.bash_profile* (whichever you are using, if you want it to only apply

Victor Neo

da leggere,
18 ago 2011, 10:29:4418/08/11
a lad...@googlegroups.com
Enning,

It should be sufficient to create the file and key in what is needed.


--
Regards,
Victor Neo

Jinny Chan

da leggere,
18 ago 2011, 23:36:1818/08/11
a lad...@googlegroups.com
Any instructions for Windows user on either database installation?

Victor Neo

da leggere,
18 ago 2011, 23:50:5018/08/11
a lad...@googlegroups.com
Jinny,

You can follow the instructions here: http://www.ricocheting.com/how-to-install-on-windows/mysql

Take note that you only need to follow until Step 2. The rest of the steps are unnecessary. We will have a guide for installing Databases on Windows next time.

Let us know if you face any difficulties.



On Fri, Aug 19, 2011 at 11:36 AM, Jinny Chan <jinn...@gmail.com> wrote:
Any instructions for Windows user on either database installation?



--
Regards,
Victor Neo

Lc

da leggere,
18 ago 2011, 23:44:0918/08/11
a lad...@googlegroups.com, lad...@googlegroups.com
Try to use postgresql (instead of mysql) if possible. Just a personal recommendation.

Anyone here can provide install tutorial for postgresql on windows?

Sent from my iPhone

Jinny Chan

da leggere,
19 ago 2011, 12:59:0319/08/11
a LadyPy, Singapore
I managed to install the server following the instruction. Hope it was
installed correctly. Thanks, Victor!

On Aug 19, 11:50 am, Victor Neo <icyis...@gmail.com> wrote:
> Jinny,
>
> You can follow the instructions here:http://www.ricocheting.com/how-to-install-on-windows/mysql
>
> Take note that you only need to follow until Step 2. The rest of the steps
> are unnecessary. We will have a guide for installing Databases on Windows
> next time.
>
> Let us know if you face any difficulties.
>

Sharon Lourdes

da leggere,
19 ago 2011, 15:46:3919/08/11
a lad...@googlegroups.com
Hi everyone!

Apologies for missing session #1 last week. I'm trying to set up my installations, but am having trouble installing Xcode4 (and thus MacPorts) on Mac developer page..

Wld be coming slightly earlier in any event that someone cld help me out :) But i've installed the text editor "Sublime Text 2".

is there a way to install PostgreSQL without having to use MacPorts?

Bah, sorry for being so troublesome! :/
Sharon

Victor Neo

da leggere,
19 ago 2011, 19:49:4419/08/11
a lad...@googlegroups.com
Sharon,

Are you running on Lion or earlier versions? It could take a while to get Xcode downloaded at the venue and we'll see if we have facilitators / participants with the Xcode for your Mac.

If you would be there earlier you can find us at either Pitchstop cafe (easier to find) or at the event room (unit 102). Most of us will be at Pitchstop around 12 or later for lunch.

You can install PostgreSQL with Homebrew as well - it might be more convenient for you. However you will need Xcode installed first (we do have an alternative way to skip XCode).

Swing by Pitchstop cafe and we'll try to set your Mac up before the session start :)
--
Regards,
Victor Neo

Aileen Sim

da leggere,
20 ago 2011, 01:35:3420/08/11
a lad...@googlegroups.com
I already have MySQL Workbench 5.2 OSS on my laptop for work. Can I use that? What do I need to do to configure it for the workshop? 

Aileen 


Victor Neo

da leggere,
20 ago 2011, 01:45:0820/08/11
a lad...@googlegroups.com

Yes you can use that. I hope someone has answered ur question already?

Sayanee Basu

da leggere,
22 ago 2011, 01:01:0722/08/11
a lad...@googlegroups.com
Hi guys! Need help to install postgreSQL on my Snow Lepard using macports as Calvin blogged earlier: http://od-eon.com/blogs/calvin/macports-and-postgresql/

I have also edited my bash profile in /Users/sweska/.profile to add the paths
I have followed all the steps. Could someone gimme a few terminal codes to see whether postreSQL has been installed ok?

Because when I do this, it gives me this error:
Sayanee:~ sweska$ launchctl load -w /Library/LaunchDaemons/org.macports.postgresql90-server.plist
Sayanee:~ sweska$ createdb test
Password: 
createdb: could not connect to database postgres: FATAL:  password authentication failed for user "sweska"

Lc

da leggere,
22 ago 2011, 01:06:4722/08/11
a lad...@googlegroups.com, lad...@googlegroups.com
That means you have gotten all the setup steps right. Congrats.

Will update you with the simple steps to create a postgresql db and postgresql user with password in my next post.

Sent from my iPhone

Sayanee Basu

da leggere,
22 ago 2011, 01:09:0822/08/11
a lad...@googlegroups.com
Thanks Calvin! Looking forward to the simple steps and some terminal codes to verify the version installed, etc :)

Calvin Cheng

da leggere,
22 ago 2011, 22:05:4822/08/11
a lad...@googlegroups.com
Sayanee - http://od-eon.com/blogs/calvin/postgresql-cheat-sheet-beginners/

Let me know if you run into any problems.

Sayanee Basu

da leggere,
23 ago 2011, 09:05:4823/08/11
a lad...@googlegroups.com
Thanks Calvin!! I did them :) See you soon!
Rispondi a tutti
Rispondi all'autore
Inoltra
0 nuovi messaggi