unzip publish.zip -d idp/idp
首先是mysql的安装
采用yum的方式安装mysql
1.安装mysql的yum源
wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm
2.安装mysql-community.repo
mysql-community-source.repo依赖包
rpm -ivh mysql57-community-release-el7-8.noarch.rpm
3.安装mysql
yum install -y mysql-server
4.运行mysql,并查看运行状态
service mysqld start
service mysqld status
5.由于mysql5.7 会生成一个随机密码,所有先查看密码 (mysql5.6 也有随机密码,5.5不知道)
grep "password" /var/log/mysqld.log
6.登录 MySQL并更新用户 root 的密码,这里我们设置了passwordA1.作为新密码
mysql -u root -p
SET PASSWORD = PASSWORD('passwordA1.');
ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
flush privileges;
7.设置mysql可以被任意ip访问和root 本地访问
grant all privileges on *.* to root@"%" identified by "passwordA1.";
grant all privileges on *.* to root@"localhost" identified by "passwordA1.";
flush privileges;
8.MySQL控制命令:启动、停止、重启、查看状态
service mysqld start
service mysqld stop
service mysqld restart
service mysqld status
systemctl start mysqld
service mysqld stop
service mysqld restart
systemctl status mysqld
9.测试远程连接
2. net core2.1的安装
参照官方文档,地址:https://www.microsoft.com/net/learn/dotnet/hello-world-tutorial#install
1.添加yum源
sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
2.升级所有包同时也升级软件和系统内核
sudo yum update
3.安装.net core
sudo yum install dotnet-sdk-2.1.4
3. nginx的安装
1.添加nginx源
sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
2.安装nginx
sudo yum install nginx
3.启动nginx并设置开机启动
sudo systemctl start nginx.service
sudo systemctl enable nginx.service
Linux环境下,怎么确定Nginx是以那个config文件启动的?
输入命令行: ps -ef | grep nginx
发现配置文件为etc/nginx/nginx.conf
那我们新增一个config文件,把这个文件upload到我们本地,修改里面的配置后,再上传到linux服务器
就可以让dotnet运行在后台程序中运行了
成功,写的不是很详细,如果遇到不懂的问题,可以留言 ,欢迎一起讨论