新入mac 环境

brew 

http://brew.sh/

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

假设你已安装好了Homebrew,安装与使用极其简单,打开终端,输入:

brew tap phinze/homebrew-cask
brew install brew-cask

然后就可以像brew一样来安装chrome等软件,例如:

brew cask install google-chrome

再也不需要以前的打开网页、找到链接、下载软件、解压包、放到程序目录,再来启动它这么复杂的步骤了。一键完成!

java 

brew cask search java

brew cask info java

brew cask install java

mysql

brew install mysql
mysqladmin -u root password 'new-password'

 "/etc/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly.


To connect:
    mysql -uroot

To have launchd start mysql at login:
    ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
Then to load mysql now:
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Or, if you don't want/need launchctl, you can just run:
    mysql.server start

mysql>  create   table  MyClass(
> id int(4) not null  primary key auto_increment ,
> name char(20) not null,
> sex int(4) not null  default  '0',

> degree double(16,2));


netbeans 

brew cask install netbeans-php


redis  brew install redis

o have launchd start redis at login:
    ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
Then to load redis now:
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Or, if you don't want/need launchctl, you can just run:
    redis-server /usr/local/etc/redis.conf


php 

onfigure: error: Cannot find OpenSSL's <evp.h>   

解决 :

ls -l /usr/include

sudo find / -name evp.h

udo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include /usr/include

To enable PHP in Apache add the following to httpd.conf and restart Apache:

    LoadModule php5_module    /usr/local/opt/php55/libexec/apache2/libphp5.so


The php.ini file can be found in:

    /usr/local/etc/php/5.5/php.ini


✩✩✩✩ PEAR ✩✩✩✩


If PEAR complains about permissions, 'fix' the default PEAR permissions and config:

    chmod -R ug+w /usr/local/Cellar/php55/5.5.20/lib/php

    pear config-set php_ini /usr/local/etc/php/5.5/php.ini


✩✩✩✩ Extensions ✩✩✩✩


If you are having issues with custom extension compiling, ensure that

you are using the brew version, by placing /usr/local/bin before /usr/sbin in your PATH:


      PATH="/usr/local/bin:$PATH"


PHP55 Extensions will always be compiled against this PHP. Please install them

using --without-homebrew-php to enable compiling against system PHP.


✩✩✩✩ PHP CLI ✩✩✩✩


If you wish to swap the PHP you use on the command line, you should add the following to ~/.bashrc,

~/.zshrc, ~/.profile or your shell's equivalent configuration file:


      export PATH="$(brew --prefix homebrew/php/php55)/bin:$PATH"


To have launchd start php55 at login:

    ln -sfv /usr/local/opt/php55/*.plist ~/Library/LaunchAgents

Then to load php55 now:

    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php55.plist



1.apache 

   1 #LoadModule php5_module libexec/apache2/libphp5.so 去掉#

   2 ServerName localhost:80

   3 修改#DocumentRoot "/Library/WebServer/Documents"

   4 修改下面 控制访问

      Order deny,allow

      # Deny from all

      Allow from all

   5 指定错误日志路径 ErrorLog"/private/var/log/apache2/error_log"

  

2.php

     1  session.save_handler = files

     2  session.save_path = "/tmp"

     3  session.hash_function = sha512

     4  加mysql 相关

pdo_mysql.default_socket=/tmp/mysql.sock

mysql.default_socket =/tmp/mysql.sock

mysqli.default_socket =/tmp/mysql.sock

     5 xdebug brew install php55-xdebug

     6 date.timezone =Asia/Shanghai

     7 redis 

//另外方法。。。

[xdebug]

  zend_extension="/Users/use/xdebug/xdebug.so"

  xdebug.remote_enable=1

  xdebug.remote_host=localhost

  xdebug.remote_port=9000

  xdebug.remote_mode=req

  xdebug.remote_handler=dbgp

 

 brew 

http://brew.sh/

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"



//vim 语法 高亮  显示行号

步骤1

  cp /usr/share/vim/vimrc ~/.vimrc

 先复制一份vim配置模板到个人目录下

  注:redhat 改成 cp /etc/vimrc ~/.vimrc

步骤2

  vi ~/.vimrc

 进入insert模式,在最后加二行

  syntax on

  set nu!

保存收工。





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值