0x01. About
Recently accidentally killed, deleted a lot of installation packages, finally can only reinstall Mac, with more than 3 days to repair the development environment.
It's time to get into Docker and do it every time.
0x02. Openresty
The first time to install Openresty Nothing, however, after reloading the Mac, reload Openresty there is a problem. Installation openresty can be directly
git clone https://github.com/openresty
Down, run make, download the dependent packages automatically, or go directly to the http://openresty.org/download package.
1.openssl missing error as follows
./CONFIGURE:ERROR:SSL Modulesrequire theOpenSSL Library. You can either Do notEnable theModulesorInstall theOpenSSL Library into the system,orBuild theOpenSSL Library statically from theSource withNginx by using --with-openssl=<path> option.Error:failed toRun command: sh ./Configure --prefix=/usr/local/ Openresty/nginx \ ...
If the OpenSSL library is missing, tell it the native installation path:
./configure–with-openssl=/usr/local/cellar/openssl/1.0.2c
2.openssl Source Code installation Error
/Applications/Xcode. app/Contents/Developer/usr/bin/make-f objs/Makefilecd/usr/local/Cellar/openssl/1.0.2C &&if[-FMakefile]; Then/Applications/Xcode. app/Contents/Developer/usr/bin/make clean; Fi &&./config--prefix=/usr/local/cellar/openssl/1.0.2c/. OpenSSL no-shared No-threads &&/applications/Xcode. app/Contents/Developer/usr/bin/make &&/applications/Xcode. app/Contents/Developer/usr/bin/make InstallLibdir=lib/bin/SH:./Config: NoSuch fileordirectorymake[2]:*** [/usr/local/cellar/openssl/1.0.2c/. openssl/include/openssl/ssl.h]Error 127make[1]:[Build]Error 2Make :[All]Error 2
On the GITHUB,HTTPS://GITHUB.COM/TORCH/IMAGE/ISSUES/16, check, understand, here is the source code, not the installation path, enough to pit the bar.
Well, to https://www.openssl.org/download the latest, openssl.1.0.2c version, into the bundle directory:
./configure–with-openssl=bundle/openssl.1.0.2c
A warning was reported:
WARNING!Ifto64-bitto ‘./Configure darwin64-x86_64-cc‘*manually*. 5to press Ctrl-Ctoabort.
Looking at the incompatibility between OpenSSL and Darwin, it was later found to be a new version of OpenSSL and Nginx compatibility issues.
3.pcre Dependency Error
notfor1exit status make[2Error1 make[1Error2Error2
Find out, find the problem solution, is the Pcre dependency package is not brought on, that is, the regular matching dependency package problem:
I found issuse on GitHub. Related information: https://github.com/openresty/ngx_openresty/issues/3#issuecomment-120227290
Finally asked on the Issuse Agentzh solution, Agentzh makefile in dealing with the new version of Nginx and OpenSSL dependency on a bit of a problem, and later he updated the GitHub warehouse:
Export Kernel_bits= -./configure-- with-CC-opt='-i/usr/local/cellar/pcre/8.37/include/' \ -- with-ld-opt='-l/usr/local/cellar/pcre/8.37/lib ' \ -- with-openssl=$HOME/work/openssl-1.0. 2D-j9Make-j9sudo make install
It's no problem to run up here (MAC OSX 10.10.4).
Two questions:
1.openssl dependence, to use the source code, to export to tell the system environment variables
2.pcre package to be added manually.
0x03. Hexo
Install Hexo 3.0 All kinds of scold sound, are from 2.8 liters up of people shout incompatibility problem.
Well... Follow the official website of the fight, step by step down it:
NPM Install Hexo-cli-g
Hexo Init
NPM Install
Hexo Server
The error:
$Hexo s{ [Error: cannot find Module './build/release/dtraceproviderbindings '] Code: ' Module_not_found ' }{ [Error: cannot find Module './build/default/dtraceproviderbindings '] Code: ' Module_not_found ' }{ [Error: cannot find Module './build/debug/dtraceproviderbindings '] Code: ' Module_ Not_found ' }ERROR Plugin Load failed:Hexo-server
Later looked at the next, the problem is very simple, a few libraries are not installed, it is estimated that the network problem, did not download the whole directly stopped.
Well... Manually, I think of the method, the previous package moved over, try, is OK, um ... Compared to suppress flexion.
Here do not leave the installation package, more than 50 MB, need to mail me, base64 address as follows mailto:eglhb2nhby5ncmfzc2vzqgdtywlslmnvbq==
0x04. Mysql
ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/tmp/mysql.sock '
MySQL 2002 error estimates a lot of people have come across, that is, the /tmp/mysql.sock
problem of the file does not exist, there is no /tmp/mysql.sock
word, you can not phpmyadmin wait for the client to connect.
A lot of local solutions are simply adding a link, /usr/var/mysql/mysqld.sock
/tmp/mysql.sock
associating it, and finally not.
MySQL default profile for my.cnf,mysql default back to these several locations to find this file,
/etc/my.cnf
,
/etc/mysql/my.cnf
,
/home/username/my.cnf
,
/home/username/.mysql/my.cnf
,
However, in Mac, the default is no configuration file, then you have to create a new.
The following is the complete solution:
- To perform the installation:
$ brew Install MySQL
- Create or modify MY.CNF under/usr/local/etc/, example:
[Client]port = 3306 socket = /tmp/mysql.sock default-character-set = UTF8 [Mysqld]collation-server = utf8_unicode_ci character-set-server = UTF8 init-connect =' SET NAMES UTF8 ' max_allowed_packet = M bind-address = 127.0. 0.1 port = 3306 socket = /tmp/mysql.sock innodb_file_per_table=1 [Mysqld_safe]timezone = ' +0:xx'
- Like after installing MySQL, he will prompt you to init database, and provide the following two sentences to let you execute, most likely you did not execute these two sentences
uNseT T M PDI R mysql_install_db--verbose--user= ' WhoAmI '--basedir= "$ (brew–prefix mysql)" –datadir=/usr/local/var/mysql–tmpdir=/ Tmp
- Then you can point to mysql.server start to launch, for security, you can also perform the Security Setup Wizard, follow the prompts to configure
$ mysql_secure_installation
Here only a few heavy installation pain points, a variety of egg pain, so shuangshuang into Docker, look forward to Docker can have new discoveries.
In the future, to be continued ...
This article from summer grass, reproduced please indicate the source: http://homeway.me/2015/07/10/rebuild-osx-environment/
-by Grass
2015-07-10 21:35:10
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Original Mac reload all kinds of pain points