L
L
Lestat2011-07-19 16:40:52
macOS
Lestat, 2011-07-19 16:40:52

How to build a web development environment for mac os x?

Please tell me how best to build an environment with postgresql, python, pip, memcached, mongodb, and other packages on mac os x?
In Linux, it’s somehow more convenient that everything is automatically updated, all dependencies, but here it’s not clear how to organize this?
Those. if you build from source, you can skip when some new fixed version comes out, etc.
via macports? brew? fink?
Thank you!

Answer the question

In order to leave comments, you need to log in

8 answer(s)
D
DanielWolf, 2011-07-19
@Lestat

> but then I don't understand why there are many developers with macbooks? do they install a virtual machine?
yes, they do, and now I'll tell you exactly how. so that everything is convenient for apple.
the main problem is compatibility, it’s clear if you just put apache / php - then there are no special problems,
but if, for example, the project is more serious - nginx / zend server ce / mongodb + tomcat / memcache + imagemagik + modules on perl to nginx - with ports the hell begins
to set everything up so that it works the same as on the server - it’s difficult, bugs periodically appear in the outdated version of the software, ports are obviously updated less frequently.
I'm not talking about the bugs of the ports themselves (on 10.5, the boost + python install updated glibc and killed the macos).
conclusion: we keep ports only for a small number of programs (I generally only have ports for nmap and wget)
so we need a virtual machine - the advantages are obvious:
- the configuration is identical with the real server
- there are no problems porting / updating software
I have VirtualBox from virtual machines. I tried VMWare and Parallels - I liked VB more, and it's free.
so, when setting up the virtual machine, the same OS is installed there as on the server - in my case, this is CentOS
on the OS, we configure everything we need, and then we set NFS / Samba (of course, you can use sshfs - but it obviously loses in speed) - by the way Lion will support NFSv4.
set up key_authorization so that you don’t have to write a password every time you log in, and set an alias - sshvirt1, for example, so that you don’t have to constantly write the IP of the virtual machine.
further - we save the image so that when setting up a new virtual machine, we do not have to repeat everything from the beginning.
we launch the virtual machine, testish - everything is OK, mount the network drive - then we work with it as with our own.
from the environment - I use Eclipse (and its derivatives)
for php, I have zend studio, for python - aptana studio
, you can of course set up an analogue on pure eclipse - but laziness
another port-related problem - my user directory is encrypted with filevault (and backed up to iDisk via TimeMachine =)) - so Apache simply does not have access. and as an option - either keep www_root as home, or use a virtual machine.
well, something like this =)
I would write a detailed article on how to set it all up (with the release of Leo, I will do all this)
and there, the filevault2 setup with backups to the cloud + setting up the console and other goodies, before I am wildly minus, so I don't know =)

K
k_sashka, 2011-07-19
@k_sashka

Linux in a virtual machine. Very convenient and no need to suffer with ports for macos.

C
charon, 2011-07-21
@charon

after reading, the question arises - why the hell is the Mac OS developer and why is it fundamentally better than Windows? In Windows, you can set up a virtual machine in the same way as in Linux. But in Linux, you can also configure everything directly without samba.

M
Maxim, 2011-07-19
@Bublik

I compiled with Homebrew.
But here it is more likely that someone likes it more.
Now in the virtual machine Linux is spinning in which everything is launched through packages.

A
Anton Kossov, 2011-07-19
@tony

if on pure macos, then either homebrew or macports. but for me - it's better to raise a virtual machine in virtualbox with a full set of what will be on the combat server;)

E
el777, 2011-07-19
@el777

possible through ports

S
super, 2011-07-20
@super

I develop directly on the server.

P
phasma, 2011-07-20
@phasma

ports. through easy_install-2.6 you put pip and then you put packages of the necessary versions. PgSQL and memcache are perfectly placed through ports.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question