赞
踩
yum update -y
yum install -y yum-utils
yum-config-manager --add-repo https://packages.microsoft.com/config/rhel/7/mssql-server-2019.repo
yum install -y mssql-server
/opt/mssql/bin/mssql-conf setup
输入数字3。后面一路y,需要记住设置的sa密码。
systemctl start mssql-server
ss -tnl
yum-config-manager --add-repo https://packages.microsoft.com/config/rhel/7/prod.repo yum install -y mssql-tools unixODBC-devel ln -s /opt/mssql-tools/bin/sqlcmd /usr/bin sqlcmd -S localhost -U sa #查看sqlserver的状态 systemctl status mssql-server #停止sqlserver服务 systemctl stop mssql-server #开启sqlserver服务 systemctl Start mssql-server #停止并且禁止sqlserver自启动 systemctl stop mssql-server systemctl disable mssql-server #设置开机自启并启动sqlserver systemctl enable mssql-server systemctl start mssql-server
关闭系统密码登录,启用秘钥登录。
#导入用户的公钥
cd ~/.ssh
cat id_ras.pub >>authorized_keys
vi /etc/ssh/sshd_config
#增加:
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no
systemctl restart sshd.service
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。