HOME-BREW 安装&卸载 GIT

新安装的命令需要带上路径才可以执行,来实现像系统命令一样使用新安装的命令并能查看man,新安装的命令需要带上路径才可以执行,来实现像系统命令一样使用新安装的命令并能查看man,比较惭愧

安装brewinstallgit卸载git:rm-rf/usr/local/gitrm/etc/paths.d/gitrm/etc/manpaths.d/gitsudorm-rf/usr/local/git/usr/bin/git/etc/paths.d/git/etc/manpaths.d/git

linux安装软件到自定义路线时,新装置的下令须要带上路线才足以试行,不能够像系统自带命令那样能够平素动用。

linux安装软件到自定义路线时,新装置的一声令下供给带上路线本事够进行,不能像系统自带命令那样能够向来动用。

近日才刚知道在RedHat
Linux下修改MANPATH不是用的$MANPATH而是修改/etc/man.config,相比较惭愧

以此时候能够透过修改情况变量PATH和MANPATH,来贯彻像系统命令同样选择新安装的一声令下并能查看man。

那个时候能够经过改造境况变量PATH和MANPATH,来落到实处像系统命令同样选取新安装的授命并能查看man。

root@nbu-server etc]# vi /etc/man.config

我们以php-fpm安装为例,安装到位之后,php的设置目录是/usr/local/php

我们以php-fpm安装为例,安装到位之后,php的设置目录是/usr/local/php

#
# Generated automatically from man.conf.in by the
# configure script.
#
# man.conf from man-1.5o1
#
# For more information about this file, see the man pages man(1)
# and man.conf(5).
#
# This file is read by man to configure the default manpath (also
used
# when MANPATH contains an empty substring), to find out where the
cat
# pages corresponding to given man pages should be stored,
# and to map each PATH element to a manpath element.
# It may also record the pathname of the man binary. [This is
unused.]
# The format is:
#
# MANBIN pathname
# MANPATH manpath_element [corresponding_catdir]
# MANPATH_MAP path_element manpath_element
#
# If no catdir is given, it is assumed to be equal to the mandir
# (so that this dir has both man1 etc. and cat1 etc. subdirs).
# This is the traditional Unix setup.
# Certain versions of the FSSTND recommend putting formatted versions
# of /usr/…/man/manx/page.x into /var/catman/…/catx/page.x.
# The keyword FSSTND will cause this behaviour.
# Certain versions of the FHS recommend putting formatted versions of
# /usr/…/share/man/[locale/]manx/page.x into
# /var/cache/man/…/[locale/]catx/page.x.
# The keyword FHS will cause this behaviour (and overrides FSSTND).
# Explicitly given catdirs override.
#
# FSSTND
FHS
#
# This file is also read by man in order to find how to call nroff,
less, etc.,
# and to determine the correspondence between extensions and
decompressors.
#
# MANBIN /usr/local/bin/man
#
# Every automatically generated MANPATH includes these fields
#
MANPATH /usr/share/man
MANPATH /usr/man
MANPATH /usr/local/share/man
MANPATH /usr/local/man
MANPATH /usr/X11R6/man
MANPATH /usr/openv/man

php的可进行文被件安装到
/usr/local/php/bin
php的man文件棉被服装置到
/usr/local/php/php/man/man1/
/usr/local/php/php/man/man8/

php的可进行文被件安装到
/usr/local/php/bin
php的man文件被安装到
/usr/local/php/php/man/man1/
/usr/local/php/php/man/man8/

。。。 

1.万1不改换情况变量就一贯在指令行使用php会提醒

一.假使不修改情形变量就一贯在指令行使用php会提醒

图片 1

-bash: php: command not found

 

执行

 

export PATH=/usr/local/php/bin:$PATH
1
-bash: php: command not found

那般就足以平素动用php命令了

 

  1. 使用man php,会提示

    No manual entry for php

执行

进入man路线随景况变量MANPATH,注意不用现实到man一和man八,参加到它们的父目录就能够了。