Mac Install Notes: Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
These instructions were down without the use of macport. I suggest that you use macports instead http://2tbsp.com/content/install_apache_2_and_php_5_macports
These instructions were down without the use of macport. I suggest that you use macports instead http://2tbsp.com/content/install_apache_2_and_php_5_macports  


Snow Leopard comes preinstalled with both Apache 2 and PHP 5 (Mac OS 10.6.8 has PHP 5.3.15 at the time of writing this) So I'd say, go straight to installing MYSQL.
== mysql  ==


/private/etc is used instead of /etc
**sudo /Library/StartupItems/MySQLCOM/MySQLCOM start  
==mysql==
**sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
**.bashrc add  
**.bashrc add  
***alias mysql=/usr/local/mysql/bin/mysql
***alias mysql=/usr/local/mysql/bin/mysql  
***alias mysqladmin=/usr/local/mysql/bin/mysqladmin
***alias mysqladmin=/usr/local/mysql/bin/mysqladmin
==bzr==
For installing this go to: http://wiki.bazaar.canonical.com/MacOSXDownloads and double click on the disk image file (.dmg), this will show you a binary for bazaar to install.


==php==
== bzr  ==
*sudo cp /private/etc/php.ini.default /private/etc/php.ini
 
*sudo chmod 644 /private/etc/php.ini
For installing this go to: http://wiki.bazaar.canonical.com/MacOSXDownloads and refer to the matrix in this page for the right binary according the system you're running.
*sudo emacs -nw /private/etc/php.ini
 
**date.timezone = 'Eastern/US'
== php ==
**in /private/etc/apache2/httpd.conf uncomment the line: LoadModule php5_module     libexec/apache2/libphp5.so
 
===PEAR===
*sudo cp /private/etc/php.ini.default /private/etc/php.ini  
*curl http://pear.php.net/go-pear.phar > ~/Desktop/go-pear.phar
*sudo chmod 644 /private/etc/php.ini  
*sudo emacs -nw /private/etc/php.ini  
**date.timezone = 'Eastern/US'  
**in /private/etc/apache2/httpd.conf uncomment the line: LoadModule php5_module libexec/apache2/libphp5.so
 
=== PEAR ===
 
*curl http://pear.php.net/go-pear.phar > ~/Desktop/go-pear.phar  
*sudo php ~/Desktop/go-pear.phar
*sudo php ~/Desktop/go-pear.phar
===MDB2===
 
=== MDB2 ===
 
**~/pear/bin/pear install MDB2 MDB2_Driver_mysql MDB2_Driver_mysqli
**~/pear/bin/pear install MDB2 MDB2_Driver_mysql MDB2_Driver_mysqli
==memcached==
 
*need xcode command line tool 10.8: https://developer.apple.com/downloads/index.action?name=Xcode
== memcached ==
 
*need xcode command line tool 10.8: https://developer.apple.com/downloads/index.action?name=Xcode  
*follow http://tugdualgrall.blogspot.com/2011/11/installing-memcached-on-mac-os-x-and.html and http://www.lecloud.net/post/3102678831/install-memcached-php-memcached-extension-under-mac
*follow http://tugdualgrall.blogspot.com/2011/11/installing-memcached-on-mac-os-x-and.html and http://www.lecloud.net/post/3102678831/install-memcached-php-memcached-extension-under-mac
<source lang='bash'>
 
mkdir ~/memcachedbuild
<source lang="bash">mkdir ~/memcachedbuild
cd ~/memcachebuild
cd ~/memcachebuild
curl -O http://www.monkey.org/~provos/libevent-1.4.14-stable.tar.gz
curl -O http://www.monkey.org/~provos/libevent-1.4.14-stable.tar.gz
Line 61: Line 68:
sudo make install
sudo make install


sudo ~/pear/bin/pecl install memcached
sudo ~/pear/bin/pecl install memcached</source>  
</source>
 
*Add extension=memcached.so" to php.ini
*Add extension=memcached.so" to php.ini  
*set /Library/LaunchDaemons/com.danga.memcached.plist to:
*set /Library/LaunchDaemons/com.danga.memcached.plist to:
<pre>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
<?xml version="1.0" encoding="UTF-8"?>
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
&lt;plist version="1.0"&gt;
<plist version="1.0">
&lt;dict&gt;
<dict>
&lt;key&gt;Label&lt;/key&gt;
<key>Label</key>
&lt;string&gt;com.danga.memcached&lt;/string&gt;
<string>com.danga.memcached</string>
&lt;key&gt;ProgramArguments&lt;/key&gt;
<key>ProgramArguments</key>
&lt;array&gt;
<array>
&lt;string&gt;/usr/bin/memcached&lt;/string&gt;
<string>/usr/bin/memcached</string>
&lt;string&gt;-d&lt;/string&gt;
<string>-d</string>
&lt;string&gt;-u&lt;/string&gt;
<string>-u</string>
&lt;string&gt;root&lt;/string&gt;
<string>root</string>
&lt;string&gt;-p&lt;/string&gt;
<string>-p</string>
&lt;string&gt;11211&lt;/string&gt;
<string>11211</string>
&lt;string&gt;-m&lt;/string&gt;
<string>-m</string>
&lt;string&gt;64&lt;/string&gt;
<string>64</string>
&lt;/array&gt;
</array>
&lt;key&gt;RunAtLoad&lt;/key&gt;
<key>RunAtLoad</key>
&lt;true/&gt;
<true/>
&lt;/dict&gt;
</dict>
&lt;/plist&gt;
</plist>
</pre>  
</pre>
*sudo launchctl load /Library/LaunchDaemons/com.danga.memcached.plist
*sudo launchctl load /Library/LaunchDaemons/com.danga.memcached.plist


