Mac 部分开发环境配置(移动开发)及一些常用命令
2015-08-18 10:23
621 查看
这是我个人开发需要的,在此记录,以便下次使用。
//等有反应之后再敲入以下命令
gem sources -a http://ruby.taobao.org/
sudo gem install cocoapods
需要到项目里再执行pod install
xcode
xcode 通过appstore安装
cocoapods
gem sources –remove https://rubygems.org///等有反应之后再敲入以下命令
gem sources -a http://ruby.taobao.org/
sudo gem install cocoapods
需要到项目里再执行pod install
svn
svn 命令行输入命令,自动安装安装 brew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"[/code]
网址:http://brew.sh/ionic
brew install wget brew install node sudo npm install -g cordova sudo npm install -g ionic npm install -g ios-sim npm install -g ios-deploysass
gem install sass gem install compassgapdebug
https://www.genuitec.com/products/gapdebug/nginx mysql php
nginx
brew install nginx //访问:http://localhost:8080 nginx目录: /usr/local/etc/nginxmysql
brew install mysql mysql_install_db --verbose --user=root --basedir="$(brew --prefix mysql)"--datadir=/usr/local/var/mysql --tmpdir=/tmp
启动:mysql.server start mysql -uroot -p
设置开机启动:mkdir -p ~/Library/LaunchAgents cp /usr/local/Cellar/mysql/5.6.16/homebrew.mxcl.mysql.plist ~/Library/LaunchAgents/ #5.6.16是数据库版本号 launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
设置密码mysqladmin -u root password "newpass" 或 mysqladmin -u root password oldpass "newpass"php
brew tap homebrew/dupes brew tap josegonzalez/homebrew-php brew install php55 --with-debug --with-fpm --with-gmp --with-homebrew-openssl --with-imap --with-intl --with-libmysql --without-bz2 --without-mysql --without-pcntl --without-pear
注意–with-cgi不能和–with-fpm一起安装
通过命令查看PHP版本,如果不是安装的版本,则要修改path
php -v
修改:vim .profile export PATH=/usr/local/bin:$PATH
php 配置文件位置/usr/local/etc/php/5.5/php.ini php-fpm /usr/local/etc/php/5.5/php-fpm.conf php-fpm //启动php-fpm
修改 ~/.bashrc(没有则创建),最后加入一行
export PATH=”(brew−−prefixphp54)/bin:PATH”
保存后
source ./.profilephpmyadmin
下载后,配置到apache,个性config.default.inc.php禁止空密码
$cfg['Servers'][$i]['AllowNoPassword'] = false; $cfg['Servers'][$i]['nopassword'] = true;设置密码
$cfg['blowfish_secret'] = 'rootsdfef'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = 'root';一些命令
nginx命令
重新加载|重启|停止|退出 nginx nginx -s reload|reopen|stop|quit 配置文件位置: /usr/local/etc/nginx/nginx.conf 默认的文件访问目录(root)是 /usr/local/Cellar/nginx/*.*.*/htmlbrew
brew info nginx 查看信息查看端口是否占用
lsof -i tcp:8080profile说明
/etc/profile 每个用户设置的环境信息,当用户第一次登陆时,该文件被执行,并从/etc/profile.d搜集shell的设置。设定的全局变量可以作用于任何用户。
/etc/bashrc 为每一个运行bash shell的用户执行此文件。当bash shell被打开时,该文件被读取。只能继承/etc/profile中的变量。
~/.bash_profile 每个用户都可使用该文件输入专用于自己使用的shell信息,当用户登陆时,该文件仅仅执行一次。黑夜情况下,它设置一些环境亦是执行用户的.bashrc文件。交互式、login方式进入bash运行
~/.basrc 该文件包含专用于bash shell的bash信息,当登陆时以及每次打开新的shell时,该文件被读取。交互式、non-login方式进入bash运行。
~/.bash_logout 每次退出系统(退出bash shell)时,执行该文件。
设置生效:alias php=/var/php source /etc/profile显示系统隐藏文件
显示Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles YES 隐藏Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles NO
相关文章推荐
- 串口之WaitForSingleObjec、WaitForMultipleObjects函数详解
- AndroidManifest.xml 文件详解
- iOS开发常用快捷键
- 一个数只有三个约数的特征
- ZOJ 1610 Count the Colors
- 串口之WaitForSingleObjec、WaitForMultipleObjects函数详解
- Webfrom 生成流水号 组合查询 Repeater中单选与复选控件的使用 JS实战应用
- 社保猛开A股账户透露重大信号
- Team Queue
- 关于Android 数据库使用的几点心得
- zoj 2859 二维线段树 插点求线
- 《学习记录》Toast带图片的显示
- 【java.math.BigInteger】【转】常见问题
- 和华为交互设计师一起聊聊“如何让别人认可你的设计”
- Redis配置文件详解
- poj 3080 Blue Jeans (KMP)
- TextView SpannableString类属性详细解释
- 使用padding和float处理带有间隙的多块布局
- 金典 SQL笔记(8)
- libcurl 多线程使用注意事项(补充)——HTTPS,openssl多线程使用加锁