mac 下 使用 brew 配置 环境
首先 開啟web共享。
配置
httpd.conf 加入php拓展? ?/etc/apache2/httpd.conf
如出現?ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`" 錯誤
需要去掉
/usr/sbin/apachectl 里面的? ulimit -S -n `ulimit -H -n
重啟apache
brew install memcached 安裝 memcache
安裝后 memcache 路徑?/usr/local/bin/memcached
?Add "-d" to start it as a daemon.
/usr/local/bin/memcached -d 啟動 不能使用 root賬戶啟動
下載 memcache
http://pecl.php.net/package/memcache
執行 ./configure make sudo make install
編輯 php ini ??chmod -R 755 /etc/php.ini
修改拓展路徑 /usr/lib/php/extensions/no-debug-non-zts-20090626/?
新加? extension=memcache.so
查看 phpinfo 是否 拓展 memcache
安裝mysql
shell> groupadd mysql
shell> useradd -r -g mysql mysql
shell> cd /usr/localshell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysqlshell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data# Next command is optional
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> bin/mysqld_safe --user=mysql &# Next command is optional
shell> cp support-files/mysql.server /etc/init.d/mysql.server
修改密碼?./bin/mysqladmin -uroot password 123456
修改 phpini
pdo_mysql.default_socket=/tmp/mysql.sock mysql.default_socket = /tmp/mysql.sock mysqli.default_socket = /tmp/mysql.sock轉載于:https://www.cnblogs.com/wangpengfei/archive/2011/05/23/2054574.html
總結
以上是生活随笔為你收集整理的mac 下 使用 brew 配置 环境的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 转载:BOA的移植
- 下一篇: 数学 希腊字母 Greek Alphab