<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Sealyu

    --- 博客已遷移至: http://www.sealyu.com/blog

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      618 隨筆 :: 87 文章 :: 225 評論 :: 0 Trackbacks
    MAMP creates a local server environment on Mac OS X by installing PHP, MySQL, and Apache right out of the box. This will make Drupal much easier to install because the components don't have to be installed separately. This page is to be used in conjunction with the installation instructions for Drupal on Mac OS X.

    Also you may want to check out this video in the Videocasts section of the handbook: Installing a Local Web Server on Mac OS X.

    Download MAMP

    (This will install Apache, MySQL, and PHP in one step.)
    Find the latest version here: http://www.mamp.info/
    Download and drag to Applications folder to install. Open MAMP and click "start servers," then "Open start page."

    Download Drupal

    Find the latest Drupal release here: http://drupal.org/.

    Move the directory containing the Drupal files into the MAMP htdocs directory:

    mv drupal-x.x.x/* drupal-x.x.x/.htaccess /Applications/MAMP/htdocs/yourdrupaldir

    where yourdrupaldir is whatever you want the directory to be called.

    Note: if you use Finder you may miss moving the .htaccess file which is necessary for clean URLs to work. It is generally best to download and unzip Drupal directly in the document root (default is htdocs) so you don't miss the .htaccess.

    Create the Drupal database

    To create a database for Drupal

    1. Go to the MAMP start page
    2. Click "phpMyAdmin"
    3. On the next page click "Databases"
    4. On the "Databases" page enter a name for your Drupal database in the "Create new database" field at the bottom of the page
    5. Select "utf8_general_ci" under the "Collation" drop-down (must be utf8!)
    6. Click "Create"
    7. Next you must create a user name with the privileges Drupal requires to use the new database
    8. Go back to the main phpMyAdmin page and click "Privileges"
    9. On the next page click "Add a new User".
    10. Fill out the "Login Information" form, making sure to change the "Host" field to "Local" and not leave it as "Any host" (for some reason Drupal will not be able to connect to your local database if you select "Any host")
    11. Leave the "None" radio button selected under the "Database for user" section, and under the "Global privileges" section leave everything unchecked
    12. Click "Go"
    13. On the next page scroll down to the "Database-specific privileges" section and select the new Drupal database you created from the dropdown
    14. Check the SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX and ALTER checkboxes and then click "Go".

    You can also use a GUI such as Sequel Pro, just remember to use this as your Socket:

    /Applications/MAMP/tmp/mysql/mysql.sock

    Changing your password

    The default username/password for your MySQL install is now root/root! For security purposes, it's always best to change this. If you're connected to the internet, this is a must.

    When you are changing the default user/password from root/root, you need to do two things. Only the first is documented in the MAMP start page FAQ, but if you don't do the second then you get an error message when you try to access anything from the MAMP start page.

    1. Use command line to change the password (as documented in the MAMP start page FAQ)

      Open the terminal and type the following:
      /Applications/MAMP/Library/bin/mysqladmin -u root -p password [NEWPASSWORD]

      It will ask for the current password after you hit enter. Once you have entered that, the MySQL password is changed.

    2. Open a text editor and change the password in the three following files:
      • /Applications/MAMP/bin/phpMyAdmin-X.X.X/config.inc.php

        Find the line that reads...
        $cfg['Servers'][$i]['password']      = 'root';
        ...and change the value 'root' to your new password, retaining the quotes.

      • /Applications/MAMP/bin/mamp/index.php

        Find the line that reads...
        $link = @mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'root', 'root');
        ...and change the last parameter to your new password.

      • /Applications/MAMP/bin/stopMysql.sh

        Replace the -proot with your password. (If you don't change this one you can have zombie mysqld's running after you thought you stopped the server)

    Optional: Adjust PHP's memory limit for scripts

    By default, MAMP has the memory limit that a script can use set at 8MB, which is the PHP default. Looking at PHP's php.ini-recommended file, this memory limit is normally set at 128MB. To adjust this amount, open the php.ini file in a text editor and change the following line (approximately on line 232):

    memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)

    PHP.ini file locations:

    • /Applications/MAMP/conf/php4/php.ini
    • /Applications/MAMP/conf/php5/php.ini

    In MAMP PRO, don't alter the file directly since it will be recreated at each server start. Please edit the appropriate template (menu File > Edit template > ...) instead.

    Even with larger PHP memory limits you can get timeout errors trying to import large Drupal databases into MySQL. These issues are discussed at length elsewhere with regards to the cache and views cache. Generally the solution is to empty the Drupal cache before importing/exporting databases to/from MySQL.

    Connect Drupal

    Navigate to http://localhost:8888/yourdrupaldir/install.php and fill in the installation fields using the information provided on the MAMP start page and the name you used for the database you created in step 3.

    Start configuring Drupal!

    Go to http://localhost:8888/yourdrupaldir/ and create the first account.
    Continue with instructions in INSTALL.txt.

    If you changed your MySQL username and password you will need to modify that in your local Drupal settings.php file as well.

    Temporary Files Note:

    By default the File System settings (admin/settings/file-system) will place the temporary files directory inside /Applications/MAMP/tmp/php which should be changed to something like files/tmp or sites/files/tmp to avoid later confusion.

    Clean up your Localhost URL

    If you would like to shorten your URL from "http://localhost:8888" to "http://localhost" follow these instructions:

    • Open the MAMP application
    • Click on "Preferences" and then "Ports"
    • Change the Apache Port to 80 (the standard web server port)
    In MAMP PRO, change the port of apache to 80 and click on apply.
    posted on 2010-08-12 20:35 seal 閱讀(498) 評論(0)  編輯  收藏 所屬分類: ApplePHP
    主站蜘蛛池模板: 亚洲日韩一区二区一无码| 日本精品久久久久久久久免费| 亚洲中文字幕久久精品无码2021| 亚洲AV女人18毛片水真多| 华人在线精品免费观看| 日本一道一区二区免费看| 久久亚洲AV成人无码| 成年免费大片黄在线观看com| 国产在线观看麻豆91精品免费| 亚洲一区二区三区无码影院| 2020久久精品亚洲热综合一本| 在线看片免费人成视频福利| 国产在线观看免费完整版中文版| 久久精品国产亚洲AV大全| 一级毛片免费视频网站| 午夜老司机免费视频| 亚洲日本国产乱码va在线观看| 中文在线免费不卡视频| 国产在线ts人妖免费视频| 理论片在线观看免费| 成年女人看片免费视频播放器| 亚洲高清日韩精品第一区| 最近中文字幕mv免费高清视频8 | 少妇无码一区二区三区免费| 亚洲国产成人精品久久久国产成人一区二区三区综| 亚洲AV无码国产丝袜在线观看| 国产精品免费久久| 亚洲av无码国产精品色在线看不卡 | 日本成人免费在线| 久久精品国产亚洲av品善| 在线观看免费高清视频| 亚洲国产成人精品久久| 日本最新免费网站| 亚洲福利一区二区三区| 在线成人爽a毛片免费软件| 亚洲精品国产国语| 成年人性生活免费视频| 在线播放国产不卡免费视频 | 国产免费不卡v片在线观看| 无人视频在线观看免费播放影院| 亚洲国产精品SSS在线观看AV|