全新MAC做为开发机器,环境变量与必装软件

全新MAC做为开发机器,环境变量与必装软件

今天把MAC重新安装了一下系统,之前有一些错误的配置,导致系统出现莫名奇妙的问题。这次重装目的是只安装必要的软件,只设置必需的开发环境变量。以让系统运行最稳定。趁现在还记得,记录一下安装的过程,也提供必装软件的下载地址。

brew环境安装

HomeBrew官网首页提供了安装方法:

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

安装完成后,脚本会提示把运行环境加入环境变量。

这个是安装了openssl后的提示:

openssl is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.

If you need to have openssl first in your PATH run:
  echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

For compilers to find openssl you may need to set:
  export LDFLAGS="-L/usr/local/opt/openssl/lib"
  export CPPFLAGS="-I/usr/local/opt/openssl/include"

Python运行环境安装

安装pyenv

pyenv提供了自动安装脚本

curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash

也可以通过brew进行安装

brew install pyenv

安装完毕需要加入pyenv到环境变量:

# 根据自己的环境配置
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

使用source ~/.bash_profile加载环境变量。

安装需要的python版本:

pyenv install 3.7.4
pyenv install 2.7.16

设置当前系统使用的python版本:

pyenv global 3.7.4
pyenv local 3.7.4

到此python系统运行环境安装完毕。

php mysql nginx集成环境安装

MacOS系统上php集成开发环境的软件并不完善,在以往的使用过程中遇到的问题比较多。还容易和系统自带的环境相冲突。之前的系统安装了mamp xampp等,使用起来非常的难受,而且还需要收费。在试用了多个php集成环境后,一个国产集成环境MxSrvs在使用中给我带来惊喜。看得出来作者是用心做出的软件。话不多说,下面给出项目的下载地址:MxSrvs

image.png

界面清爽,设置内容丰富。强力推荐一下。

注意:

mysqlphp加入到环境变量中,这样在其它系统使用的时候可以直接使用命令调用。

安装mysql系统变量

使用pip install mysqlclient时会出现

“my_config.h” file not found when intall...

此时需要安装mysql-connector-c:

brew install mysql-connector-c

安装JDK

进入oracle官网进行下载:JDK下载地址

总结

本文记录了php开发环境,python Mac开发环境设置。相关开发软件和下载,下一篇文章再记录。全新的macos系统,如果是准备用做长期的软件开发使用,在安装软件的时候,要先考虑好再装。不然对系统造成损坏后,会对开发有很大的影响。


Required for comment verification
2020年6月24日 18:48 - Whitford  
The self education industry is a $355 Million per day industry and is expected to TRIPLE in the next 5 years! And with the right strategy this could be your opportunity to: Get in early before it is oversaturated. Help others go faster while you get paid Fix a broken system Make an impact on the world Get paid for a skill, hobby, passion or expertise you already have (or get paid from someone else’s) And Tony Robbins, Russell Brunson and Dean Graziosi are finally going to show YOU how to take advantage of it… (Now if you don’t already know who these 3 guys are then you’ll want to listen up!! They’ve impacted millions of lives and have generated billions of dollars) Look, if you’ve ever thought about (or even if you never thought about) getting paid for something you know (like a passion or a skill)... or even getting paid from what others know, then you have to attend. This is one of the fastest growing industries online and in all areas of the world. And for the first time ever they’re doing a webclass training on how to extract your wisdom (or somebody else’s) and get other people to pay you for it! You can save your spot here (and when you do register, you’re immediately going to get a brand new, never before seen training from Tony and Dean. No one else will ever get a chance to see this rare training except for us). kbbmint.com After hearing what they’re teaching, I truly believe this is the #1 way to make a massive income, make a massive impact on the world and leave a legacy! And here’s just a fraction of what you’ll learn this week: The mostly hidden $129 Billion dollar market and how you can make a massive impact and leave a legacy by profiting from it. The KBB Triangle: The 3 ways to profit (whether you’re an expert with a thriving business, just getting started, or even if you’re at complete rock bottom) The framework to profit from what you (or someone else) already knows - or by creating community and bringing people together. Plus you’ll even be able to ask them questions when they do Q&A at the end of the training. (Chat is limited so show up early). There’s no other time where you’re going to have this opportunity. So BE THERE! Because if you’re not going to make a shift in your life now, then when? And if not with these guys, then let me ask with who? This is your rare chance to learn from 3 people who started from nothing and went on to generate billions of dollars and build massive companies. Spots are filling up faster than they ever have, so you need to hurry and go here to save your spot https://kbbmint.com Register now and I’ll see you there this week - Plus they did a few brand new “pre-event” trainings that only those who register get access to. Talk soon
回复
2020年4月17日 21:59 - Leoaidese  
Comment Rester Eriger Longer [url=https://abuycialisb.com/#]cialis pills[/url] Achat Levitra France <a href=https://abuycialisb.com/#>Cialis</a> Viagra Price Online
回复
2020年4月13日 07:35 - Leoaidese  
buy accutane online cheap [url=https://apcialisle.com/#]cialis buy[/url] Viagra Chi Non Lo Puo' Usare <a href=https://apcialisle.com/#>buy cialis online united states</a> Topiramate
回复
2020年3月28日 13:28 - KeytExhigma  
Legally isotretinoin from canada cod accepted pharmacy [url=http://cialibuy.com/#]buy cialis online from canada[/url] Viagra Contre Indications <a href=http://cialibuy.com/#>Cialis</a> Propecia Side Effects In Men
回复