Hi,
There are some tutorials active Webserver environment:
- Apache:
- Root folder: /Library/WebServer/Documents/
- Start: sudo apachectl start
- Stop: sudo apachectl stop
- Restart: sudo apachectl graceful
- PHP:
- Install:
- cd /etc && sudo cp php.ini.default php.ini
- sudo vim httpd.conf
- Uncomment out the hash # to leave it like:
- Restart Apache
- Warning: date_default_timezone_get():
- sudo vim /private/etc/php.ini
- date.timezone = "UTC"
- autoconf:
- Install:
- Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.
- curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
- tar xvfz autoconf-latest.tar.gz
- cd autoconf-2.69/
- ./configure
- make
- sudo make install
- Missing extension:
- http://www.coolestguyplanettech.com/how-to-install-mcrypt-for-php-on-mac-osx-lion-10-7-development-server/
- Download the PHP's source code. You'll need to download the one that matches the version already installed on your system. To find out which one you're using, type php -v from the command line.
- Extract the archive you downloaded using tar -zxvf followed by the filename. Type cd php-5.4.x/ext/sqlite3/ (where "5.4.x" should be replaced with your version number and "sqlite3" can be any of the modules you want to install from your list above minus the "php_" prefix)
- Type phpize
- Type ./configure
- Type make
- Type sudo make install
- Find shared extenstions folder:
- E.G.: /usr/lib/php/extensions/no-debug-non-zts-20090626/
- Add extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20090626" to your php.ini
- Add extension=sqlite3.so to your php.ini (again make sure to replace sqlite3.so with the name of the other extensions if you compile the others).
- Restart Apache
- Or you can try this tutorials:
- http://php-osx.liip.ch/
- MySQL:
- Install:
- Go to: http://dev.mysql.com/downloads/mysql/
- Download DMG file for your current operation: Mac OS X ver. 10.6 (x86, 64-bit), DMG Archive
- Open the downloaded file and double click the file called mysql-x.x.xx-osx10.x-x86_64.pkg and continue through the installation
- App can’t be opened because it is from an unidentified developer: http://osxdaily.com/2012/07/27/app-cant-be-opened-because-it-is-from-an-unidentified-developer/
- Installation: MySQL.prefPane, MySQLStartupItem.pkg
- Enable command line:
- sudo vim /etc/paths
- Appended the line:
- /usr/local/mysql/bin
- Restart OS
- Missing /var/mysql/mysql.sock file:
- Check it at:
- /private/tmp/mysql.sock
- /tmp/mysql.sock
- /usr/local/mysql/run/mysql_socket
- Try create symbolic link for: /var/mysql/mysql.sock
- sudo ln -s /private/tmp/mysql.sock /var/mysql/mysql.sock
- sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock
- sudo ln -s /usr/local/mysql/run/mysql_socket /var/mysql/mysql.sock
- Reference:
- http://blog.mclaughlinsoftware.com/2011/02/10/mac-os-x-mysql-install/
Good luck!
No comments:
Post a Comment