Installing Concrete5 locally on Mac OS X

Installing Concrete5 locally on Mac OS X

If you don’t have your own webserver, or if you don’t want to waste your traffic on uploading your files everytime you make a small edit, you should consider running it all locally, and then when you’re done uploading it to your server.

It’s no secret that I’m a big fan of WordPress, and I have been using it for ages. But for some clients, WordPress is overkill. There’s a lot of Content Management Systems out there, and a lot of them suck, lack features, or have too many features. But then I found Concrete5, which is absolutely amazing.

But enough about that (go to Concrete5′s website to read more). Today we’ll be installing Concrete5 locally. Although this tutorial is about installing Concrete5, you can use the same methods to install e.g. WordPress, Joomla, Drupal, or even your own content management system.

The methods used here can also be used for installing Concrete5 locally on Windows and Linux. Instead of MAMP, you have to use WAMP (Windows) or LAMP (Linux).

Overview

MAMP (Macintosh, Apache, MySQL and PHP) is a piece of software developed by living-e AG, which makes using PHP and MySQL locally a lot easier. First of all, let’s start by having an overview of what we’ll be learning today:

  1. Downloading and installing MAMP
  2. Downloading and installing Concrete5
  3. Conclusion

And no, there’s not more to it – so let’s get rollin’!

Downloading and installing MAMP

Download MAMP (130 MB) and drag the MAMP folder into your Applications folder. Opening MAMP will also launch your default browser with a welcome page. We’ll return to that in a moment. First, let’s have a look at the application. If everything is working, you should see to green ‘lamps’ – one for Apache Server and one for MySQL server. Click on ‘Preferences…’ and go to the ‘Apache’ tab. You’ll see this:

The Apache tab in MAMP

Choose the path where you keep all your websites and hit ‘OK’. There’s no reason to mess with MAMP’s default settings unless you e.g. use the default ports for something else, so we’ll close the ‘Preferences’ window.

Go to your browser, which should have opened the welcome page. We’ll keep that page open.

Downloading and installing Concrete5

If you haven’t heard of Concrete5, now’s the time. It’s a wonderful CMS released under the MIT license, which means you can “[...] call it ‘Cement’ and sell it for a million bucks [...]“. So, go to Concrete5.org and download your copy. You can also play with the demo or watch the screencast.

Extract Concrete5 to the folder you specified in MAMP’s preferences. Now, go back to MAMP’s welcome page and click on phpMyAdmin. Create a new database – let’s call it concrete.

Create a new database with the name 'concrete'

So, our database is setup, now we need to setup Concrete5. I put my Concrete5 files in a folder called ‘concrete’ in the folder specified in MAMP earlier. Go to MAMP’s welcome page again, and notice the following information:

Useful info at the welcome page

Go to the local folder where you stored concrete, and press Command + I. You have to change Sharing & Permissions for Everyone to Read & Write:

Change Sharing & Permissions for Everyone to Read & Write

Now go to http://localhost:8888/concrete/, or whatever you named your folder (if you chose another port in MAMP’s preferences, also change 8888 to that). You’ll see this site:

The setup screen for Concrete5

Now, paste the information from the welcome page under ‘Database’ information, and give your database a name, e.g. ‘concrete’, and hit ‘Install Concrete’. You should now be given a login name and a password. Remember this, and change it as soon as you have logged in.

Conclusion

That’s it! You have installed Concrete5 locally on Mac OS X. If you want to install other stuff, just put it in the folder specified in MAMP and go to http://localhost:8888/that_folders_name/.

Have I forgotten something? Please leave a comment!

Share, share, share!

Did you like this article? Please share it with your friends:
  • Digg
  • del.icio.us
  • Facebook
  • StumbleUpon
  • Technorati
  • Twitter
  • email

Related posts:

  1. No More Invalid RSS

32 comments so far

