Dotnet Open Source cms DanaZhangCms released to Ubuntu, danazhangcmsubuntu
In the previous article, I open source my learning project DanaZhangCms while learning netcore.
Open Source Address: http://git.oschina.net/ayzhanglei/DanaZhangCms
Next, I will explain how to release it to the production environment.
The production environment is as follows:
1. Install dotnet core
Installation tutorial
2. Use nginx proxy
Tutorial reference http://www.cnblogs.com/ayzhanglei/p/5635549.html
3. Release DanaZhangCms
Open the project. json comment "type": "platform ",
My production environment is vs2015, windows 2012
Switch to the folder where cms is stored and run
1. dotnet restore
2. dotnet publish-r ubuntu.14.04-x64
Upload the files under bin \ Debug \ netcoreapp1.0 \ ubuntu.14.04-x64 \ publish to the server. I am using vsftpd Tutorial: http://www.cnblogs.com/CSGrandeur/p/3754126.html
4. Create a process daemon
Sudo apt-get install supervisor
Cd/etc/supervisor/conf. d/
Sudo vi danazhangcms. conf
Add the following text
[Program: DanaZhangCms]
Command =/usr/bin/dotnet/home/uftp/www/publish/danazhangcms. dll
Directory =/home/uftp/www/publish
Autostart = true
Autorestart = true
Stderr_logfile =/var/log/DanaZhangCms. error. log
Stdout_logfile =/var/log/DanaZhangCms. out. log
Environment = aspnetcoreappsenvironment = Production
User = root
Stopsignal = INT
Then restart the supervisor.
Sudo service supervisor restart
Enter the ip address in the browser and you will see that the program is running.