铭哥和佩佩的博客

铭哥和佩佩的博客分享Python、PHP、JavaScript、HTML5、CSS3等各种知识

搭配lamp环境

1.安装brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
(如果报错则需要扩建git空间)
按照命令行提示进行安装,出现以下错误:

    error: RPC failed; curl 18 transfer closed with outstanding read data remaining
    fatal: The remote end hung up unexpectedly
    fatal: early EOF

    fatal: index-pack failed

2.扩建git空间
git config --global http.postBuffer 524288000

3.安装mysql
brew install mysql
PATH=$PATH:/usr/local/opt/mysql@5.7/bin
https://www.jianshu.com/p/b8039675e195
启动
mysql.server start
https://www.jianshu.com/p/b8039675e195≈
1.将mysql的命令添加到系统中
(1).进入/usr/local/mysql/bin,查看此目录下是否有mysql
(2).执行vim ~/.bash_profile 在该文件中添加mysql/bin的目录 PATH=$PATH:/usr/local/mysql/bin 添加完成后,按esc,然后输入wq保存。
(3).最后在命令行输入source ~/.bash_profile

4.升级php
参考文章(https://blog.csdn.net/u014451657/article/details/70160345)
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6
sudo vim ~/.bash_profile
export PATH=/usr/local/php5-7.0.7-20160526-160257/bin:$PATH;
source ~/.bash_profile
curl -s http://php-osx.liip.ch/install.sh | bash -s 7.0
警告略过 Detected OS X El Capitan 10.11. As this is quite new, there may be issues still. Your mileage may vary.

配置路径
sudo vim ~/.bash_profile
export PATH=/usr/local/php5-7.0.31-20180903-120321/bin:$PATH;
source ~/.bash_profile

none

添加新评论