Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Articles of php tutorial magento tutorial from php                      communityInstalling Magento on Mac OS X Server2011...
In my case I changed line 810 to read the following, then saved the file: mysql.default_socket = /private/var/mysql/mysql....
AllowOverride AllNotes1. When following the wizard setup. I found that in the section where you specify your MySQL databas...
Upcoming SlideShare
Loading in …5
×

Installing magento on mac os x server

4,598 views

Published on

  • Be the first to comment

  • Be the first to like this

Installing magento on mac os x server

  1. 1. Articles of php tutorial magento tutorial from php communityInstalling Magento on Mac OS X Server2011-01-05 09:01:20 adminHere’s a basic outline of how to install Magento on Mac OS X Server 10.4.9 for development and testingpurposes. The OS X Server installation I used was fairly standard, running on a local machine used fordevelopment testing.I would think that the majority of these instructions should work with a standard install of OS X (notserver), but I have yet to try this.The following instructions assume you have MySQL running on your development server, and that youhave created an empty database for the Magento install.Install PHP5The default install of OS X Server 10.4 comes with PHP 4 installed, you will need to upgrade thisto PHP 5. I used the package made available by Marc Liyanage on his site. Get ithere: http://www.entropy.ch/software/macosx/php/1. Follow the instructions on this site to install. There are no specific instructions for OS X Server, but themain thing to do before installing is to make sure you have disabled the PHP 4 module in Apache usingthe Server Admin program. Open the program and head to the web service > settings > modules. Uncheck ‘php4_module’, save, then stop and start the web service. You can then run the PHP 5 Installpackage.2. Open /Library/WebServer/Documents/info.php and uncomment line 5, then save the file. This will giveyou a phpinfo file you can use to see what version of PHP you are running. Browseto http://localhost/info.php and you should see that you havePHP Version 5.2.4 installed (or a laterversion if the package has been updated).3. Now you need to make a small change to the php.ini file in line with the commentshere: http://www.entropy.ch/phpbb2/viewtopic.php?p=9499#9499What’s helpful at this point is to update your locate database so you can easily find files for editing. Simplyrun the following command in a terminal window to do this, it may take a short time to complete. Just let itrun until you get the prompt back. sudo /usr/libexec/locate.updatedbYou should now be able to find your php.ini file by typing the following in the terminal window: locate php.iniYou should get a list of files containing php.ini and their paths. I use BBedit for text editing, and use theBBedit command line tool to open files using terminal.I ran the following command: bbedit /usr/local/php5/lib/php.iniThis opened the file in BBedit. You then need to change line 810 as stated in the above link. The onlyalteration I made was to run a locate command to find the exact path of mysql.sock on my machine, likeso: locate mysql.sock
  2. 2. In my case I changed line 810 to read the following, then saved the file: mysql.default_socket = /private/var/mysql/mysql.sockYou then need to stop and start the web service in the Server Admin program to re-load the php.ini filewith its change.Download M agentoNext, download the Magento zip and uncompress it. Copy the ‘magento’ folder to your web serverdocuments folder at: /Library/WebServer/Documents/Be careful if you plan to create a folder in your web root and simply copy the files into it using the finder.There is a file called .htaccess in the folder that is uncompressed from the Magento install zip that MUSTbe in the folder in your web root. Files with a ‘.’ at the start are invisible in the Mac OS finder, so it is likelyyou will miss this file if you copy the files out of the original folder. You can use the terminal to copy the fileto the correct location if you need too. Make sure you change the permissions on the files and foldersmentioned on the Magento install guide page.Getting M od Rewrite WorkingYou now need to edit the httpd.conf file in order to get mod rewrite working correctly. This is the main areaI had difficulty with, as without making this change, when you first try to run Magento you will get a file notfound error when your web server looks for http://localhost/magento/install/. ‘install’ is not a physicaldirectory, and requires mod rewrite to be working so the URLworks.Find your httpd.conf using the locate command, and open it for editing (Again I used bbedit) locate httpd.confFind the file you need and open it, in my case: bbedit /private/etc/httpd/httpd.confFind the block of code that reads: <Directory "/"> Options FollowSymLinks AllowOverride None </Directory>Duplicate it by copy and pasting it underneath, and edit the Directory to match the path to your Magentoinstall. Also, change ‘AllowOverride None’ to ‘AllowOverride All’, like so: <Directory "/Library/WebServer/Documents/magento"> Options FollowSymLinks AllowOverride All </Directory>You will again need to stop and start the web service using the Server Admin program so these changesare loaded.Running The Install WizardYou should now be in good shape to run the Magento installation wizard. Enter the address to yourMagento install, in my case: http://localhost/magento/You will be redirected to: http://localhost/magento/install/ and the wizard should load. If you get apage/file not found error, double check your path in httpd.conf above, and make sure that the line reads:
  3. 3. AllowOverride AllNotes1. When following the wizard setup. I found that in the section where you specify your MySQL database, Ihad to use the address 127.0.0.1 instead of localhost in order to find my MySQL server.2. I also opened the Server Admin program and went to the web service and sites tab, where i duplicatethe default site running on port 80. Double click the new site (the domain comes up as ‘_copy’, then clickon the ‘security’ tab. Tick ‘enable Secure Socket Layer (SSL)’. You should then be informed the port forthat site has been switched to 443. Save, and stop and start the web service. This allowed me to usehttps for the secure connection instead of changing it to http.3. When using the Entropy.ch PHP5 Package, you may also need to edit /usr/local/php5/lib/php.ini and setthe short_open_tag option to ‘On’. This appears to be off by default.relative link:http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/installing-magento-on-mac-os-x-server-10-4-9 TweetPeople who read this post also read: Moving Magento To Another Server how to install magento on window

×