• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

linux下安装sql server

php 搞代码 4年前 (2022-01-04) 19次浏览 已收录 0个评论

以Centos 7系统为例:

[root@c7 ~]# cat /etc/redhat-release              #系统版本CentOS Linux release 7.1.1503 (Core) [root@c7 ~]# firewall-cmd --state                 #查看firewall状态,关闭firewallrunning[root@c7 ~]# systemctl stop firewalld.service     #关闭[root@c7 ~]# systemctl disable firewalld.service  #开机不启动rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'rm '/etc/systemd/system/basic.target.wants/firewalld.service'[root@c7 ~]# systemctl disable firewalld.service  #开机不启动[root@c7 ~]# firewall-cmd --state                 #已关闭firewallnot running[root@c7 yum.repos.d]# pwd                        #进入/etc/yum.repos.d下载二个yum源文件/etc/yum.repos.d[root@c7 yum.repos.d]# wget https://packages.microsoft.com/config/rhel/7/mssql-server.repo[root@c7 yum.repos.d]# wget https://packages.microsoft.com/config/rhel/7/prod.repo[root@c7 yum.repos.d]# yum search mssql           #查看源信息,已有包信息mssql-server.x86_64 : Microsoft(R) SQL Server(R) Relational Database Enginemssql-server-ha.x86_64 : Microsoft(R) SQL Server(R) Relational Database Enginemssql-tools.x86_64 : Tools for Microsoft(R) SQL Server (R)....略[root@c7 yum.repos.d]# yum install -y mssql-server mssql-tools    #安装服务和工具...略已安装:  mssql-server.x86_64 0:14.0.1.246-6已安装:  mssql-tools.x86_64 0:14.0.1.246-1 [root@c7 ~]# cd /opt/mssql/bin/                   #进入sql目录[root@c7 bin]# ls                                 #下面有启动的文件compress-dump.sh  generate-core.sh  mssql-conf  sqlpackage  sqlservr  sqlservr-setup  sqlservr-telemetry[root@c7 bin]# ./sqlservr-setup                   #执行此文件,依照提示设置密码等信息Microsoft(R) SQL Server(R) SetupYou can abort setup at anytime by pressing Ctrl-C. Start this programwith the --help option for information about running it in unattendedmode.Please enter a password for the system administrator (SA) account:         设置密码Please confirm the password for the system administrator (SA) account:     确认密码Setting system administrator (SA) account password...Do you wish to start the SQL Server service now? [y/n]: y                   开启服务Do you wish to e<strong style="color:transparent">来源gaodaima#com搞(代@码网</strong>nable SQL Server to start on boot? [y/n]: y                 开机启动服务ln -s '/usr/lib/systemd/system/mssql-server.service' '/etc/systemd/system/multi-user.target.wants/mssql-server.service'ln -s '/usr/lib/systemd/system/mssql-server-telemetry.service' '/etc/systemd/system/multi-user.target.wants/mssql-server-telemetry.service'Setup completed successfully.[root@c7 bin]# systemctl status mssqlmssql.service   Loaded: not-found (Reason: No such file or directory)   Active: inactive (dead)[root@c7 ~]# sqlcmd -S localhost -U saPassword: 1> select db_name();2> go                                                                                                                                --------------------------------------------------------------------------------------------------------------------------------master

查看使用CPU和内存高的进程

# ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:linux下安装sql server
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址