Open jackieli123723 opened 6 years ago
## docker安装
一、在CentOS7上安装docker篇
1. 查看系统版本:
查看centos 版本
[root@lilidong /]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
[root@lilidong /]#
[root@lilidong /home/worker/docker]# uname -r
4.10.6-1.el7.elrepo.x86_64
2. 安装docker
$ yum install docker
安装过程中报错自行解决
3.检查是否成功
[root@lilidong /home/worker/docker]# docker version
Client:
Version: 1.12.6
API version: 1.24
Package version: docker-1.12.6-71.git3e8e77d.el7.centos.1.x86_64
Go version: go1.8.3
Git commit: 3e8e77d/1.12.6
Built: Tue Jan 30 09:17:00 2018
OS/Arch: linux/amd64
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
[root@lilidong /home/worker/docker]#
4.启动docker service docker start
安装过程
进入home目录
注意所有node安装的模块都要软连接不然会报错
解决办法npm 安装的所有模块都要软连接
n模块切换node
安装git环境
1、下载编译工具
yum -y group install "Development Tools"
2、下载依赖包
yum -y install zlib-devel perl-ExtUtils-MakeMaker asciidoc xmlto openssl-devel
3、下载 git 最新版本的源代码
wget https://www.kernel.org/pub/software/scm/git/git-2.11.0.tar.gz
4、解压
tar -zxvf git-2.11.0.tar.gz
5、进入目录配置
./configure --prefix=/usr/local/git
6、安装
make && make install
7、配置全局路径(可自行添加)
export PATH="/usr/local/git/bin:$PATH"
source /etc/profile
[root@lilidong /home/worker/git-2.11.0]# cd ../ [root@lilidong /home/worker]# ll total 17148 drwxrwxr-x 22 root root 12288 Jan 31 02:48 git-2.11.0 -rw-r--r-- 1 root root 6234127 Nov 29 2016 git-2.11.0.tar.gz drwxrwxr-x 7 500 500 119 Jan 30 10:41 node-v8.0.0-linux-x64 -rw-r--r-- 1 root root 11302412 May 30 2017 node-v8.0.0-linux-x64.tar.xz drwxr-xr-x 2 root root 6 Jan 30 10:42 website [root@lilidong /home/worker]# cd website/ [root@lilidong /home/worker/website]# ll total 0 [root@lilidong /home/worker/website]# git clone https://github.com/jackieli123723/vue-longyuan-store-front.git Cloning into 'vue-longyuan-store-front'... remote: Counting objects: 1822, done. remote: Compressing objects: 100% (47/47), done. remote: Total 1822 (delta 24), reused 47 (delta 11), pack-reused 1747 Receiving objects: 100% (1822/1822), 24.45 MiB | 747.00 KiB/s, done. Resolving deltas: 100% (912/912), done. [root@lilidong /home/worker/website]# [root@lilidong /home/worker/website]# git -v Unknown option: -v usage: git [--version] [--help] [-c name=value] [--exec-path[=]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=] [--work-tree=] [--namespace=]
[]
[root@lilidong /home/worker/website]# git --version
git version 1.8.3.1
[root@lilidong /home/worker/website]#
npm版本锁定删除后安装node不符合锁定版本
安装nginx
安装forever