Add one yourself

  1. Phillip says:

    I have installed MAMP and Concrete5… but now, I need to Install a Theme so I can edit it and get it setup for a new website I’m developing… one (ahem) “small” problem (a BIGGIE actually)… I can Concrete to recognize the theme in the folder… it SHOWS me the template is there, but when I click on “Install” it just sits there… any ideas???

  2. Tim says:

    I have a running C5 site at the root of a snow leopard, os x serve.

    I can’t be reading the preceding correctly, the whole site is going to be read/write to anyone. Doesn’t that pose a security risk?

  3. Maz says:

    Hi,

    I’ve been trying to do this and seems all good until the very last point.

    I go to http://localhost:8888/concrete/
    fill all the details, and as I click install concrete, I get this message:

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 1500 bytes) in /Applications/MAMP/htdocs/concrete/concrete5.3.2/concrete/libraries/3rdparty/adodb/adodb.inc.php on line 998

    I have tried re-installing both MAMP and concrete and I still get the same message.

    I use Mac OS X Leopard.
    Desperate to get this running.. any help will be much appreciated.

    Thanks in advance.
    Maz

  4. Lawrence says:

    Peter,

    I used your suggestions, but it still would not work. Then I changed the Database name on the Install Concrete Page from “db_concrete”, to just “concrete”, and it is now working. I noticed in your instructions above that you recommended using “db_concrete”. I wonder if others have been having the same problem, and this might be what is needed to resolve that. Thank you for your time.

    Lawrence

    • Peter says:

      Wow, congratulations, Lawrence! Finally it’s working! I have now corrected the ‘db_concrete’ issue, it was an error. As you have created a database of the name ‘concrete’, the name should of course also be used in the Concrete5 installation. Thanks!

  5. Lawrence says:

    I recently set up MAMP, and then added Concrete5.When I get to the install Concrete page, and click install I get the following message:

    Version Comparison Available
    You must chmod 755 concrete/libraries/3rdparty/htmldiff.py and disable PHP safe mode.

    I have gone to the identified file htmldiff.py info box and changed privileges to “everyone”

    However, when I try to install concrete it still get the same error message. Can you suggest a solution to this, and is there any way do this without opening up the terminal?

    Regards,
    Lawrence

    • Peter says:

      Hi there,

      Have you tried changing safe_mode to off in the MAMP/conf/php5/php.ini file? It should be set to off as standard, but maybe something went wrong.

      Also, you can change file permissions in OS X by right-clicking on the file and choosing Show info, so there’s no need to open the Terminal there.

      • Lawrence says:

        Peter,

        Thanks for your reply. I don’t want to appear too dumb, but how and where do you turn the safe_mode to off?

        • Peter says:

          You go to the folder on your harddrive where you installed MAMP – usually in your Applications folder. Go to the conf folder, and then the php5 folder (assuming that you use php5). Open the file php.ini with TextEdit or similar, and search for “safe_mode”. You’ll find this line:
          ; Safe Mode
          ;
          safe_mode = Off

          If it says On, change it to Off, if it says Off, then I’m not quite sure what to do, but let me know what is says, and we’ll work it out!

          Cheers!

          • Lawrence says:

            Peter,

            It says “off”.

            On the “Install Concrete” window I have the following information in the “Server” field:

            http://localhost:8888/concrete/concrete5.3.1.1/

            Is that correct?

            • Peter says:

              No, I think that should actually be just localhost.

              • Lawrence says:

                (this got dropped in the wrong reply area)

                I tried using just “localhost”, I still get the Unable to Connect message, as well as the chmod755 and disable safe mode messages.

                I had not mentioned it before, but I am running this on a Powerbook G4, using 10.4.11

                • Peter says:

                  I don’t it’s a problem that you’re using Tiger. However, have you tried starting completely over? It sounds like a really odd error, and it’s strange that it still says that you have a chmod 755 error, as I assume you have already changed the file permissions. Sometimes it helps just starting completely from scratch – if you can access the MAMP start page, there’s no need to reinstall MAMP, but at least create a new folder for Concrete5, and start the installation over again. Please, let me know how it works out for you.

                  • Lawrence says:

                    OK,I reinstalled both MAMP and concrete, still no luck, getting the same error messages. Just one other thought, when I change the ownership permissions, I have changed the following: group to everyone, read/write; and Others, read/write. There is a bar at the bottom that says “Apply to enclosed items” I have NOT applied this.

                    Also, I have changed ownership on the htdocs folder, the concrete5.3.11 within the htdocs folder. Should I change permissions to the concrete folder within the concrete 5.3.11 folder?

                    I have also changed permissions for the htmldiff.py.

                    Let me know what you think.

                    • Lawrence says:

                      I keep on thinking the problem is something simple, like not naming the correct file, so the database can’t be found. Here is the locations of the various files

                      Applications/Mamp/htdocs/concrete5.3.1.1

                      Here is the address on the Welcome to Mamp page:

                      http://localhost:8888/MAMP/?language+English

                      Here is the address that brings up the Install Concrete page:

                      http://localhost:8888/concrete5.3.1.1

                      On the phyMyAdmin page I have created a database named concrete

                      When I fill out the Install Concrete page I use the words localhost for the the Server.

                      I have made up a MySQL Username and Password on the Install Concrete page.

                      On the Install Concrete page all the items are checked green, except the Version Comparison Available, which has a question mark, and indicates chmod 755 concrete/libraries/3rdparty/htmldiff.py(should I chmod only the htmldiff or the whole concrete file?)
                      Also indicated is disable PHP safe mode, which is already off.

                      Is all this clear, and is it correct?

                    • Peter says:

                      Ah, that is the issue… You don’t have to make up a username and password for the MySQL database. You have to use ‘root’ for both. Try and do that, and see if it works. Otherwise, also try to chmod the entire concrete folder to 755, and choose ‘Apply to all enclosed items’.

  6. Bruno Cloutier says:

    I’ve tried installing Concrete5 using MAMP and I get the

    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 4864 bytes) in /Users/brclo73/Sites/danieldo/concrete_16avril/concrete/helpers/concrete/file.php on line 157

    message. I followed the link provided in the messages, replaced php.ini and httpd.conf, played around with what was said on the website, can’t make it work in any way.

    Help anybody?

    • Bruno Cloutier says:

      Activating both Zend and eAccelerator in MAMP did the trick, although I couldn’t say if it’s related in any way…

    • mildavw says:

      You can just up the PHP memory limit. To do it programmatically, stick this anywhere, say, in the root index.php file.

      if (ini_get(‘memory_limit’) < 16777216) ini_set(‘memory_limit’, ’16777216′);

    • yaskaz says:

      At first, thank you for your great information! > Peter

      Bruno,

      I got the same problem.

      open -e /Applications/MAMP/conf/php5/php.ini

      then find and modify following setting of php’s memory limit from

      memory_limit = 8M

      to

      memory_limit = 128M

      Save the change, reboot Apache server from MAMP panel and try install Concrete5 again.

  7. Ben says:

    Hi There,

    Just wondering what server address you use in the c5 setup screen? I’ve tried:
    http://localhost/
    http://localhost:8889/
    http://localhost:8889/concrete/
    http://localhost:8888/
    http://localhost:8888/concrete/

    And:
    /Applications/MAMP/db/mysql/
    /Applications/MAMP/db/mysql/mysql/
    /Library/Application Support/living-e/MAMP PRO/db/

    I keep getting an “Unable to connect to database” error when using the local host addresses above and a “mysql error: [1046: No database selected] in EXECUTE(“show tables”)” when trying the directories. I have all green ticks on the left side and have given permissions as described in the tutorial.

    I’ve also tried both the root username and password from the MAMP welcome page as well as the username and password of my local machine and tried “db_concrete” as the database name as well as “concrete” from the create database page in phpAdmin.

    Any help or pointers in the right direction would be much appreciated. I’m using OS 10.5.6 and MAMP Pro 1.7.2

    Cheers

    Ben

    • Peter says:

      Hi Ben,

      That’s sounds really odd. From what I could read from your post, you didn’t try just writing ‘localhost’ (without the ‘http://’). If you haven’t, try that. Please, let me know if it works!

      • Ben says:

        Thanks Peter,

        I’d been fixing the chmod error before running the install: chmod 775 /Applications/MAMP/htdocs/concrete5/concrete/libraries/3rdparty/htmldiff.py

        But this time I tried installing without fixing the error and tried v5.3 – but I just keep getting an error:
        Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 4864 bytes) in /Applications/MAMP/htdocs/concrete5/concrete/helpers/concrete/file.php on line 157

        The installation seems to run though – if I check the database there’s a whole bunch of stuff in there after running the installation. I just can’t figure out how to get to that elusive login page.

        BTW, are you running Leopard or Tiger?

        Cheers

        Ben

  8. frz says:

    Hey this is a great how to, thanks!

    We’re going to link to this blog post from our install docs page, great work..

    -frz