资源预览内容
第1页 / 共3页
第2页 / 共3页
第3页 / 共3页
亲,该文档总共3页全部预览完了,如果喜欢就下载吧!
资源描述
Unbuntu下下Web前端开发环境的搭建前端开发环境的搭建前端的开发慢慢地向模块化发展,NodeJS、npm、bower、git、webpack、stylus、babel等一些工具的使用和Web前端工程的构建,在Linux环境下的开发比较方便,因此,整理下Ubuntu下Web前端开发环境的搭建0.Ubuntu系统安装系统安装Ubuntu系统的安装,可以使用虚拟机,或者装双系统官网:官网:http:/www.ubuntu.com/1. Vim的安装及使用的安装及使用vim的安装sudo apt-get install vimvim的使用/TODO2.NodeJs(含含npm)的安装的安装官网地址: https:/nodejs.org/en/目前最新的有两个版本:v4.4.7 LTS和v6.3.0Current建议使用 v4.4.7版本 下载地址:https:/nodejs.org/en/download/ 通过包管理工具下载:https:/nodejs.org/en/download/package-manager/Debian and Ubuntu based Linux distributions下载4.x版本的:curl -sL https:/deb.nodesource.com/setup_4.x | sudo -E bash -sudo apt-get updatesudo apt-get install -y nodejs或者,下载NodeJS v6.x版本的:curl -sL https:/deb.nodesource.com/setup_6.x | sudo -E bash - sudo apt-get update sudo apt-get install -y nodejs可选的:安装构建工具:如果你需要编译和安装本地插件,你可能还需要安装编译工具:sudo apt-get install -y build-essential强烈建议:强烈建议:所有的环境搭建都看官网上的安装方法,可以少走弯路常用的常用的npm包安装包安装expressbowerbabel3.git工具工具通过Git工具,可以方便地从GitHub等上面获取到代码,也可以对自己的代码进行管理通过Git工具,可以方便地从GitHub等上面获取到代码,也可以对自己的代码进行管理Git官网官网:https:/git-scm.com/Git下载地址:下载地址:https:/git-scm.com/downloadsGit在在Linux上安装上安装:https:/git-scm.com/download/linuxapt-get install git注:注:安装Git之前,最好先安装openssh-server及openssh-clientapt-get install openssh-serverapt-get install openssh-client安装好后,需要安装git的相关ssh证书:https:/git-scm.com/book/en/v2/Git-on-the-Server-Generating-Your-SSH-Public-KeyGit相关的相关的SSH证书证书1.查看是否已经存在查看是否已经存在 Git的的SSH keys参考地址:checking-for-existing-ssh-keys 输入ls -al /.ssh看是否已经存在SSH keys$ ls -al /.ssh# List the files in your .ssh directory, if the exist默认情况下,Git的公共证书可能是以下名字中的一个:id_dsa.pubid_ecdsa.pubid_ed25519.pubid_rsa.pub如果没有,则创建一个新的SSH Key2.创建新的创建新的SSH Key1. 打开终端键入以下命令,将邮箱替换为你自己的邮箱:ssh-keygen -t rsa -b 4096 -C your_emailexample.com# Creates a new ssh key, using the provided email as a label Generating public/private rsa key pair.当提示Enter a file in which to save the key时,直接按EnterEnter a file in which to save the key (/Users/you/.ssh/id_rsa): Press enter提示Enter passphrase也可以直接按Enter键Enter passphrase (empty for no passphrase): Type a passphraseEnter same passphrase again: Type passphrase again3.添加添加SSH Key到到ssh-agent中中确认ssh-agent 是开启的:# start the ssh-agent in the backgroundeval $(ssh-agent -s)Agent pid 59566添加你的SSH key到ssh-agent. 如果你使用已经存在的SSH Key,而不是用新生成的SSH Key,那么你需要将 以下命令中的 id_rsa替换成已经存在的SSH Key的名称$ ssh-add /.ssh/id_rsa添加添加SSH Key 到你的到你的GitHub帐号帐号1. Copy the SSH key to your clipboard.If your SSH key file has a different name than the example code, modify the filename to match your current setup. When copying your key, dontadd any newlines or whitespace.$ clip Lantern安装,也可以使用其他的)安装,也可以使用其他的)3.Zeal安装(离线文档查询工具,类似安装(离线文档查询工具,类似Mac的的Dash)sudo apt-get install zeal
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号