Recently I fell in love with debian, it feels easier to get started than centos
However, when deploying systems and my own development projects recently, I found that the debian system installation framework is still very convenient. I posted the regular deployment commands I compiled. I hope it will be useful to everyone. It is basically enough for .NET CORE developers.
First of all, I won’t compare the two systems because I don’t really understand the core differences. However, when I recently deployed the system and my own development project, I found that the debian system installation framework is still very convenient, so I organized it myself. The general deployment commands are posted. I hope it will be useful to everyone. It is basically enough for .NET CORE developers
Install .net core
1. wget https://packages.microsoft.com/config/debian/11/packages -microsoft-prod.deb -O packages-microsoft-prod.deb >> This is version 11. If your debian is 10, change to 10
2. sudo dpkg -i packages-microsoft-prod.deb
3. rm packages-microsoft-prod.deb
4. sudo apt-get update
5. sudo apt-get install -y aspnetcore-runtime-x.0 >> What version of core you want to install, please fill it in individually
————————————————– ————————————————– ————————–
Install Supervisor
apt-get install supervisor
Set up startup: systemctl enable supervisor
Start: supervisorctl start all
#Close all tasks
supervisorctl shutdown
#Close the specified task
supervisorctl stop|start program_name
#View all task status
supervisorctl status
#Load new configuration
supervisorctl update
#Restart all tasks
supervisorctl reload
The configuration file is in /etc/supervisor
————————————————– ————————————————– ————————–
Install Nginx
Installation: apt install nginx
Start the service: systemctl status nginx
Start up: systemctl enable nginx
The configuration file is in /etc/nginx
Normally you don’t need to change the original configuration file, you just need to add new site configurations in the conf.d folder.
After configuration is complete:
nginx -t Verify the configuration
nginx -s reload reloads the configuration without restarting
————————————————– ————————————————– ————————–
[Optional] Install redis
sudo apt update
sudo apt install redis-server
sudo systemctl status redis-server automatically starts
sudo systemctl restart redis restart
The configuration file is in /etc/redis
Note: Protection settings need to be turned off, otherwise cross-network connections will not be possible
Extra tip, after the installation of Debian for vultr virtual machine, the system will enable the firewall by default. You need to turn it off, otherwise except for port 22 , the others are inaccessible
I hope the above three tips can help new developers!