CentOS7怎么安装.Net Core的运行环境


这篇“CentOS7怎么安装.Net Core的运行环境”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“CentOS7怎么安装.Net Core的运行环境”文章吧。一、安装.net core1、查看系统版本#cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)2、安装.net core依赖
#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-devel3、安装dotnet-sdk-3.1#yum install dotnet-sdk-3.14、查看安装#dotnet -version
Unknown option: -version
.NET Core SDK (3.1.403)安装成功!二、安装redis1、安装gcc#yum install -y gcc2、安装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/修改 redis.conf 文件,把 daemonize no 改为 dae免费云主机域名monize yes#sed -i ‘s/daemonize no/daemonize yes/g’ redis.conf设置开机启动#vi /etc/systemd/system/redis.service添加如下内容[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设置开机启动#systemctl daemon-reload#systemctl start redis.service#systemctl enable redis.service#ln -s /usr/local/redis/bin/redis-cli /usr/bin/redis服务操作命令systemctl start redis.service #启动redis服务systemctl stop redis.service #停止redis服务systemctl restart redis.service #重新启动服务systemctl status redis.service #查看服务当前状态systemctl enable redis.service #设置开机自启动systemctl disable redis.service #停止开机自启动三、安装supervisord#yum install epel-release#yum install -y supervisor设置开机启动#systemctl enable supervisord命令使用:#systemctl stop supervisord #停止
#systemctl start supervisord #启动
#systemctl status supervisord #查看状态
#systemctl reload supervisord #加载配置文件
#systemctl restart supervisord #重启服务#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启动supervisord#systemctl start supervisord查看是否启动
#systemctl status supervisord安装成功!以上就是关于“CentOS7怎么安装.Net Core的运行环境”这篇文章的内容,相信大家都有了一定的了解,希望小编分享的内容对大家有帮助,若想了解更多相关的知识内容,请关注百云主机行业资讯频道。

相关推荐: python中@property怎么使用

本篇内容介绍了“python中@property怎么使用”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!简单地说就是一个类里面的方法一旦被@property免费云…

免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。

Like (0)
Donate 微信扫一扫 微信扫一扫
Previous 04/11 11:52
Next 04/11 11:53

相关推荐