阿里云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
随机推荐
- 【ES6】最常用的es6特性(一)
参考链接: http://www.jianshu.com/p/ebfeb687eb70 http://www.cnblogs.com/Wayou/p/es6_new_features.html 1.l ...
- No.4 - 3D 空间的卡片翻转动效
参考 ①张鑫旭http://www.zhangxinxu.com/wordpress/2012/09/css3-3d-transform-perspective-animate-transition/ ...
- 人人开源之代码生成器(renren-generator)
本篇文章,主要包含三个部分,介绍.代码生成演示.代码分析(不会很深入)等 三个部分足以让你学会使用,实际生产可能遇到的问题不会在这遇到. 代码生成器的作用在于提高开发效率.但是这个代码生成器仍有其局限 ...
- PAT——1062. 最简分数
一个分数一般写成两个整数相除的形式:N/M,其中M不为0.最简分数是指分子和分母没有公约数的分数表示形式. 现给定两个不相等的正分数 N1/M1 和 N2/M2,要求你按从小到大的顺序列出它们之间分母 ...
- SQLServer禁用、启用外键约束
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ---启用or禁用指定表所有外键约束 alter table PUB_STRU NOCHECK constrai ...
- 修复支付宝后台报错session IP change to many
在项目的web.xml 中添加: <init-param> <param-name>sessionStatEnable</param-name> <param ...
- Flume(3)-安装部署
一. 下载 Flume官网地址 http://flume.apache.org/ 文档查看地址 http://flume.apache.org/FlumeUserGuide.html 下载地址 htt ...
- 在javascript中的跨域解决
跨域产生的原因 跨域是由浏览器的同源策略引起的,即不同源(协议,域名,端口中其中有一个不同)的js是不能读取对方的资源的.当要网站中的js要请求其他网站的数据时就会产生跨域问题,就像下面这样,浏览器会 ...
- go 网络请求篇二
框架地址:https://github.com/parnurzeal/gorequest package main //https://antarx.com/2018/05/05/gorequest- ...
- 20155215 2006-2007-2 《Java程序设计》第2周学习总结
20155215 2006-2007-2 <Java程序设计>第2周学习总结 教材学习内容总结 第三章主要讲述了JAVA程序编写中的一些基本语法.其实看了第三章之后我就感觉到,C语言不愧是 ...