SlideShare ist ein Scribd-Unternehmen logo
1 von 3
Downloaden Sie, um offline zu lesen
Articles of php tutorial magento tutorial from php
                      community
Installing Magento on Mac OS X Server
2011-01-05 09:01:20 admin

Here’s a basic outline of how to install Magento on Mac OS X Server 10.4.9 for development and testing
purposes. The OS X Server installation I used was fairly standard, running on a local machine used for
development testing.

I would think that the majority of these instructions should work with a standard install of OS X (not
server), but I have yet to try this.

The following instructions assume you have MySQL running on your development server, and that you
have created an empty database for the Magento install.

Install PHP5

The default install of OS X Server 10.4 comes with PHP 4 installed, you will need to upgrade this
to PHP 5. I used the package made available by Marc Liyanage on his site. Get it
here: 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 the
main thing to do before installing is to make sure you have disabled the PHP 4 module in Apache using
the Server Admin program. Open the program and head to the web service > settings > modules. Un
check ‘php4_module’, save, then stop and start the web service. You can then run the PHP 5 Install
package.

2. Open /Library/WebServer/Documents/info.php and uncomment line 5, then save the file. This will give
you a phpinfo file you can use to see what version of PHP you are running. Browse
to http://localhost/info.php and you should see that you havePHP Version 5.2.4 installed (or a later
version if the package has been updated).

3. Now you need to make a small change to the php.ini file in line with the comments
here: http://www.entropy.ch/phpbb2/viewtopic.php?p=9499#9499

What’s helpful at this point is to update your locate database so you can easily find files for editing. Simply
run the following command in a terminal window to do this, it may take a short time to complete. Just let it
run until you get the prompt back.

 sudo /usr/libexec/locate.updatedb


You should now be able to find your php.ini file by typing the following in the terminal window:

 locate php.ini


You should get a list of files containing php.ini and their paths. I use BBedit for text editing, and use the
BBedit command line tool to open files using terminal.

I ran the following command:

 bbedit /usr/local/php5/lib/php.ini


This opened the file in BBedit. You then need to change line 810 as stated in the above link. The only
alteration I made was to run a locate command to find the exact path of mysql.sock on my machine, like
so:

 locate mysql.sock
In my case I changed line 810 to read the following, then saved the file:

 mysql.default_socket = /private/var/mysql/mysql.sock


You then need to stop and start the web service in the Server Admin program to re-load the php.ini file
with its change.

Download M agento

Next, download the Magento zip and uncompress it. Copy the ‘magento’ folder to your web server
documents 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 MUST
be in the folder in your web root. Files with a ‘.’ at the start are invisible in the Mac OS finder, so it is likely
you will miss this file if you copy the files out of the original folder. You can use the terminal to copy the file
to the correct location if you need too. Make sure you change the permissions on the files and folders
mentioned on the Magento install guide page.

Getting M od Rewrite Working

You now need to edit the httpd.conf file in order to get mod rewrite working correctly. This is the main area
I had difficulty with, as without making this change, when you first try to run Magento you will get a file not
found error when your web server looks for http://localhost/magento/install/. ‘install’ is not a physical
directory, 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.conf


Find the file you need and open it, in my case:

 bbedit /private/etc/httpd/httpd.conf


Find 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 Magento
install. 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 changes
are loaded.

Running The Install Wizard

You should now be in good shape to run the Magento installation wizard. Enter the address to your
Magento install, in my case: http://localhost/magento/

You will be redirected to: http://localhost/magento/install/ and the wizard should load. If you get a
page/file not found error, double check your path in httpd.conf above, and make sure that the line reads:
AllowOverride All

Notes

