mac 更改默认php

news/2024/7/7 13:25:23

1.新建一个.bash_profile文件并编辑

vim ~/.bash_profile

2.然后在里面输入自己想要的php版本

export PATH=/Applications/MAMP/bin/php/php7.2.7/bin:$PATH
#/Applications/MAMP/bin/php/php7.2.7/bin是我的php版本路径

3.保存重载环境变量

source ~/.bash_profile

如果你重启后生效了那就不用往下看了。

4.打开vim ~/.zshrc  将你要配置到环境变量配置到该文件中即可

5.打开vim ~/.zshrc  添加source ~/.bash_profile ,这样~/.bash_profile配置的环境变量同样有效


http://www.niftyadmin.cn/n/2124324.html

相关文章

postgresql 函数的三个状态

postgresql 的函数有三个状态:IMMUTABLE、STABLE、VOLATILE。这个是与其他数据库有明显概念差别的。 简单描述如下: IMMUTABLE(非常稳定) 表示该函数不能修改数据库并且对于给定的参数值总是会返回相同的值。也就是说,它不会做数据库查找或…

(MAC)Docker容器Removal In Progress删除方案

一 :进入Docker桌面 screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty 二 :找文件(根据自己找文件) cd /var/lib/docker/overlay2/e000b8a86824f48cb824ab643ce7d035e7ec4f3114bad897a2235cf922bba972/diff# 三:安装chatt…

pgpool 之一 1 pgpool + 2 postgresql stream replication 模式

os: centos7.4 db: postgresql 9.6.8 pgpool: pgpool-II-3.7.3 pgpool 简介 准确的名字是Pgpool-II,这里简称为pgpool。pgpool 是介于postgresql 服务和 postgresql 客户端的中间件。它提供如下功能: 1、连接池 2、复制 3、负载均衡 4、限制超过限度的…

centos7 实现elasticsearch-head 开机自启

一 在/etc/init.d 目录下,创建脚本文件 eshead # cd /etc/init.d/ # vim eshead 二 将以下内容写入文件中(其中nodejs安装路径、elasticsearch-head安装路径根据实际情况进行修改) #!/bin/sh #chkconfig: 2345 80 05 #description el…

Unix实用和常用的命令集合

bash: 是GNU Bourne-Again的外壳,是一个增强的和sh兼容的外壳,bash的提示符是$ cat: 显示文本的内容 cc:用于许多系统的C的编译器 cd:进入某个目录 chgrp:改变文件的组所有权 chmod&#x…

pgpool 之二 stream replication 模式 + slave down up

os: centos7.4 postgresql:9.6.8 pgpool:3.7.3 采用 streaming replication mode 模式,这是比较通用的方案。 The streaming replication mode can be used with PostgreSQL servers operating streaming replication. In this mode, PostgreSQL is responsible fo…

Linux上基于网页管理mysql安装过程中的错误点

在安装的过程中,Documentation.html,容易写成Documentstation.html导致访问失败,在访问index.php是不能访问,出现乱码,在.../conf/http.conf中添加 AddType application/x-httpd-php .php .phtml AddType application/…

pgpool 之三 pgpool的几种模式

pgpool:3.7.3 文档 http://www.pgpool.net/docs/latest/en/html/configuring-pgpool.html 4.3.2. Running mode of Pgpool-II There are four different running modes in Pgpool-II: streaming replication mode, logical replication mode, master slave mode (slony mode…