Feb
22
The LAMP is on
Filed Under Mind Machine
Uhh, that “L” is for Leopard, not Linux. I don’t care what LAMP really stands for, I like the title. Anyway, I finally pulled together the right info from the zillions of forums I visited to get MySQL and Entropy’s Php to play nice with Leopard’s Apache server. If you’re having troubles, here’s what worked for me.
- Download and install MySQL 5.0.51a
- Grab the package version, cuz you’re a dummy like me.
- Don’t bother with the StartupItem or the PreferencePane installs.
- There are hacks that get these items to work, but I’m happy starting it from the Terminal… for now.
- Create symbolic links:
- sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock (thank you).
- Change permissions so that MySQL can run:
- cd /usr/local/mysql; sudo chown -R _mysql:wheel * (thank you).
- Run MySQL:
- sudo /usr/local/mysql/support-files/mysql.server start (thank you).
- Check if MySQL is running:
- ps -ax | grep my (thank you).
- Set your root MySQL password:
- mysql> UPDATE mysql.user SET Password=PASSWORD(‘newpwd’) WHERE User=’root’;
- mysql> FLUSH PRIVILEGES; (thank you).
- Kill MySQL:
- kill `cat /usr/local/mysql/data/your-server.pid` (thank you).
- Download and install Entropy’s PHP (thank you).
- Grab the file:
- curl -O http://www2.entropy.ch/download/php5-5.2.5-6-beta.tar.gz
- Extract and install:
- tar -xzf php5-*-beta.tar.gz
- sudo mv php5 /usr/local/
- Symbolic link and restart Apache:
- sudo ln -sf /usr/local/php5/entropy-php.conf /etc/apache2/other/+entropy-php.conf
- sudo apachectl restart
- Move shit around so that MySQL and Entropy’s Php play nice together (thank you):
- Go there:
- cd /usr/local/php5/include
- Move and Symbolic Link:
- sudo mv mysql mysql_entropy
- sudo ln -s /usr/local/mysql-5.0.51a-osx10.4-i686/include mysql
- Rinse and Repeat:
- cd /usr/local/php5/lib
- sudo mv mysql mysql_entropy
- sudo ln -s /usr/local/mysql-5.0.51a-osx10.4-i686/lib mysql
- Go there:
- Grab the file:
- All systems, go!:
- Run MySQL:
- sudo /usr/local/mysql/support-files/mysql.server start
- Restart Apache:
- sudo apachectl restart
- Run MySQL:
Now grab PhpMyAdmin and your apps and get to work dammit! I’m going to bed.