Post Installation on Mac OS X

If you intend to use PHP and other tools provided by Zend Server (pear and pecl) from the command line (PHP CLI), it is recommended that you add the <install_path>/bin directory to your $PATH environment variable.

This can be done in two ways:

  • Per user profile
  • For all users

The following procedure is intended for use with bash. If you are using a different shell, adjust the procedure accordingly.

To add the <install_path>/bin directory to your $PATH environment variable per user profile, issue the following command:

echo 'export PATH=$PATH:/usr/local/zend/bin' >> $HOME/.bashrc

To add the Zend Server library path, issue the following command:

echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/zend/lib' >> $HOME/.bashrc

You can now run the PHP binary provided by Zend Server without typing its full path.

To add the <install_path>/bin directory to your $PATH environment variable for all users, issue the following command:

echo 'export PATH=$PATH:/usr/local/zend/bin' >> /etc/profile.d/zend-server.sh

To add the Zend Server library path, issue the following command:

echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/zend/lib' >> /etc/profile.d/zend-server.sh

You can now run the PHP binary provided by Zend Server without typing its full path.

因为Mac OS X上的bash是通过login的方式运行的,而man bash中写着,通过login方式登录的bash不会读取~/.bashrc。

source ~/.bashrc

解决方法:把上面的代码 添加到 ~/.bash_profile中。

echo source ~/.bashrc >> ~/.bash_profile

export PATH=/usr/local/zend/bin:/usr/local/zend/mysql/bin:$PATH 

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/zend/lib

echo 'xxxxx'|sudo -S /usr/local/zend/bin/zendctl.sh start

sudo /usr/local/zend/mysql/bin/mysql.server start

sudo /usr/local/zend/mysql/bin/mysql.server start

sudo /Library/StartupItems/ZendServer_init/ZendServer_init start

sudo /Library/StartupItems/MySql_init/MySql_init start

mysql  配置在 /usr/local/zend/mysql/data/my.cnf

-----------------------------

修改数据库存储位置

mkdir -p /Volumes/Opt/Var/mysql

mv /usr/local/zend/mysql/data/my.cnf /Volumes/Opt/Var/mysql/

sudo scripts/mysql_install_db --user=zend --datadir=/Volumes/Opt/Var/mysql --basedir=/usr/local/zend/mysql --defaults-file=/Volumes/Opt/Var/mysql/my.cnf

vi /usr/local/zend/mysql/bin/mysql.server

修改datadir = "/Volumes/Opt/Var/mysql"

/usr/local/zend/mysql/bin/mysql.server start

由于mac10.10 已经取消了startitem启动。。所以不能自启动

/Library/StartupItems/MySql_init

/Library/StartupItems/ZendServer_init

参照 : http://pikeralpha.wordpress.com/2014/06/12/yosemite-dp1-removes-systemstarter/

 

最新文章

  1. 轻松理解AOP思想(面向切面编程)
  2. ASP.NET 5系列教程 (四):向视图中添加服务和发布应用到公有云
  3. atitit.标准时间格式 互相转换 秒数 最佳实践
  4. Shortest Word Distance
  5. oracle组件
  6. short s1 = 1; s1 = s1 + 1;和 s1 += 1;
  7. [Quick-x]cocos2dx下的彩色文本显示--RichLabel
  8. ###STL学习--vector
  9. 01-OC介绍
  10. Android libyuv应用系列(二)libyuv的使用
  11. ios 概况了解
  12. Unity3d获取游戏对象的几种方法
  13. Python学习九:列表生成式
  14. java异常处理try catch finally
  15. Go Example--json
  16. 获取天气预报API5_统计最容易生病时间段
  17. Codeforces 101173 C - Convex Contour
  18. vue 自定义组件的自定义属性
  19. 每日英语:The Benefits of a Sleep Buddy
  20. a标签点击后,保证后来的样式

热门文章

  1. mysql重启,重启释放ibtmp1
  2. FFmpeg的使用&mdash;&mdash;PHP转换视频、截取视频以及JW Player播放器控制
  3. 如何快速把安卓应用移植到BlackBerry 10上
  4. Servlet介绍以及简单实例
  5. android学习的网站收集
  6. java开发struts2项目遇到FilterDispatcher过时
  7. (转)Session URL重写
  8. ubuntu12.04下helloworld驱动从失败到成功过程
  9. POI生成EXCEL文件(字体、样式、单元格合并、计算公式)
  10. 配置静态监听解决ORA-12514错误的案例