Centos安装前端开发常用软件
1.下载指定的版本(根据程序要求下载对应的版本)
wget --no-check-certificate https://npm.taobao.org/mirrors/node/v10.16.3/node-v10.16.3-linux-x64.tar.gz
2.解压并创建系统链接
tar xf node-v10.16.3-linux-x64.tar.gz -C /usr/local/ #解压到指定目录 cd /usr/local/node-v10.16.3-linux-x64/bin/ ./node -v #检查 rm -f /usr/local/bin/node #删除旧node,按需 rm -f /usr/local/bin/npm #删旧npm,按需 ln -sv /usr/local/node-v10.16.3-linux-x64/bin/node /usr/local/bin/node #创建命令软连接到系统PATH路径中,便于调用 ln -sv /usr/local/node-v10.16.3-linux-x64/bin/npm /usr/local/bin/npm
3.安装cnpm(使用淘宝镜像源)
npm install -g cnpm --registry=https://registry.npmmirror.com #安装
ln -sv /usr/local/node-v10.16.3-linux-x64/bin/cnpm /usr/local/bin/cnpm #创建命令软连接到系统PATH路径中,便于调用
4.安装tarojs(小程序开发)
cnpm install -g @tarojs/cli@1.3.25
ln -sv /usr/local/node-v10.16.3-linux-x64/lib/node_modules/@tarojs/cli/bin/taro /usr/local/bin/taro
5.安装n(用于管理有多个node版本)
cnpm install -g n
6.imagemagick安装
yum install -y libjpeg-turbo-devel libtool-ltdl-devel libtool-ltdl libtool-ltdl-devel gcc git config --global http.sslVerify false git clone https://github.com/ImageMagick/ImageMagick.git ImageMagick-7.1.0 cd ImageMagick-7.1.0/ ldconfig /usr/local/lib ./configure --with-modules make install make check magick logo: logo.gif identify logo.gif display logo.gif 添加环境变量: export MAGICK_HOME="/usr/local/ImageMagick/" export PATH="$MAGICK_HOME/bin:$PATH LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$MAGICK_HOME/lib export LD_LIBRARY_PATH
7.graphicsmagick安装
wget http://ftp.icm.edu.pl/pub/unix/graphics/GraphicsMagick/1.3/GraphicsMagick-1.3.36.tar.gz tar xf GraphicsMagick-1.3.36.tar.gz cd GraphicsMagick-1.3.36 ./configure --prefix=/usr/local/graphicsmagick --enable-shared --enable-lzw --without-perl --with-modules make && make install 添加环境变量: export PATH="$MAGICK_HOME/bin:/usr/local/graphicsmagick/bin/:$PATH
"一劳永逸" 的话,有是有的,而 "一劳永逸" 的事却极少