阿里云Ubuntu 14.04 + Nginx + .net core + MySql
前段时间帮朋友写了一个网站,现在做一个记录。
.Net Core 安装:
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-get update
sudo apt-get install dotnet-sdk-2.0.
参考自:https://www.microsoft.com/net/core#linuxubuntu
Nginx安装:
sudo apt-get install update
sudo apt-get install nginx
参考字:http://blog.csdn.net/woshihaiyong168/article/details/53927308
MySql安装:
sudo apt-get install mysql-server
其中输入两次来设置Root密码。
然后需要配置远程连接,请参考:http://www.cnblogs.com/BTMaster/p/4035402.html
Supervisor安装:
sudo apt-get install supervisor
参考自:http://blog.csdn.net/github_37730997/article/details/60582525
以上,安装内容就完成了。
配置:
Supervisor配置:
参考自:http://blog.csdn.net/shengzhu1/article/details/54348371
[program:Project_Name]
command=/usr/bin/dotnet ???.dll
directory=Project_Publish_location
autostart=true
autorestart=true
stderr_logfile=/var/log/Error.err.log
stdout_logfile=/var/log/Out.out.log
user=root
stopsignal=INT
.net core 编译:
dotnet publish
Supervisor 启动和停止:
sudo service supervisor start
sudo service supervisor stop
Nginx配置:
location / {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
阿里云Ubuntu 14.04 + Nginx + .net core + MySql的更多相关文章
- 阿里云Ubuntu 14.04 + Nginx + let's encrypt 搭建https访问
参考页面: https://certbot.eff.org/#ubuntutrusty-nginx http://bbs.qcloud.com/thread-12059-1-1.html http:/ ...
- 在阿里云Ubuntu 14.04 Linux服务器上安装docker
参考 How To Install and Use Docker: Getting Started 这篇最靠谱的文档在阿里云 Ubuntu 14.04 服务器上成功安装 docker . ---- ...
- 阿里云 ubuntu 14.04 模板上安装 docker
ubuntu 14.04 的内核是 3.13 ,所以内核不用升级. 安装过程例如以下: # apt-get update # apt-get install apt-transport-https # ...
- 阿里云 Ubuntu 14.04 安装mysql 5.6
1. 升级apt-get apt-get update 如果出现 : 说明没有你不是root用户,则需要用sudo命令 sudo apt-get update 下面出现权限问题都可以参照这个方法. 2 ...
- 在阿里云Ubuntu 14.04.5 LTS下安装nethogs0.8.5
由于默认安装的nethogs不能使用,提示:Creating socket failed while establishing local IP - are you root? 搜索资料后检查当前版本 ...
- Laravel项目部署上线(阿里云 Ubuntu 16.04)
第一次尝试把本地的项目上线, 购买了某云的轻量应用服务器, 镜像为Ubuntu 16.04 直接运行 apt-get install nginx 出错 根据提示运行 apt-get upda ...
- 阿里云ubuntu 16.04搭建odoo11服务器
ubuntu 16.04 具体如何搭建odoo11网站的具体步骤可以参考这一篇文章 按上面的文章配置环境后,自己网站的启动具体步骤如下: 1.登录阿里云 [远程连接],进入命令行界面1 2.cd到目录 ...
- 阿里云ubuntu 16.04 搭建pptpd 第二版
前言:1.我常用的服务器在国内,但我又有某方面的需求,所以想要搭建一个pptpd的服务器 2.但我又不常用,所以感觉阿里云包年包月的不划算,所以准备采用阿里云按量付费的实例来搭建pptpd,并形 ...
- 阿里云Ubuntu 18.04安装图形界面
#!/bin/bash #更新软件库 apt-get update #升级软件 apt-get upgrade #安装ubuntu桌面系统 apt-get install ubuntu-desktop
随机推荐
- 通过iframe标签绕过csp
iframe.php代码如下: allow-popups开启时,window.open就可以打开新的窗口. 看csp规则,默认是在当前域内,如果这是一个ctf题的话,就很简单了,window.loca ...
- php数组的定义和数组的赋值
1.php执行过程 加载页面 语法检测 执行脚本 $arr=array(1,2,3); 索引数组 $arr=array("name"=>"user1", ...
- linq查询语法和方法-簡單用法
來自:http://www.cnblogs.com/knowledgesea/p/3897665.html 1.简单的linq语法 //1 var ss = from r in db.Am_recPr ...
- Selenium自动化测试之启动浏览器
Selenium自动化测试之启动浏览器 一.Eclipse新建java工程 1.新建java工程:File->New->Java Project,输入Project name:如AutoT ...
- openstack 虚拟机 迁移
迁移. 如果 你的 云 系统 正在 使用 共享 存储, 使用 nova live- migration 命令 就可以. 首先, 要 获得 需要 被 迁移 的 实例 列表: # nova list -- ...
- 理解numpy exp函数
exp,高等数学里以自然常数e为底的指数函数 Exp:返回e的n次方,e是一个常数为2.71828 Exp 函数 返回 e(自然对数的底)的幂次方. a = 1 print np.exp(a) a ...
- Vscode 格式化vue Template代码段
1.安装 vetur 2.在User Setting中增加设置: "vetur.format.defaultFormatter.html": "js-beautify-h ...
- 一个loser的忏悔
一直认为自己是世界的主角,从小意气用事,耽误了学业,现在才发现了自己的爱好,于是开始努力进阶. 愿不辜负自己的努力! 高中大学青葱旺盛的美好时期全部用在了感叹人生上,只能在30岁的年纪重新扛起学业,活 ...
- java8 新特性 Stream流 分组 排序 过滤 多条件去重
private static List<User> list = new ArrayList<User>(); public static void main(String[] ...
- python使用findall正则匹配出所有符合条件的字符串
# -*- coding:utf-8 -*- import re mystr="qqq key:www.baidu.com<br>key:www.tengxun.com<b ...