In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge points of this article "CentOS7 how to install .net Core operating environment", so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "CentOS7 how to install .net Core running environment" article.
First, install. Net core
1. View the system version
# cat / etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
2. Install. Net core dependencies
# rpm-ivh libgdiplus-2.10-10.el7.x86_64.rpm
# rpm-ivh libgdiplus-devel-2.10-10.el7.x86_64.rpm
# rpm-ivh packages-microsoft-prod.rpm
# yum-y install libXrender libexif libjpeg libtiff fontconfig-devel cairo-devel giflib-devel
3. Install dotnet-sdk-3.1
# yum install dotnet-sdk-3.1
4. View the installation
# dotnet-version
Unknown option:-version
.net Core SDK (3.1.403)
Installation successful!
Second, install redis
1. Install gcc
# yum install-y gcc
2. Install redis
# wget http://download.redis.io/releases/redis-5.0.8.tar.gz
# tar zxvf redis-5.0.8.tar.gz
# cd redis-5.0.8
# make
# make install PREFIX=/usr/local/redis
# cd / usr/local/redis/bin/
#. / redis-server
# cp / usr/local/src/redis-5.0.8/redis.conf / usr/local/redis/bin/
Modify the redis.conf file to change daemonize no to daemonize yes
# sed-I 's/daemonize no/daemonize yes/g' redis.conf
Set up boot boot
# vi / etc/systemd/system/redis.service
Add the following
[Unit]
Description=redis-server
After=network.target
[Service]
Type=forking
ExecStart=/usr/local/redis/bin/redis-server / usr/local/redis/bin/redis.conf
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Set up boot boot
# systemctl daemon-reload
# systemctl start redis.service
# systemctl enable redis.service
# ln-s / usr/local/redis/bin/redis-cli / usr/bin/redis
Service operation command
Systemctl start redis.service # start the redis service
Systemctl stop redis.service # stop the redis service
Systemctl restart redis.service # restart the service
Systemctl status redis.service # View the current status of the service
Systemctl enable redis.service # set Boot self-boot
Systemctl disable redis.service # stop booting self-starting
Third, install supervisord
# yum install epel-release
# yum install-y supervisor
Set up boot boot
# systemctl enable supervisord
The command uses:
# systemctl stop supervisord # stop
# systemctl start supervisord # launch
# systemctl status supervisord # View status
# systemctl reload supervisord # load configuration file
# systemctl restart supervisord # restart the service
# cat / etc/supervisord.conf
[include]
Files = supervisord.d/*.ini
# cat / etc/supervisord.d/new.ini
[program:web.new]
Command=dotnet HualuTrain.Web.dll-urls "http://*:9000"
Directory=/data0/app/new.Web
Environment=ASPNETCORE__ENVIRONMENT=Production
User=www
Stopsignal=INT
Autostart=true
Autorestart=true
Startsecs=3
Stderr_logfile=/var/log/ossoffical.err.log
Stdout_logfile=/var/log/ossoffical.out.log
Start supervisord
# systemctl start supervisord
Check to see if it starts
# systemctl status supervisord
Installation successful!
The above is about the content of this article on "how to install the operating environment of .net Core in CentOS7". I believe we all have some understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.