Node.js
環境搭建,不一樣的操做系統能夠選擇不一樣的安裝方式必須安裝的軟件vue
sudo apt-get install git vim openssl build-essential libssh-dev wget curl
yum
源與更新系統/etc/yum.repos.d/CentOS-Base.repo
cd /etc/yum.repos.d/
163
的yum
源配置文件wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
yum makecache
生成緩存yum makecache
yum -y update
nvm
命令curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
Node.js
版本nvm install <Node.js版本號>
,例如nvm install 9.3.0
,就是安裝Node.js
9.3.0版本node
命令沒有效果,須要先輸入該命令nvm use node
cnpm
淘寶鏡像npm install -g cnpm --registry=https://registry.npm.taobao.org
npm
依賴包cnpm install http-server express express-generator webpack webpack-dev-server gulp nodemon pm2 vue-cli -g
nvm alias default <版本號>
nvm ls-remote
查看有哪些版本能夠安裝wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install sublime-text
sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg
sudo yum-config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
sudo yum install sublime-text
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo apt-get install -y mongodb-org=3.6.1 mongodb-org-server=3.6.1 mongodb-org-shell=3.6.1 mongodb-org-mongos=3.6.1 mongodb-org-tools=3.6.1
sudo service mongod start
/etc/yum.repos.d/mongodb-org-3.4.repo
文件下輸入一下內容[mongodb-org-3.4] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
mongodb
命令sudo yum install -y mongodb-org
mongodb
服務sudo service mongod start
mongodb
服務sudo service mongod stop
mongodb
服務sudo service mongod restart
F:/software/MongoDB/
data
目錄,在data
目錄下建立db
和log
兩個目錄F:/software/MongoDB/bin
目錄,F:\software\MongoDB\bin>mongod --dbpath F:\software\MongoDB\data\db
log
目錄,建立mongodb.log
文件F:/software/MongoDB/
目錄,建立mongodb.config
配置文件dbpath=F:/software/MongoDB/data/db logpath=F:/software/MongoDB/data/log/mongodb.log
mongod --config F:/software/MongoDB/mongodb.config --install --serviceName "MongoDB"
192.168.0.20
wget http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
cd redis-stable
make
make install
mkdir -p /etc/redis
,cp redis.conf /etc/redis
修改配置文件vi /etc/redis/redis.conf
node
daemonize no
該爲daemonize yes
bind 127.0.0.1
bind 192.168.0.20
/usr/local/bin/redis-server /etc/redis/redis.conf
ps -ef | grep redis
yarn config set registry https://registry.npm/taobao.org
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
sudo wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo
curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash -
sudo yum install yarn
git
軟件yum install git-core
ssh-keygen -t rsa -C "yourmail@mail.com"
git config --global user.name "Dawnight"
git config --global user.email "yourmail@mail.com"
git add .
git status
git commit -m "some messages"
git remote rm origin
git remote add origin <remoteRepositoryAddress>
git push origin master
git pull origin master
,同步master
代碼git branch -a
git branch -r
git branch <branchName>
git checkout <branchName>
push
到遠程分支git push origin <localBranchName>:<remoteBranchName>
,只寫這一條命令,表示建立一個遠程分支git
的提交記錄導出爲文件git --no-pager log > log.txt