==apache==
== apache ==
 
*the equivalent of /var/www is /Library/WebServer/Documents/  
*the equivalent of /var/www is /Library/WebServer/Documents/  
*apachectl start
*apachectl start
==iHRIS==
 
== iHRIS ==
 
*config.values.php -- dsn needs 127.0.0.1 not localhost
*config.values.php -- dsn needs 127.0.0.1 not localhost
==LDAP==
 
*no password is set:   slappasswd
== LDAP ==
 
*no password is set: slappasswd  
*cp slapd.conf.default slapd.conf
*cp slapd.conf.default slapd.conf
http://www.hccp.org/osx-ldap-tiger.html
 
http://www.hccp.org/osx-ldap-tiger.html  
 
*/Library/LaunchDaemons/org.openldap.slapd.plist
*/Library/LaunchDaemons/org.openldap.slapd.plist
<source lang='xml'>
 
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
Line 115: Line 129:
   </dict>
   </dict>
</plist>
</plist>
</source>
</source>  
*sudo launchctl load -w /System/Library/LaunchDaemons/org.openldap.slapd.plist
 
*sudo launchctl stop org.openldap.slapd
*sudo launchctl load -w /System/Library/LaunchDaemons/org.openldap.slapd.plist  
*sudo launchctl stop org.openldap.slapd  
*sudo launchctl start org.openldap.slapd
*sudo launchctl start org.openldap.slapd

Latest revision as of 16:23, 3 March 2014

These instructions were down without the use of macport. I suggest that you use macports instead http://2tbsp.com/content/install_apache_2_and_php_5_macports

mysql

    • sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
    • .bashrc add
      • alias mysql=/usr/local/mysql/bin/mysql
      • alias mysqladmin=/usr/local/mysql/bin/mysqladmin

bzr

For installing this go to: http://wiki.bazaar.canonical.com/MacOSXDownloads and refer to the matrix in this page for the right binary according the system you're running.

php

  • sudo cp /private/etc/php.ini.default /private/etc/php.ini
  • sudo chmod 644 /private/etc/php.ini
  • sudo emacs -nw /private/etc/php.ini
    • date.timezone = 'Eastern/US'
    • in /private/etc/apache2/httpd.conf uncomment the line: LoadModule php5_module libexec/apache2/libphp5.so

PEAR

MDB2

    • ~/pear/bin/pear install MDB2 MDB2_Driver_mysql MDB2_Driver_mysqli

memcached

<source lang="bash">mkdir ~/memcachedbuild cd ~/memcachebuild curl -O http://www.monkey.org/~provos/libevent-1.4.14-stable.tar.gz tar xzvf libevent-1.4.14-stable.tar.gz cd libevent-1.4.14-stable ./configure make make verify sudo make install

cd ~/memcachebuild curl -O http://memcached.googlecode.com/files/memcached-1.4.10.tar.gz tar xzvf memcached-1.4.10.tar.gz cd memcached-1.4.10 ./configure make make test sudo make install


cd ~/memcachebuild

curl -O ftp://ftp.gnu.org/gnu/m4/m4-1.4.16.tar.bz2 curl -O ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.68.tar.bz2 curl -O ftp://ftp.gnu.org/gnu/automake/automake-1.11.1.tar.bz2 curl -O ftp://ftp.gnu.org/gnu/libtool/libtool-2.4.tar.gz --make and install the above


DOWNLOAD https://launchpad.net/libmemcached/+download to ~/memcachebuild

tar -zxvf libmemcached-1.0.9con.tar.gz cd libmemcached-0.37 ./configure; make sudo make install

sudo ~/pear/bin/pecl install memcached</source>

  • Add extension=memcached.so" to php.ini
  • set /Library/LaunchDaemons/com.danga.memcached.plist to:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.danga.memcached</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/memcached</string>
<string>-d</string>
<string>-u</string>
<string>root</string>
<string>-p</string>
<string>11211</string>
<string>-m</string>
<string>64</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
  • sudo launchctl load /Library/LaunchDaemons/com.danga.memcached.plist

apache

  • the equivalent of /var/www is /Library/WebServer/Documents/
  • apachectl start

iHRIS

  • config.values.php -- dsn needs 127.0.0.1 not localhost

LDAP

  • no password is set: slappasswd
  • cp slapd.conf.default slapd.conf

http://www.hccp.org/osx-ldap-tiger.html

  • /Library/LaunchDaemons/org.openldap.slapd.plist

<source lang="xml"> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0">

 <dict>
   <key>Label</key>
   <string>org.openldap.slapd</string>
   <key>ProgramArguments</key>
   <array>
     <string>/usr/libexec/slapd</string>
   </array>
   <key>RunAtLoad</key>
   <true/>
 </dict>

</plist> </source>

  • sudo launchctl load -w /System/Library/LaunchDaemons/org.openldap.slapd.plist
  • sudo launchctl stop org.openldap.slapd
  • sudo launchctl start org.openldap.slapd