Entries Tagged 'Mac/OSX' ↓
November 29th, 2008 — Mac/OSX
A few nights ago, with heart in mouth, I installed Liferay, the widely acclaimed open source portal, on my laptop. This is not any old laptop. It’s my trusty Mac, configured jut so – in particular as an Apache server (localhost only) using MAMP. I know enough about Liferay to know it doesn’t run on standard Apache, but rather Apache Tomcat. And while I love the name (memories of the many marvelous male cats dancing through my mind) about all I know about Tomcat is it’s Java based. So I also had visions of Liferay blowing up my machine.
Why run this kind of risk? I could claim being game for any popular open source technology, and while I wish this were the case, who has that kind of time? No. It’s because of a work project I’m part of. A group needs an online collaboration tool, including document sharing. More to the point, they need it quickly. Drupal (as of version 6) is weak at document sharing, though strong on some of the group’s other needs. Several of my IT colleagues know and like Liferay, and think it may be a good match for document sharing. They tell me it’s a competitor to SharePoint. So we’re off an adventure — exploring whether to use it, Drupal or a combination.
Basic Instructions
My laptop survived. In fact, it turned out there’s a very simple way to do this. I used the BitNami Liferay Stack for OSX 10.4 or later. I considered doing it from scratch, but my eyes started to cross reading the documentation, plus I don’t aspire to be a Liferay expert.
If you’re considering doing this too, the only caution is to be sure your MAMP (or other server setup) is running on a port other than 8080 – the port Liferay will use. MAMP defaults to 8888, so if you haven’t changed that, it should be straightforward.
The result? A cool new technology on my laptop in just a few minutes. While I’m digging into Liferay in more of a stakeholder mode, setting up pages and “applications” like a software hussy, I’m also exploring how to change its themes. It looks fairly straightforward for someone who has dealt with Drupal or WordPress themes.
One final tip: the themes in a BitNami installation will be buried deep in the following directory:
[your liferay folder] > apache-tomcat > webapps > liferay > html > themes
Enjoy.
February 6th, 2008 — Drupal, Mac/OSX
Late last night, in the time between running down to our nasty basement to avoid tornadoes and some big storm action, I got to coding. I couldn’t sleep and it was a pleasant distraction — not to mention my laptop wasn’t plugged in, so I didn’t have to worry about electricity. My Drupal-enthusiast friends and I have been trying to do a multi-site install for a few weeks, and to my amazement, with a howling wind, hail, etc., the last piece finally fell into place. One of my pals had said the issue was symbolic links. Bingo. That was it.
To back up, a multi-site install means you set up the core of Drupal just once, and then you can easily create lots of other sites using that one installation. The other sites don’t even have to have the same domain. It’s very cool. For example, at work I hope to set up one master Drupal site, and then create instances for each of the labs. After that, the labs can maintain their own sites.
For now all I’ve done is to set it up on my Macbook using localhost. I made it as modest as possible — just using one database and subdirectories. But having worked through this, it will be much easier to get it working in production.
Here are the gory details.
- Go to the “sites/” directory and set up your new directory. At first, I named it “sites/site2/”, but that turned out to be a mistake. Given that the URL I was going for was http://localhost:8888/drupal/site2/, the correct name was “sites/8888.localhost.drupal.site2/”. It still looks weird to me, but that’s how you do it. The pattern is:
[Port #.]domain[.directory][.subdirectory]/
So if the URL were to be http://happywebdiva.com/drupal/site2, then the new directory would have to be happywebdiva.com.drupal.site2/
- Copy the “settings.php” file found in “sites/default/” into the new directory.
- Edit the new “settings.php” file. Leave the $db_url the same, but on the next line, give $db_prefix a value. I cleverly edited mine to read:
$db_prefix = ‘site2_’;
This way you won’t have to set up a new database. Once you install the second site (step 6 below), the database size will double — from 40 tables to 80 tables.
- Further down in the “settings.php” file, look for a line that’s something like:
# $base_url = ‘http://www.example.com’;
Uncomment this and change it to your desired URL. In my case this was:
$base_url = ‘http://localhost:8888/drupal/site2′;
- Next it’s time to create the dreaded symbolic link. Open Terminal (on a Mac) and use the ln -s command followed by first the full path of your base install and then the full path of the second sites’ directory (leaving off the characters before the periods in the final directory, e.g. changing “8888.localhost.drupal.site2″ to just “site2″). In my example, it was:
ln -s /home/username/public_html/drupal/ /home/username/public_html/drupal/site2
One caution: be sure there’s not a file or directory in the first directory that’s the same name as your new install. You don’t want the symbolic link overwriting something critical.
- The last step…. In your browser, go to the new site’s URL followed by install.php, e.g. http://localhost:8888/drupal/site2/install.php
That’s it. You should now have a second site (and soon a third and fourth) to play with.
Addendum: In the myriad of multi-site documentation that’s on the web, these three pages helped me the most:
January 14th, 2008 — Mac/OSX, Web Diva Fashion
Tomorrow, Tuesday January 15, I’ll be wearing a black turtleneck.
It’s not that I’m an Apple zealot nor is it a statement of solidarity, although I do like many of their products — a lot. In truth it’s just one less early-morning wardrobe decision.
No jeans, though.
Some people look a lot better in dungarees than others.
January 4th, 2008 — Mac/OSX, Web Tools
Like any self-respecting web diva, one of my first jobs on a new laptop is to turn it into a development server. In other words, I need Apache, PHP and MySQL running on my own machine where no one else can see it and I can be as bad as I want to be.
In the past, I’ve had to do this the old-fashioned way, jumping through various scary hoops like downloading raw PHP and editing obscure hidden files. But that was then.
In the intervening years, a series of app’s named things like WAMP and MAMP have come along. (Gotta love techno-babble.) These AMP’s do all this heavy lifting for you. “AMP” stands for Apache, PHP and MySQL. If you tack a W on the front, it’s for a Windows machine. If you tack an M on instead, it’s for (you guessed it) Mac OSX.
I’d heard about MAMP before, but installing is believing. In fact it was so easy I started frantically looking for fancy instructions, but just couldn’t find any. In the end, after downloading, unzipping and moving MAMP to the Applications folder, I finally crossed my fingers and double-clicked it. Voila — in about 10 seconds everything was done for me. It even gives you various choices, like PHP 4 or PHP 5.
And now, just a few hours later, I have localhost copies of things like Drupal running on my little old MacBook. I’m free to be as bad as I want to be.
January 3rd, 2008 — Happiness, Mac/OSX
Yesterday was a banner day. After months (years?) of pining for a small Mac laptop with an Intel processor, I now have one of my very own. It’s a 2.2GHz Intel Core 2 Duo MacBook — and it’s everything I hoped it would be. As of Day 2, here are my top five reasons.
5. It’s black and sleek and elegant, like my cat — not to mention it matches most of my clothes.
4. It may be handsome, but it’s not showy.
3. Thanks to Parallels, it now runs Windows as a guest OS. Next up: Ubuntu.
2. It’s small and light, at least compared with other laptops I’ve known and loved. I hope to take it with me everywhere.
1. All in all, it feels very me.