homebrew

mac下安装启动Mongodb

别说谁变了你拦得住时间么 提交于 2020-03-15 16:05:28
本人最近才上手mac,在使用mac上面有很多不熟悉的地方,慢慢摸索,记录下来,以供后续翻阅与参考: 在Mac下安装MongoDB方式 第一种、用浏览器或者第三方工具下载 当前版本的下载地址: http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.4.6.tgz 第二种、通过homebrew安装mongodb,terminal下运行以下指令就可以了 这里,我只讲通过homebrew来安装。 在Mac下安装MongoDB,通过homebrew 1. 通过homebrew安装mongodb $ brew update $ brew install mongodb 如果没有homebrew还是先装一个吧,程序员必备。 2. mongodb 数据默认存在/data/db下,所以需要创建这个文件夹,以及设置权限 进行了第一步操作,这里我们安装完成就可以执行 sudo mongod 执行sudo mongod命令后返回了一堆错误信息,如下: 这么一堆错误信息,重点是这几句 ERROR: dbpath (/data/db) does not exist. Create this directory or give existing directory in –dbpath. See http://dochub.mongodb.org/core

MacOS中Nginx的安装「借助Homebrew」

筅森魡賤 提交于 2020-03-15 13:56:15
本文Nginx的安装借助于Homebrew; 1、Homebrew 2、Nginx安装 1、Homebrew 如果你已经安装过 Homebrew 了,那么你可以跳过这一步,直接进行 Nginx 安装步骤; Homebrew 是一款 MacOS 平台下的软件包管理工具,拥有安装、卸载、更新、查看、搜索等很多实用的功能,强烈推荐安装。 请复制如下指令到 命令行 粘贴执行: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2、Nginx安装 命令行执行: brew install nginx 安装后的默认启动路径为: /usr/local/var/www Nginx配置文件目录: /usr/local/etc/nginx/nginx.conf Nginx启动命令: ngxin Nginx重启命令: nginx -s reload 关闭/停止Nginx: 1、首先查询Nginx对应端口号 : ps -ef | grep nginx 501 9110 1 0 12:38下午 ?? 0:00.00 nginx: master process nginx501 9111 9110 0 12:38下午 ?? 0:00.00 nginx: worker

mac brew mirror

浪尽此生 提交于 2020-03-14 15:13:40
cd "$(brew --repo)" git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile source ~/.bash_profile 来源: oschina 链接: https://my.oschina.net/swingcoder/blog/3194783

软件源使用国内镜像

泪湿孤枕 提交于 2020-03-14 09:44:28
npm npm config set registry https://registry.npm.taobao.org yarn yarn config set registry https://registry.npm.taobao.org pip pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple brew git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git brew update AUR yay --aururl "https

How can I install openMP on my new MacBook Pro (with Mac OS Catalina)?

跟風遠走 提交于 2020-03-14 05:21:42
问题 I installed Xcode (and also the command line tools) but terminal says (when I'm compiling): gcc -o task -fopenmp task.c clang: error: unsupported option '-fopenmp' I tried to install openmp via brew but people say that it's not available anymore on homebrew, they suggest to try brew instal llvm But I get the same error. I tried also in the boneyard brew install homebrew/boneyard/clang-omp but the repository doesn't exist anymore. Could you help me? I just need to learn openMP, I don't think

brew在macOS上安装mysql

馋奶兔 提交于 2020-03-13 13:18:53
我正在尝试通过 brew install mysql 5.1.52 使用Homebrew在Mac OS 10.6上设置MySQL。 一切顺利,并且 mysql_install_db 也很成功。 但是,当我尝试使用以下方法连接到服务器时: /usr/local/Cellar/mysql/5.1.52/bin/mysqladmin -u root password 'mypass' 我得到: /usr/local/Cellar/mysql/5.1.52/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)' 我也尝试 mysqladmin or mysql using -u root -proot 访问 mysqladmin or mysql using -u root -proot , 但无论有没有密码,它都无法使用。 这是全新计算机上的全新安装,据我所知,必须使用root用户密码才能访问新安装。 我也尝试过: /usr/local/Cellar/mysql/5.1.52/bin/mysql_secure_installation 但我也得到 ERROR 1045 (28000):

Mac 安装 Python3

孤者浪人 提交于 2020-03-11 20:50:36
安装 Xcode command line tool : $sudo xcode-select --install 安装HomeBrew 包管理工具 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 安装python3 $ brew install python3 因为系统自带python2,所以直接输入python会显示python2; 如果需要打开python3,需要输入命令python3。 效果如下: 来源: CSDN 作者: zbchenchanghao 链接: https://blog.csdn.net/zbchenchanghao/article/details/104802852

安装brew -- Homebrew

落爺英雄遲暮 提交于 2020-03-10 09:50:03
brew 全称Homebrew,是Mac上的软件包管理工具。 因git-brew地址网络经常不好问题,有时会出现安装不上的情况。 安装步骤如下 输入 : ruby -version 1. 安装命令 Ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" 假如安装不了或者已经安装了,可以 输入如下命令 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 如果成功,则会有如下, 命令行输出 : 来源: https://www.cnblogs.com/antime/p/12453862.html

在哪里可以使用fastcgi和django找到Nginx的错误日志

本秂侑毒 提交于 2020-03-07 17:40:57
我在使用fastcgi + nginx的django。 我想知道这种情况下的日志(错误)存储在哪里 #1楼 错误存储在nginx日志文件中。 您可以在Nginx配置文件的根目录中指定它。 error_log /var/log/nginx/nginx_error.log warn; 在具有 Homebrew的 Mac Os X 上,默认情况下在以下位置找到日志文件: /usr/local/var/log/nginx #2楼 我正在寻找其他解决方案。 默认情况下,在我的系统(x86 Arch)上进行任何配置之前,都会在以下位置找到错误日志: /var/log/nginx/error.log #3楼 我的ngninx日志位于: /usr/local/var/log/nginx/* 您还可以检查 nginx.conf 来查看是否有任何指令转储到自定义日志。 运行 nginx -t 找到您的 nginx.conf 。 # in ngingx.conf error_log /usr/local/var/log/nginx/error.log; error_log /usr/local/var/log/nginx/error.log notice; error_log /usr/local/var/log/nginx/error.log info; Nginx通常在 /usr/local 或