mac问题小笔记
2016-03-31 19:14
597 查看
You have not agreed to the Xcode license agreements的解决方案
最近使用Jenkins做iOS项目的CI时,遇到了下面的问题:
You have not agreed to the Xcode license agreements, please run xcodebuild standalone from within a Terminal window to review and agree to the Xcode license agreements.
但是按照提示在Terminal中去运行xcodebuild又没有任何问题,用xcodebuild –help发现有一个option是-license。
输入xcodebuild -license会展示一大段的license,空格键是查看更多,耐心看完之后,根据最后的提示,输入agree。注意保证agree前面没有空格,有可能空格键按得太快会打几个空格出来的。
mac查看端口占用:
sudo lsof -i -P | grep -i "listen"
Mac端口:
mac os x不允许root以外的用户使用1024以下的端口
Mac开机自动启动php-fpm
使用brew安装的php-fpm自动启动,我先是把homebrew.mxcl.php55.plist放在/Users/tangcheng/Library/LaunchAgents,但是怎么都加载不进去,查看这个plist有一个选项
<key>UserName</key>
<string>root</string>
我上网查,说这个选项必须是在以root启动的时候才有用,我就把homebrew.mxcl.php55.plist放到了/Library/LaunchAgents里面,还tm不行,最后放到了/Library/LaunchDaemons里面,这个文件夹里面的所有都是以root权限启动的『守护进程』,重启电脑,php-fpm就启动了
Mac下将sublime命令行启动(其他软件类似)
ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime
brew php的安装
ALL_PROXY=socks5://127.0.0.1:1080 brew install autojump
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so
The php.ini file can be found in:
/usr/local/etc/php/5.6/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"
PHP56 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/php56)/bin:$PATH"
✩✩✩✩ FPM ✩✩✩✩
To launch php-fpm on startup:
mkdir -p ~/Library/LaunchAgents
cp /usr/local/opt/php56/homebrew.mxcl.php56.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php56.plist
The control script is located at /usr/local/opt/php56/sbin/php56-fpm
OS X 10.8 and newer come with php-fpm pre-installed, to ensure you are using the brew version you need to make sure /usr/local/sbin is before /usr/sbin in your PATH:
PATH="/usr/local/sbin:$PATH"
You may also need to edit the plist to use the correct "UserName".
Please note that the plist was called 'homebrew-php.josegonzalez.php56.plist' in old versions
of this formula.
To have launchd start josegonzalez/php/php56 at login:
ln -sfv /usr/local/opt/php56/*.plist ~/Library/LaunchAgents
Then to load josegonzalez/php/php56 now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php56.plist
==> Summary
�� /usr/local/Cellar/php56/5.6.16: 330 files, 48.9M, built in 5 minutes 35 seconds
mac上编译php7问题:
MAC OS 上编译 PHP 时,在 configure 配置阶段出现如题所示错误。找不到 libintl.h 头文件。
解决方法如下:
1. 安装 gettext:
2. 编辑 configure 文件:
将:
更改为:
3. 重新运行 ./configure 即可
安装mac系统出现:
这个“安装 OS X Mavericks.app”应用程序副本不能验证。它在下载过程中可能已遭破坏或篡..
执行
date 062614102014.30
最近使用Jenkins做iOS项目的CI时,遇到了下面的问题:
You have not agreed to the Xcode license agreements, please run xcodebuild standalone from within a Terminal window to review and agree to the Xcode license agreements.
但是按照提示在Terminal中去运行xcodebuild又没有任何问题,用xcodebuild –help发现有一个option是-license。
输入xcodebuild -license会展示一大段的license,空格键是查看更多,耐心看完之后,根据最后的提示,输入agree。注意保证agree前面没有空格,有可能空格键按得太快会打几个空格出来的。
mac查看端口占用:
sudo lsof -i -P | grep -i "listen"
Mac端口:
mac os x不允许root以外的用户使用1024以下的端口
Mac开机自动启动php-fpm
使用brew安装的php-fpm自动启动,我先是把homebrew.mxcl.php55.plist放在/Users/tangcheng/Library/LaunchAgents,但是怎么都加载不进去,查看这个plist有一个选项
<key>UserName</key>
<string>root</string>
我上网查,说这个选项必须是在以root启动的时候才有用,我就把homebrew.mxcl.php55.plist放到了/Library/LaunchAgents里面,还tm不行,最后放到了/Library/LaunchDaemons里面,这个文件夹里面的所有都是以root权限启动的『守护进程』,重启电脑,php-fpm就启动了
Mac下将sublime命令行启动(其他软件类似)
ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime
brew php的安装
ALL_PROXY=socks5://127.0.0.1:1080 brew install autojump
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so
The php.ini file can be found in:
/usr/local/etc/php/5.6/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"
PHP56 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/php56)/bin:$PATH"
✩✩✩✩ FPM ✩✩✩✩
To launch php-fpm on startup:
mkdir -p ~/Library/LaunchAgents
cp /usr/local/opt/php56/homebrew.mxcl.php56.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php56.plist
The control script is located at /usr/local/opt/php56/sbin/php56-fpm
OS X 10.8 and newer come with php-fpm pre-installed, to ensure you are using the brew version you need to make sure /usr/local/sbin is before /usr/sbin in your PATH:
PATH="/usr/local/sbin:$PATH"
You may also need to edit the plist to use the correct "UserName".
Please note that the plist was called 'homebrew-php.josegonzalez.php56.plist' in old versions
of this formula.
To have launchd start josegonzalez/php/php56 at login:
ln -sfv /usr/local/opt/php56/*.plist ~/Library/LaunchAgents
Then to load josegonzalez/php/php56 now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php56.plist
==> Summary
�� /usr/local/Cellar/php56/5.6.16: 330 files, 48.9M, built in 5 minutes 35 seconds
mac上编译php7问题:
MAC OS 上编译 PHP 时,在 configure 配置阶段出现如题所示错误。找不到 libintl.h 头文件。
解决方法如下:
1. 安装 gettext:
1 | brew install gettext |
将:
1 | for i in $PHP_GETTEXT /usr/local /usr; do |
1 | for i in $PHP_GETTEXT /usr/local /usr /usr/local/opt/gettext ;do |
安装mac系统出现:
这个“安装 OS X Mavericks.app”应用程序副本不能验证。它在下载过程中可能已遭破坏或篡..
执行
date 062614102014.30
相关文章推荐
- nginx代理指定目录
- 访问Nginx发生SSL connection error的一种情况
- Nginx+Naxsi部署专业级Web应用防火墙
- CentOS 6.2实战部署Nginx+MySQL+PHP
- 什么是Mac OS X?跟Linux有什么区别
- mac下安装mysql(转载)
- mysql 修改编码 Linux/Mac/Unix/通用(杜绝修改后无法启动的情况!)
- nginx中http核心模块的配置指令2
- nginx中http核心模块的配置指令3
- nginx中http核心模块的配置指令4
- nginx中http的fastcgi模块的配置指令1
- Nginx 学习笔记(一)
- Linux vs Mac:Linux 比 Mac 好的 7 个原因
- 网站502与504错误分析
- 用zabbix监控nginx_status状态
- 艰难完成 nginx + puma 部署 rails 4的详细记录
- 苹果mac OS X上安装metasploit
- 把Lua编译进nginx步骤方法
- Validation of viewstate MAC failed.的解决方法