当前位置: 首页 > news >正文

怎么让网站能被百度到网站建设公制度

怎么让网站能被百度到,网站建设公制度,宁波seo推广推荐,台州 做网站分享一个linux下一键安装nodenpm脚本。 使用方式为#xff1a; ./install-node.sh#xff0c;然后输入版本号#xff0c;node.js版本查询 切记不需要加 sudo 执行!!! 默认安装10.15.0。 #! /bin/bash############################################################ # …分享一个linux下一键安装nodenpm脚本。 使用方式为 ./install-node.sh然后输入版本号node.js版本查询 切记不需要加 sudo 执行!!! 默认安装10.15.0。 #! /bin/bash############################################################ # 此脚本为一键安装node-npm脚本 # # 2018-08-24 # # 使用方式为./install-node.sh # ############################################################nodeVersion10.15.0 # 安装的默认版本 VERSIONPATTERN[0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2}echo -n Please input a node version number (Enter 10.15.0): read customVersion # user custom version, eg. 10.15.0if [ ! -z $customVersion ] # 如果输入的版本不为空 thenmacthResult$(echo $customVersion | grep -E -x $VERSIONPATTERN )if [ -z $macthResult ]thenecho Please input a right version number. eg. 8.11.4 or 10.15.0exit 1finodeVersion$customVersion fi # 下载网址 downloadAddresshttps://nodejs.org/download/release/v${nodeVersion}/node-v${nodeVersion}-linux-x64.tar.gz downloadPath/opt/ # 默认安装的路径nodePath/opt/node/ packageNamenode.tar.gz sysPathFileForNode/etc/profile.d/node.sh # system PATH file name for node.currentUser$(whoami)if [[ $currentUser root ]] thenecho please execute script by user! Not root!exit fiisReinstalln # Check if node is already installed. checkNodeIsExist() {# 1.Check whether the node command exists.if [[ $(checkCmd node) y ]]thenecho -n The node command already exists,whether to reinstall [y/n]? :read isReinstallif [[ ${isReinstall} y ]] || [[ {$isReinstall} Y ]] # not reinstallthenechoelseexit 1fifiecho Check local node has been completed. }download() {echo Download version is $nodeVersionechosudo wget -O $packageName $downloadAddressif [ $? -ne 0 ]thenecho The node package download faild !exit 1fisudo mv ./$packageName $downloadPathecho The node v${nodeVersion} has been downloaded. }decompress() {sudo tar -zxf ${downloadPath}${packageName} -C $downloadPath# check isReinstallif [[ $isReinstall y ]] || [[ $isReinstall Y ]]then# update node binary filesudo mv ${downloadPath}node-v${nodeVersion}-linux-x64/bin/node ${downloadPath}node/bin/# update npmsudo rm -rf ${downloadPath}node/lib/node_modules/npmsudo mv ${downloadPath}node-v${nodeVersion}-linux-x64/lib/node_modules/npm/ ${downloadPath}node/lib/node_modules/sudo mv ${downloadPath}node-v${nodeVersion}-linux-x64/bin/npm ${downloadPath}node/bin/# update npx link filesudo mv ${downloadPath}node-v${nodeVersion}-linux-x64/bin/npx ${downloadPath}node/bin/# remove include/node foldersudo rm -rf ${downloadPath}node/include/node# update include/node flder sudo mv ${downloadPath}node-v${nodeVersion}-linux-x64/include/node ${downloadPath}node/include/# remove share foldersudo rm -rf ${downloadPath}node/share# update share foldersudo mv ${downloadPath}node-v${nodeVersion}-linux-x64/share ${downloadPath}node/# update CHANGELOG.md 、LICENSE 、README.md filesudo mv ${downloadPath}node-v${nodeVersion}-linux-x64/CHANGELOG.md ${downloadPath}node/sudo mv ${downloadPath}node-v${nodeVersion}-linux-x64/LICENSE ${downloadPath}node/sudo mv ${downloadPath}node-v${nodeVersion}-linux-x64/README.md ${downloadPath}node/sudo rm -rf ${downloadPath}node-v${nodeVersion}-linux-x64sudo rm -rf ${downloadPath}${packageName}elsesudo mv ${downloadPath}node-v${nodeVersion}-linux-x64 ${downloadPath}nodesudo rm ${downloadPath}${packageName}if [ $? -ne 0 ]thenecho Faild to decompressed!exit 1fifiecho The node package has been decompressed. }changePermission() {sudo chown ${currentUser}:${currentUser} ${nodePath} -Recho The node folder permission has been changed. }# Configure system environment variables and export executable paths of node and NPM. configSysPath() {local tempFilenode.shtouch $tempFileecho export NODE_HOME/opt/node $tempFileecho export PATH$PATH:$NODE_HOME/bin $tempFileecho export NODE_PATH$PATH:$NODE_HOME/lib/node_modules $tempFilesudo mv ./$tempFile $sysPathFileForNode }checkCmd() {local cmd$1which $cmd /dev/null 21if [[ $? 0 ]]thenecho yelseecho nfi }npmCompletion() {local temp/tmp/npm_completionecho if type complete /dev/null; then_npm_completion () {local words cwordif type _get_comp_words_by_ref /dev/null; then_get_comp_words_by_ref -n -n -n : -w words -i cwordelsecword$COMP_CWORDwords(${COMP_WORDS[]})filocal si$IFSIFS$\n COMPREPLY($(COMP_CWORD$cword \COMP_LINE$COMP_LINE \COMP_POINT$COMP_POINT \npm completion -- ${words[]} \2/dev/null)) || return $?IFS$siif type __ltrim_colon_completions /dev/null; then__ltrim_colon_completions ${words[cword]}fi}complete -o default -F _npm_completion npm elif type compdef /dev/null; then_npm_completion() {local si$IFScompadd -- $(COMP_CWORD$((CURRENT-1)) \COMP_LINE$BUFFER \COMP_POINT0 \npm completion -- ${words[]} \2/dev/null)IFS$si}compdef _npm_completion npm elif type compctl /dev/null; then_npm_completion () {local cword line point words siread -Ac wordsread -cn cwordlet cword-1read -l lineread -ln pointsi$IFSIFS$\n reply($(COMP_CWORD$cword \COMP_LINE$line \COMP_POINT$point \npm completion -- ${words[]} \2/dev/null)) || return $?IFS$si}compctl -K _npm_completion npm fi $tempsudo mv $temp /etc/bash_completion.d/ }main() {echo ------------------------START-------------------------# 1. check node installationcheckNodeIsExist# 2. download node packagedownload# 3. decompree node packagedecompress# 4. change node folder permissionchangePermission# 5. install npm completionnpmCompletion# 6. configure node configconfigSysPathsource $sysPathFileForNode # Enable the configuration to take effect immediately.echo ------------------------END-------------------------echo -e Successfully installed node and NPM.\nPlease try : node -v and npm -v }main
http://www.yutouwan.com/news/110194/