1. When following the wizard setup. I found that in the section where you specify your MySQL database, I
had 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 duplicate
the default site running on port 80. Double click the new site (the domain comes up as ‘_copy’, then click
on the ‘security’ tab. Tick ‘enable Secure Socket Layer (SSL)’. You should then be informed the port for
that site has been switched to 443. Save, and stop and start the web service. This allowed me to use
https 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 set
the 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

      Tweet

People who read this post also read:

      Moving Magento To Another Server
      how to install magento on window

Weitere ähnliche Inhalte

Empfohlen

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

Empfohlen (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Installing magento on mac os x server

  • 1. Articles of php tutorial magento tutorial from php community Installing Magento on Mac OS X Server 2011-01-05 09:01:20 admin Here’s a basic outline of how to install Magento on Mac OS X Server 10.4.9 for development and testing purposes. The OS X Server installation I used was fairly standard, running on a local machine used for development testing. I would think that the majority of these instructions should work with a standard install of OS X (not server), but I have yet to try this. The following instructions assume you have MySQL running on your development server, and that you have created an empty database for the Magento install. Install PHP5 The default install of OS X Server 10.4 comes with PHP 4 installed, you will need to upgrade this to PHP 5. I used the package made available by Marc Liyanage on his site. Get it here: 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 the main thing to do before installing is to make sure you have disabled the PHP 4 module in Apache using the Server Admin program. Open the program and head to the web service > settings > modules. Un check ‘php4_module’, save, then stop and start the web service. You can then run the PHP 5 Install package. 2. Open /Library/WebServer/Documents/info.php and uncomment line 5, then save the file. This will give you a phpinfo file you can use to see what version of PHP you are running. Browse to http://localhost/info.php and you should see that you havePHP Version 5.2.4 installed (or a later version if the package has been updated). 3. Now you need to make a small change to the php.ini file in line with the comments here: http://www.entropy.ch/phpbb2/viewtopic.php?p=9499#9499 What’s helpful at this point is to update your locate database so you can easily find files for editing. Simply run the following command in a terminal window to do this, it may take a short time to complete. Just let it run until you get the prompt back. sudo /usr/libexec/locate.updatedb You should now be able to find your php.ini file by typing the following in the terminal window: locate php.ini You should get a list of files containing php.ini and their paths. I use BBedit for text editing, and use the BBedit command line tool to open files using terminal. I ran the following command: bbedit /usr/local/php5/lib/php.ini This opened the file in BBedit. You then need to change line 810 as stated in the above link. The only alteration I made was to run a locate command to find the exact path of mysql.sock on my machine, like so: locate mysql.sock
  • 2. In my case I changed line 810 to read the following, then saved the file: mysql.default_socket = /private/var/mysql/mysql.sock You then need to stop and start the web service in the Server Admin program to re-load the php.ini file with its change. Download M agento Next, download the Magento zip and uncompress it. Copy the ‘magento’ folder to your web server documents 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 MUST be in the folder in your web root. Files with a ‘.’ at the start are invisible in the Mac OS finder, so it is likely you will miss this file if you copy the files out of the original folder. You can use the terminal to copy the file to the correct location if you need too. Make sure you change the permissions on the files and folders mentioned on the Magento install guide page. Getting M od Rewrite Working You now need to edit the httpd.conf file in order to get mod rewrite working correctly. This is the main area I had difficulty with, as without making this change, when you first try to run Magento you will get a file not found error when your web server looks for http://localhost/magento/install/. ‘install’ is not a physical directory, 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.conf Find the file you need and open it, in my case: bbedit /private/etc/httpd/httpd.conf Find 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 Magento install. 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 changes are loaded. Running The Install Wizard You should now be in good shape to run the Magento installation wizard. Enter the address to your Magento install, in my case: http://localhost/magento/ You will be redirected to: http://localhost/magento/install/ and the wizard should load. If you get a page/file not found error, double check your path in httpd.conf above, and make sure that the line reads:
  • 3. AllowOverride All Notes 1. When following the wizard setup. I found that in the section where you specify your MySQL database, I had 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 duplicate the default site running on port 80. Double click the new site (the domain comes up as ‘_copy’, then click on the ‘security’ tab. Tick ‘enable Secure Socket Layer (SSL)’. You should then be informed the port for that site has been switched to 443. Save, and stop and start the web service. This allowed me to use https 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 set the 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 Tweet People who read this post also read: Moving Magento To Another Server how to install magento on window