ubuntu将mysql、nginx添加到环境变量中

时间:2022-12-12 09:27:35
vim /etc/profile

添加

export PATH="$PATH:/usr/local/mysql/bin"
export PATH="$PATH:/usr/local/nginx/sbin"

读取配置

source /etc/profile
# mysql --version
mysql  Ver 14.14 Distrib 5.5.56, for linux-glibc2.5 (x86_64) using readline 5.1
# nginx -v
nginx version: nginx/1.8.1