欧美亚洲中文,在线国自产视频,欧洲一区在线观看视频,亚洲综合中文字幕在线观看

      1. <dfn id="rfwes"></dfn>
          <object id="rfwes"></object>
        1. 站長資訊網
          最全最豐富的資訊網站

          怎么在linux中安裝node

          在linux中安裝node的方法:1、下載“node-v16.18.0-linux-x64.tar.xz”并將其放到linux服務器上;2、在linux上解壓“node-v16.18.0-linux-x64.tar.xz”;3、配置全局路徑PATH在“/etc/profile”文件中;4、刷新“source /etc/profile”;5、在bin文件中進行權限分配即可。

          怎么在linux中安裝node

          本教程操作環(huán)境:linux5.9.8系統(tǒng)、node-v16.18.0版、DELL G3電腦

          怎么在linux中安裝node?

          linux 服務器的node 安裝

          1.先下載 node 當然下載的是符合linux 系統(tǒng)的 我當時下載的是 node-v16.18.0-linux-x64.tar.xz

          2. 把 node-v16.18.0-linux-x64.tar.xz 放到linux 服務器上 我當時是用ftq 放到了 /usr/local文件夾下新建了一個 node 文件

          3.解壓 node-v16.18.0-linux-x64.tar.xz 必須在linux 服務器上解壓。在window 中解壓再放上去使用npm 會報錯 解壓代碼 tar -xJvf node-v16.18.0-linux-x64.tar.xz

          4.配置 全局路勁PATH 在 /etc/profile 文件進行如下設置 注釋:(主要看pathmunge 函數(shù)的使用不會的可以百度查一下linux 函數(shù)使用)把node文件里面bin 路勁添加到全局路徑

          pathmunge /usr/local/linuxNode/node-v16.18.0-linux-x64/bin after  # /etc/profile   # System wide environment and startup programs, for login setup # Functions and aliases go in /etc/bashrc   # It's NOT a good idea to change this file unless you know what you # are doing. It's much better to create a custom.sh shell script in # /etc/profile.d/ to make custom changes to your environment, as this # will prevent the need for merging in future updates. #pathmunge 是Linux 函數(shù)   pathmunge () {     case ":${PATH}:" in         *:"$1":*)             ;;         *)             if [ "$2" = "after" ] ; then                 PATH=$PATH:$1             else                 PATH=$1:$PATH             fi     esac }     if [ -x /usr/bin/id ]; then     if [ -z "$EUID" ]; then         # ksh workaround         EUID=`/usr/bin/id -u`         UID=`/usr/bin/id -ru`     fi     USER="`/usr/bin/id -un`"     LOGNAME=$USER     MAIL="/var/spool/mail/$USER" fi   # Path manipulation  #$EUID 是全局變量 判斷用戶是否具有權限 if [ "$EUID" = "0" ]; then     pathmunge /usr/sbin     pathmunge /usr/local/sbin else     pathmunge /usr/local/sbin after     pathmunge /usr/sbin after fi   HOSTNAME=`/usr/bin/hostname 2>/dev/null` HISTSIZE=1000 if [ "$HISTCONTROL" = "ignorespace" ] ; then     export HISTCONTROL=ignoreboth else     export HISTCONTROL=ignoredups fi   #使用 pathmunge 函數(shù)  pathmunge /usr/local/linuxNode/node-v16.18.0-linux-x64/bin after   export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL   # By default, we want umask to get set. This sets it for login shell # Current threshold for system reserved uid/gids is 200 # You could check uidgid reservation validity in # /usr/share/doc/setup-*/uidgid file if [ $UID -gt 199 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; then     umask 002 else     umask 022 fi   for i in /etc/profile.d/*.sh /etc/profile.d/sh.local ; do     if [ -r "$i" ]; then         if [ "${-#*i}" != "$-" ]; then              . "$i"         else             . "$i" >/dev/null         fi     fi done   unset i unset -f pathmunge
          登錄后復制

          5.進行 刷新 source /etc/profile

          6.進入到我們按鈕的node 文件的bin 文件 進行權限分配。chmod +x node 或者 chmod +x node

          推薦學習:《node.js視頻教程》

          贊(0)
          分享到: 更多 (0)
          網站地圖   滬ICP備18035694號-2    滬公網安備31011702889846號