相关文章:

  • 做一个网站建设需要多少钱物流网站建设评析
  • 桂林北站附近住宿合肥网站建设团队
  • 西安网站建设推广专家公司名称可以变更吗
  • 网站设计 西安设计方案包括哪几部分
  • 芜湖网站建设电话淘宝seo搜索引擎原理
  • 口碑好的南京网站建设长春市住房和城乡建设厅网站
  • 做网站用什么软件保存网页的步骤
  • 78建筑网官网aso优化前景
  • 做视频网站 带宽计算网站重定向代码
  • 淘宝客网站免费模板下载广州专业网站
  • 杭州视频网站建设中山 网站建设
  • 湘潭网站建设 磐石网络实惠wordpress视频列表
  • 听小说的网站哪个好三合一网站建设哪个好
  • 合肥网站建设哪个好广州最新通知
  • 自己电脑做网站访问速度WordPress当前菜单高亮
  • 顺德建网站中国建设银行山西省分行网站
  • 大型网站为什么难做网站建设经费申请报告
  • 网站空间制作营销系统
  • dx网站是哪家公司做的施工平台
  • 网站免费观影怎么做网站关键词锚文本指向
  • wordpress怎样建立多站点seo云优化如何
  • 邢台wap网站建设价格做seo网站图片怎么优化
  • 家政服务技术支持东莞网站建设创建wordpress用户访问数据库
  • 大冶网站开发在什么平台可以发布信息
  • 网站建设一条龙源码萝岗公司网站建设
  • wordpress 纯代码seo杭州西湖区抖音seo哪里找
  • 怎么推广自己做的网站文佳佳做网站
  • 江西机场建设集团网站婚恋网站建设
  • 群晖 做网站新建一个公司官网
  • 网站开发所需开发环境青岛制作