项目上线流程

笔记及总结:

学习视频地址: https://www.imooc.com/learn/1004
1、连接到远程linux服务器

window系统推荐

https://gitforwindows.org/ gitbash 下载地址
使用ssh user@remote_ip连接到远程服务器

mac使用自带终端

ssh -q -l root -p 22 remote_ip


2、web服务器的选择

Nginx:高性能,高并发
Apache:多平台、安全、流行
Tomcat:多用于Java做jsp解析

centos 安装nginx
//centos软件园是没有nginx,存在于epel-release
yum install epel-release
y
yum install nginx
y

3、配置web服务器
//一般配置目录存在
cd /etc/nginx
//找不到 用查找命令找到配置目录
nginx -t
//没有vim命令,则需要下一个vim
yum install vim
vim nginx.conf
//user nginx 改为 user root
//http > server >location
//shift加:进入字符模式
set nu
//编辑 上下左右控制方向 i键
//保存退出 esc shift加:wq

上传网站到服务器
//使用scp命令,如没有则需要安装
yum install openssh-client
//logout 退出服务器
scp -r local_dir user@ip:/remote_dir
//查看nginx 服务
ps -ef | grep nginx
//停止nginx服务
nginx -s stop
//cat 查看
//重启nginx服务
nginx
nginx -s reload

posted @ 2018-11-20 22:21  CoKeny  阅读(659)  评论(0编辑  收藏  举报