{"id":8091,"date":"2024-07-21T23:16:59","date_gmt":"2024-07-21T17:46:59","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=8091"},"modified":"2024-07-21T23:19:22","modified_gmt":"2024-07-21T17:49:22","slug":"goals-of-setting-up-of-apachephpmysql-on-macos","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/goals-of-setting-up-of-apachephpmysql-on-macos\/","title":{"rendered":"Goals of setting up of Apache,PHP,MySQL and Magento on macOS"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Overview of MAGENTO:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1.Magento is an open source e-commerce software.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2.Useful for online business requirements.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3.This has flexibility and scalability so it used for both user-friendly and search engine friendly websites.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4.Magento is a Content Management System (CMS).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>System Requirements:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The system requires,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Web services requirements:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">=&gt;Apache2<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">=&gt;Nginx<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Database Engine Requirements:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">=&gt;MySQL8.0.33<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">=&gt;MariaDB<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">PHP Requirements:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">=&gt;PHP and PHP extensions<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the need version and supported version to your system requires.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1.Setup MAMP:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2014&gt;MAMP is to provide a Web Server Environment .<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2014&gt;MAMP stands for M(Mac OS),A(Apache),M(MySQL),P(PHP,Perl or Python).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">i)Download latest version<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ii)Open and install MAMP applications&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">iii)setup port for apache and mysql<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">iv)choose apache or Nginx as a web server<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2.Setup Apache:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Install Apache:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>brew install httpd<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To install apache:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>sudo nano \/usr\/local\/etc\/httpd\/httpd.conf<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the apache configuration after installation and modify some lines ,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">-Change port 8080 to 80<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">-Uncomment \u201cLoadModule rewrite_module lib\/httpd\/modules\/mod_rewrite.so\u201d&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">-Update document&nbsp; root \u201c\/usr\/local\/var\/www\/\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run the apache:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>sudo brew services start httpd<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After start the apache move to browser and visit : \u201chttp:\/\/localhost\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3.Setup MySQL:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>brew install mysql<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To install mysql in Mac.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>nano \/Applications\/MAMP\/conf\/my.cnf<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By using this , we need to change the configuration to run the mysql<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>lsof -I :3306<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To check the mysql port number.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>mysql -u root -p<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This will help us to check the mysql connection with the mysql version.While this indicates that mysql server is running successfully.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>CREATE DATABASE magento:<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Need to create a database for magento.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>CREATE USER \u2018magento\u2019@\u2018127.0.0.1\u2019 IDENTIFIES BY \u2018your_password\u2019<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For magento user need to create a username and require password. Have to change \u2018your_password\u2019 to set our own password.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>GRANT ALL PRIVILEGES ON *.* TO \u2018magento\u2019@\u2018127.0.0.1\u2019;<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>mysql -u magento -p magento<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>CREATE USER \u2018localmagento\u2019@\u2018localhost\u2019 IDENTIFIED BY \u2018your_password\u2019;<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>GRANT ALL PRIVILEGES ON *.* TO&nbsp; \u2018localmagento\u2019@\u2018locahost\u2019;<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here, creating a password for localmagento setup.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>mysql -u localmagento -p magento<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4.Setup PHP:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>brew update<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This command is used of updating homebrew and packages to manage the latest version available from repository.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>brew upgrade<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It will upgrade PHP to the latest version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>brew install php@8.2<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>brew reinstall php@8.2<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This command specifically install the PHP version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>brew services restart php@8.2<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It will help to restart the php services after making specific changes . So need to restart the service.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>php -v<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To view the version of php.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">5.SetUp Composer and Magento:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>composer install<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This will install the require composer files, libraries and packages need to run the project.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>composer -v<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is used to check the version of composer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>COMPOSER_MEMORY_LIMIT = -1 composer install<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Changing the memory limit of composer to not get stack with the memory and install the php dependencies&nbsp; for a project.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>brew tap opensearch-project\/homebrew-tap<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Opensearch will make a new software package to make the process easier and update via homebrew tab.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>brew install java<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This will install the needed JDK to run the magento applications.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>brew install wget<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>wget https:\/\/artifacts.opensearch.org\/releases\/bundle\/opensearch\/1.0.0\/opensearch-1.0.0-darwin-x64.tar.gz<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is used to receive an Internet via homebrew to download files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>brew install opensearch<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For installing opensearch via homebrew.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>COMPOSER_MEMORY_LIMIT =-1 php bin\/magentosetup:install<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This installs the magento using php setup and the installation will done with all specified settings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After this , in browser using https:\/\/admin, it will show the magento login page will be displayed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Save and exit buttons in macOS terminal:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To edit: I(Insert)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Save : control + o , Enter<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Exit : control + x<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Save and exit: :wq, enter<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Force quit : :q!, enter<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview of MAGENTO: 1.Magento is an open source e-commerce software. 2.Useful for online business requirements. 3.This has flexibility and scalability [&hellip;]<\/p>\n","protected":false},"author":513,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1021],"tags":[],"class_list":["post-8091","post","type-post","status-publish","format-standard","hentry","category-mobile-flutter","psol-cat-mobile-flutter"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-26v","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/8091","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/513"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=8091"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/8091\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=8091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=8091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=8091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}