腾讯云centos7.4 全新环境部署流程

yum update
yum install git vim openssl build-essential wget curl
访问 https://github.com/creationix/nvm 找到第一个命令行
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
此时nvm安装已完成,重新登陆,用nvm ls 确认安装成功
nvm install v10.11.0 #安装nodejs
nvm use v10.11.0
访问https://www.yarnpkg.com/zh-Hans/docs/install#centos-stable 找到第一个命令行
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
yum install yarn
访问http://npm.taobao.org/ 找到命令行
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install pm2 -g

cd /home/
cd http_923/
cd 913/
pm2 start server.js

安装nginx:http://nginx.org/en/linux_packages.html
sudo service apache2 stop

root@VM_0_9_centos ~]# ls
[root@VM_0_9_centos ~]# cd /etc/yum.repos.d/
[root@VM_0_9_centos yum.repos.d]# ls
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-fasttrack.repo  CentOS-Sources.repo  yarn.repo
CentOS-CR.repo    CentOS-Epel.repo       CentOS-Media.repo      CentOS-Vault.repo
[root@VM_0_9_centos yum.repos.d]# vim nginx.repo
[root@VM_0_9_centos yum.repos.d]# cat nginx.repo 
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1
[root@VM_0_9_centos yum.repos.d]# yum install nginx
image.png

103 2018-12-10 17:21:24 cd /etc/nginx/
104 2018-12-10 17:21:24 ls
105 2018-12-10 17:21:50 cd conf.d
106 2018-12-10 17:21:51 ls
107 2018-12-10 17:22:15 cp default.conf ./defaultconf.BAK
108 2018-12-10 17:22:17 ls
109 2018-12-10 17:22:28 vim default.conf
110 2018-12-10 17:23:37 cp default.conf 913.conf
111 2018-12-10 17:23:41 vim 913.conf
修改为如下:

server {
    listen       80;
    server_name  llhacker.com;

    #charset koi8-r;
    #access_log  /var/log/nginx/host.access.log  main;

    location / {
    proxy_pass http://localhost:8080;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       # root   /usr/share/nginx/html;
       # index  index.html index.htm;
    }

112 2018-12-10 17:26:15 nginx -s reload
反代理成功!
服务器部署完毕。

1    nvm install v10.11.0
    2  nvm use v10.11.0
    3  nvm alias default v10.11.0
    4  node -v
    5  brew install yarn
    6  curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
    7  sudo yum install yarn
    8  yarn --version
    9  npm install vue-cli pm2
   10  ls
   11  pm2
   12  rm -r node_modules/ package-lock.json 
   13  rm -rf node_modules/ package-lock.json 
   14  ls
   15  npm install vue-cli pm2 -g
   16  ls
   17  pm2
   18  cd /etc/yum.repos.d/
   19  ls
   20  vim nginx.repo
   21  yum install nginx
   22  ls
   23  cd /etc/nginx
   24  ls
   25  cp -r conf.d conf.d.BAK
   26  cp -r nginx.conf  nginx.conf.BAK
   27  cd conf.d
   28  ls
   29  cat default.conf 
   30  ls
   31  cp default.conf /opt/backup/nginx/default.conf
   32  cd ..
   33  ls
   34  cp nginx.conf /opt/backup/nginx/nginx.conf
   35  ls
   36  cd conf.d
   37  ls
   38  vim default.conf 
   39  cp default.conf default
   40  vim default.conf
   41  ls
   42  rm default.conf 
   43  ls
   44  cd ..
   45  ls
   46  mkdir cert
   47  ls
   48  cd conf.d
   49  ls
   50  vim main.conf 
   51  nginx -s reload
   52  nginx
   53  nginx -t
   54  ls
   55  vim main.conf 
   56  cd ..
   57  ls
   58  vim nginx.conf
   59  ls
   60  nginx -t
   61  ngins -s quit
   62  nginx -s reload
   63  ls
   64  cd cert
   65  ls
   66  cat 1537463077946.
   67  cat 1537463077946.key 
   68  ls
   69  cd ..
   70  ls
   71  cd conf.d
   72  ls
   73  vim main.conf 
   74  cd ..
   75  vim nginx.conf
   76  ls
   77  vim nginx.conf
   78  nginx -s quit
   79  nginx
   80  nginx -s reload
   81  ls
   82  cd conf.d
   83  ls
   84  vim main.conf 
   85  ls
   86  cd ..
   87  ls
   88  cd ..
   89  cd /home/http_923/913/
   90  ls
   91  pm2 start server.js 
   92  ls
   93  yum upgrade
   94  curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
   95  cd /opt
   96  ls
   97  mkdir backup
   98  cd backup/
   99  mkdir nginx
  100  ls
  101  cd nginx
  102  cd ..
  103  cd /home/http_923/913/
  104  ls
  105  pm2 start server.js 
  106  nginx
  107  iptable
  108  iptables
  109  iptables -h
  110  iptables -F
  111  iptables -s
  112  iptables -S
  113  cd /etc/nginx
  114  ls
  115  mkdir sites-available
  116  vim nginx.conf
  117  cp conf.d/main.conf sites-available/main.conf
  118  cd conf.d
  119  ls
  120  mv main.conf main.bak
  121  ls
  122  nginx -s quit
  123  nginx 
  124  nginx -s reload
  125  nginx 
  126  nginx
  127  ls
  128  nginx -t
  129  ps 
  130  top
  131  ps -ef|grep nginx
  132  kill -QUIT 23682 23697 23706
  133  ls
  134  ps -ef|grep nginx
  135  cd ..
  136  ls
  137  vim nginx.conf
  138  nginx
  139  ps -ax | grep nginx
  140  ls
  141  iptables -L
  142  iptables -h
  143  iptables -S
  144  iptalbles -L -n -v
  145  iptables -L -n -v
  146  iptables -L -v
  147  iptables -S -n -v
  148  iptables -L -n --line-numbers
  149  more /etc/sysconfig/iptables
  150  netstat -ntlp
  151  ls
  152  cd bx
  153  mkdir bx
  154  cd bx
  155  ls
  156  git clone https://github.com/bitcoin/bitcoin.git
  157  git clone https://gitee.com/herolf4c/bitcoin.git
  158  git tag
  159  ls
  160  cd bitcoin/
  161  git tag
  162  git status
  163  ls
  164  ./autogen.sh
  165  yum install autoconf
  166  ./autogen.sh
  167  ls
  168  sh autogen.sh
  169  ls
  170  more README.md 
  171  cd ..
  172  ls
  173  cd bitcoin/
  174  ls
  175  cd ..
  176  ls

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 217,734评论 6 505
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 92,931评论 3 394
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 164,133评论 0 354
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,532评论 1 293
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,585评论 6 392
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,462评论 1 302
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,262评论 3 418
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,153评论 0 276
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,587评论 1 314
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,792评论 3 336
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,919评论 1 348
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,635评论 5 345
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,237评论 3 329
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,855评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,983评论 1 269
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 48,048评论 3 370
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,864评论 2 354

推荐阅读更多精彩内容