部署環境爲:Win7專業版32位,數據庫Mysql5.7.27-win32html
1.先啓用IIS功能mysql
2.安裝Mysql5.7.27-win32,使用解壓版安裝redis
安裝步驟:sql
mysql的解壓根目錄下新建my.ini配置文件數據庫
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. [mysqld] # Remove leading # and set to the amount of RAM for the most important data # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. # innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging # changes to the binary log between backups. # log_bin # These are commonly set, remove the # and set as required. basedir = C:/IIS/mysql-5.7.27-win32 datadir = C:/IIS/mysql-5.7.27-win32/data port = 3306 # server_id = ..... # Remove leading # to set options mainly useful for reporting servers. # The server defaults are faster for transactions and fast SELECTs. # Adjust sizes as needed, experiment to find the optimal values. # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
安裝服務:ui
mysqld -install spa
若是報錯:計算機中丟失MSVCR120.dll.net
下載安裝vcredist_x86code
下載地址:https://www.microsoft.com/en-us/download/details.aspx?id=40784server
執行命令後提示:Service successfully installed. 表示安裝成功
初始化Mysql用戶:
mysqld --initialize-insecure --user=mysql
執行命令後會在MySQL的安裝目錄下生成data目錄並建立root用戶。
啓動服務:
net start mysql
啓動MySQL以後,root用戶的密碼爲空,設置密碼,命令以下:
mysqladmin -u root -p password 新密碼
Enter password: 舊密碼
VS發佈的時候選擇正確的目標環境
發佈至IIS後應用程序池老是中止
模塊 DLL C:\Program Files (x86)\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll 未能加載。返回的數據爲錯誤信息。
須要下載VC運行時:
參考:https://q.cnblogs.com/q/111731/
1,dotnet hosting 2.2.0 須要C++2015
2,C++2015 須要 KB2919355 https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=42334
3,KB2919355 須要 KB2919442 https://www.microsoft.com/en-us/download/details.aspx?id=42153
.net core 2.2 HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure
而後又出現錯誤:
Failed to load the dll from [C:\Program Files\dotnet\host\fxr\1.0.1\hostfxr.dll
這兩個錯誤都是由於win7缺乏補丁所致:
須要安裝補丁:KB2533623
https://www.cnblogs.com/yilezhu/p/10057789.html
下載對應補丁:
https://support.microsoft.com/en-us/help/2533623/microsoft-security-advisory-insecure-library-loading-could-allow-remot