.NET Core5+Mysql+Jexus部署到Centos7
1. 购买服务器地址:https://bwh81.net/clientarea.php,购买后会发送服务器的IP地址、端口、密码到你注册的邮件
2. 安装Mysql,参考:centos7 mysql数据库安装和配置 - starof - 博客园 (cnblogs.com)
yum install mysql
yum install mysql-server
yum install mysql-devel
yum install mariadb-server mariadb
systemctl stop mariadb
systemctl enable mariadb
开启mysql服务:systemctl start mysqld.service
停止mysql服务:systemctl stop mysqld.service
mysql配置文件:vim /etc/my.cnf
进入mysql:mysql -u root -p
设置访问权限:grant all privileges on *.* to root@'%'identified by 'xxxxx*';
更改密码:set password for 'root'@'localhost' =password('xxxx');
3. 安装dotnet5
安装微软秘钥:sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
安装SDK:sudo yum install dotnet-sdk-5.0
安装运行时:sudo yum install aspnetcore-runtime-5.0
查看dotnet版本信息:dotnet --info
安装wget命令:yum -y install wget
4. 安装jexus
安装命令:curl https://jexus.org/release/x64/install.sh|sudo sh
配置文件:cd /usr/www/jexus/siteconf/
项目路径:cd /var/www/default
必须先dotent运行成功:dotnet /var/www/dc/DC.Api.dll 或者:dotnet DC.Api.dll --urls http://173.82.238.100:2023
停止:sudo systemctl rtop jws
开启:sudo systemctl start jws
重启:sudo systemctl restart jws
查看端口:netstat -tunlp | grep 2023
nginx位置:/usr/share/nginx/html