|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- - 来到根目录:cd ~
- - 注册Microsoft的Repository: wget -q ...
- - 安装:sudo dpkg -i Packages-microsoft-prod.deb
- - 添加新的repository:sudo add-apt-repository universe
- - 安装:sudo apt install apt-transport-https
- - sudo apt update
- - 下载SDK
- ```
- sudo apt install dotnet-sdk-3.0
- ```
- - 登录MySQL: mysql -u root -p
- - 创建数据库:CREATE DATABASE MovieAppDb;
- - quit;
- - 再次登录:mysql -u dd -p
- - 显示数据库:SHOW DATABASES;
- - quit;
- - 创建网站目录:sudo mkdir -p /var/www/movie-app
- - 给目录权限:sudo chown dingding:dingding /var/www/movie-app
- - 来到网站目录
- - 安装git:
- ```
- sudo apt update
- git apt install git
- git --version
- sudo apt update
- sudo apt install make libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip
- - 来到github上的项目,在master分支选择tag,邮件复制地址
- - 下载到当前目录:wget https://github.com/git...
- - 解压:unzip git.zip
- - 来到源代码目录:cd git-*
- - 制作package: make prefix=/usr/lcoall all
- - 安装:sudo make prefix=/usr/local install
- - 配置git
- git config --global user.name ""
- git config --global user.email ""
- git config --list
- ```
- - 把git项目拷贝到当前目录
- ```
- git clone https://github.com
- ```
- - 修改连接字符串
- - 更新数据库
- ```
- 项目的ef和当前装的ef必须匹配
-
- dotnet tool install --global dotnet-ef --version
- dotnet --list-sdks
- dotnet tool install --global dotnet-ef --version 3.0.0
- 配置到全局:export PATH="$PATH:/usr/bin/"
- dotnet --help
- dotnet ef database update
- ```
- - 发布:dotnet publish
- - 运行: dotnet MvcMovie.dll
|