Skip to content

Instantly share code, notes, and snippets.

@ahmed-rezk-dev
Forked from dreamsparkx/More-links.txt
Created July 26, 2020 21:42
Show Gist options
  • Save ahmed-rezk-dev/4cbc0b8b24c9229632a0b8bef58c5ff5 to your computer and use it in GitHub Desktop.
Save ahmed-rezk-dev/4cbc0b8b24c9229632a0b8bef58c5ff5 to your computer and use it in GitHub Desktop.

Revisions

  1. @dreamsparkx dreamsparkx revised this gist Sep 11, 2017. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion More-links.txt
    Original file line number Diff line number Diff line change
    @@ -10,4 +10,8 @@ https://coolestguidesontheplanet.com/get-apache-mysql-php-and-phpmyadmin-working
    /etc/apache2

    ##Documents location
    /Library/WebServer/Documents
    /Library/WebServer/Documents


    #mcrypt php
    https://gist.github.com/idleberg/24479f34dc5007e50d47
  2. @dreamsparkx dreamsparkx revised this gist Sep 11, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -68,7 +68,7 @@ ln -s /tmp/mysql.sock mysql.sock

    You may recieve <i>403 forbidden</i> when you visit your local site. The Apache user(`_www`) needs to have access to read, and sometimes write, your web directory.

    You can either change permissions like this: `chmod 755 directory/` or you can change the ownership of the directory to the apache user and group: `chown -R _www|_www directory`
    You can either change permissions like this: `chmod 755 directory/` or you can change the ownership of the directory to the apache user and group: `chown -R _www:_www directory`

    # 5. Install PHPMyAdmin

  3. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 2 changed files with 14 additions and 1 deletion.
    13 changes: 13 additions & 0 deletions More-links.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    https://jason.pureconcepts.net/2015/10/install-apache-php-mysql-mac-os-x-el-capitan/
    https://jason.pureconcepts.net/2012/10/install-apache-php-mysql-mac-os-x/
    https://coolestguidesontheplanet.com/get-apache-mysql-php-and-phpmyadmin-working-on-osx-10-11-el-capitan/
    http://www.alphansotech.com/blogs/setup-apache-mysql-php-phpmyadmin-mac-osx/
    https://mallinson.ca/osx-web-development/
    https://coolestguidesontheplanet.com/get-apache-mysql-php-and-phpmyadmin-working-on-osx-10-11-el-capitan/


    ##Apache httpd file location
    /etc/apache2

    ##Documents location
    /Library/WebServer/Documents
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -82,4 +82,4 @@ cd phpmyadmin
    mv config.sample.inc.php config.inc.php
    ```

    # Done! Done! Done!
    **Done! Done! Done!**
  4. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -80,4 +80,6 @@ tar -xvf ~/Downloads/phpMyAdmin-4.7.4-english.tar.gz
    mv phpMyAdmin-4.7.4-english/ phpmyadmin
    cd phpmyadmin
    mv config.sample.inc.php config.inc.php
    ```
    ```

    # Done! Done! Done!
  5. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -70,7 +70,7 @@ You may recieve <i>403 forbidden</i> when you visit your local site. The Apache

    You can either change permissions like this: `chmod 755 directory/` or you can change the ownership of the directory to the apache user and group: `chown -R _www|_www directory`

    # 5. Install [PHPMyAdmin](https://www.phpmyadmin.net/)
    # 5. Install PHPMyAdmin

    This is optional. You can use MySQL through command line but this is a good way to administer MySQL. Download phpmyadmin from [site](https://www.phpmyadmin.net/).

  6. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. No changes.
  7. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 13 additions and 1 deletion.
    14 changes: 13 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -68,4 +68,16 @@ ln -s /tmp/mysql.sock mysql.sock

    You may recieve <i>403 forbidden</i> when you visit your local site. The Apache user(`_www`) needs to have access to read, and sometimes write, your web directory.

    You can either change permissions like this: `chmod 755 directory/` or you can change the ownership of the directory to the apache user and group: `chown -R _www|_www directory`
    You can either change permissions like this: `chmod 755 directory/` or you can change the ownership of the directory to the apache user and group: `chown -R _www|_www directory`

    # 5. Install [PHPMyAdmin](https://www.phpmyadmin.net/)

    This is optional. You can use MySQL through command line but this is a good way to administer MySQL. Download phpmyadmin from [site](https://www.phpmyadmin.net/).

    ```phpmyadmin-installation
    cd /Library/WebServer/Documents/
    tar -xvf ~/Downloads/phpMyAdmin-4.7.4-english.tar.gz
    mv phpMyAdmin-4.7.4-english/ phpmyadmin
    cd phpmyadmin
    mv config.sample.inc.php config.inc.php
    ```
  8. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -66,6 +66,6 @@ ln -s /tmp/mysql.sock mysql.sock

    ## Note on Permissions

    You may recieve <i>403 forbidden</i> when you visit your local site. The Apache user needs to have access to read, and sometimes write, your web directory.
    You may recieve <i>403 forbidden</i> when you visit your local site. The Apache user(`_www`) needs to have access to read, and sometimes write, your web directory.

    You can either change permissions like this: `chmod 755 some_directory/`.
    You can either change permissions like this: `chmod 755 directory/` or you can change the ownership of the directory to the apache user and group: `chown -R _www|_www directory`
  9. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -66,4 +66,6 @@ ln -s /tmp/mysql.sock mysql.sock

    ## Note on Permissions

    You may recieve <i>403 forbidden</i> when you visit your local site. The Apache user needs to have access to read, and sometimes write, your web directory.
    You may recieve <i>403 forbidden</i> when you visit your local site. The Apache user needs to have access to read, and sometimes write, your web directory.

    You can either change permissions like this: `chmod 755 some_directory/`.
  10. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -66,4 +66,4 @@ ln -s /tmp/mysql.sock mysql.sock

    ## Note on Permissions

    You may recieve <i>403 forbidden</i> when you visit your local site. The Apache user(_www_) needs
    You may recieve <i>403 forbidden</i> when you visit your local site. The Apache user needs to have access to read, and sometimes write, your web directory.
  11. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -66,4 +66,4 @@ ln -s /tmp/mysql.sock mysql.sock

    ## Note on Permissions

    You may recieve <i>403 forbidden</i> when you visit your local site. The Apache user(_ _ _www) needs
    You may recieve <i>403 forbidden</i> when you visit your local site. The Apache user(_www_) needs
  12. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -66,4 +66,4 @@ ln -s /tmp/mysql.sock mysql.sock

    ## Note on Permissions

    You may recieve a <i>403 forbidden</i>
    You may recieve <i>403 forbidden</i> when you visit your local site. The Apache user(_ _ _www) needs
  13. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -62,4 +62,8 @@ mkdir mysql
    cd mysql
    ln -s /tmp/mysql.sock mysql.sock
    ```
    **All your sites would have URLs like http://locahost/some-site pointing to /Library/WebServer/Documents/some-site**
    **All your sites would have URLs like http://locahost/some-site pointing to /Library/WebServer/Documents/some-site.**

    ## Note on Permissions

    You may recieve a <i>403 forbidden</i>
  14. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -61,4 +61,5 @@ cd /var
    mkdir mysql
    cd mysql
    ln -s /tmp/mysql.sock mysql.sock
    ```
    ```
    **All your sites would have URLs like http://locahost/some-site pointing to /Library/WebServer/Documents/some-site**
  15. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # Prerequisites
    Install [homebrew](https://brew.sh/):
    `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    `

    `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"`

    # 1. Enable Apache
    Open Terminal and run the following Code: `sudo apachectl start`
  16. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    # Prerequisites
    Install [homebrew](https://brew.sh/): `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    Install [homebrew](https://brew.sh/):
    `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    `

    # 1. Enable Apache
  17. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,7 @@
    # Prerequisites
    Install [homebrew](https://brew.sh/): `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    `

    # 1. Enable Apache
    Open Terminal and run the following Code: `sudo apachectl start`

  18. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -49,3 +49,11 @@ Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    mysql>
    ```
    # 4. Connect PHP and MySQL

    Now we need to ensure PHP and MySQL:
    ```mysql-php-connection
    cd /var
    mkdir mysql
    cd mysql
    ln -s /tmp/mysql.sock mysql.sock
    ```
  19. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -47,5 +47,5 @@ owners.
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    mysql>
    ```
    ```
    # 4. Connect PHP and MySQL
  20. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 20 additions and 1 deletion.
    21 changes: 20 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -29,4 +29,23 @@ Now configure MySQL : `mysql_secure_installation`
    * Remove test database and access to it
    * Reload privilege tables now - Choose yes

    After finishing this up, test MySQL: `mysql -uroot -p`
    After finishing this up, test MySQL: `mysql -uroot -p`.

    It will ask you write the password you set for mysql before. Enter password and then something like this appear:

    ```mysql-Login
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 3
    Server version: 5.7.19 Homebrew
    Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
    Oracle is a registered trademark of Oracle Corporation and/or its
    affiliates. Other names may be trademarks of their respective
    owners.
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    mysql>
    ```
  21. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -27,4 +27,6 @@ Now configure MySQL : `mysql_secure_installation`
    * Remove anonymous users
    * Disallow root login remotely
    * Remove test database and access to it
    * Reload privilege tables now - Choose yes
    * Reload privilege tables now - Choose yes

    After finishing this up, test MySQL: `mysql -uroot -p`
  22. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -23,4 +23,8 @@ Install brew services now: `brew tap homebrew/services`
    Now start MySQL: `brew services start mysql`

    Now configure MySQL : `mysql_secure_installation`
    * Validate Password Plugin
    * Validate Password Plugin
    * Remove anonymous users
    * Disallow root login remotely
    * Remove test database and access to it
    * Reload privilege tables now - Choose yes
  23. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -22,4 +22,5 @@ Install brew services now: `brew tap homebrew/services`

    Now start MySQL: `brew services start mysql`

    To configure MySQL : `mysql_secure_installation`
    Now configure MySQL : `mysql_secure_installation`
    * Validate Password Plugin
  24. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -16,3 +16,10 @@ Now uncomment the following line (Remove #): `LoadModule php5_module libexec/apa
    Now Restart apache: `sudo apachectl restart`

    # 3. Install MySQL
    To install MySQL: `brew install mysql`

    Install brew services now: `brew tap homebrew/services`

    Now start MySQL: `brew services start mysql`

    To configure MySQL : `mysql_secure_installation`
  25. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -13,4 +13,6 @@ Now edit the **httpd.conf** with vi or any other text editor: `vi httpd.conf`

    Now uncomment the following line (Remove #): `LoadModule php5_module libexec/apache2/libphp5.so`

    Now Restart apache: `sudo apachectl restart`
    Now Restart apache: `sudo apachectl restart`

    # 3. Install MySQL
  26. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -11,4 +11,6 @@ cp httpd.conf httpd.conf.bak
    ```
    Now edit the **httpd.conf** with vi or any other text editor: `vi httpd.conf`

    Now uncomment the following line (Remove #): `LoadModule php5_module libexec/apache2/libphp5.so`
    Now uncomment the following line (Remove #): `LoadModule php5_module libexec/apache2/libphp5.so`

    Now Restart apache: `sudo apachectl restart`
  27. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -9,5 +9,6 @@ Let's make a backup of the default Apache configuration. This will help you to c
    cd /etc/apache2/
    cp httpd.conf httpd.conf.bak
    ```
    Now edit the **httpd.conf** with vi or any other text editor.
    `vi httpd.conf`
    Now edit the **httpd.conf** with vi or any other text editor: `vi httpd.conf`

    Now uncomment the following line (Remove #): `LoadModule php5_module libexec/apache2/libphp5.so`
  28. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -9,4 +9,5 @@ Let's make a backup of the default Apache configuration. This will help you to c
    cd /etc/apache2/
    cp httpd.conf httpd.conf.bak
    ```
    Now edit the **httpd.conf** with vi or any other text editor.
    Now edit the **httpd.conf** with vi or any other text editor.
    `vi httpd.conf`
  29. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -8,4 +8,5 @@ Let's make a backup of the default Apache configuration. This will help you to c
    ```Apache-config-backup
    cd /etc/apache2/
    cp httpd.conf httpd.conf.bak
    ```
    ```
    Now edit the **httpd.conf** with vi or any other text editor.
  30. @dreamsparkx dreamsparkx revised this gist Sep 8, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ Open your browser and access http://localhost. If it says **It Works**, then you

    # 2. Enable PHP for Apache
    Let's make a backup of the default Apache configuration. This will help you to cross check later what you changed or in case you want to restore the configuration to default.
    ```cd /etc/apache2/
    ```Apache-config-backup
    cd /etc/apache2/
    cp httpd.conf httpd.conf.bak
    ```