SQLServer 部署 & 库表开启cdc
SQLServer安装部署
- yum 从远程拉包部署
- yum 本地安装部署
- em脚本中采用的是手动下载rpm包然后通过脚本驱动自动解压,本地安装的模式。
- sqlserver 官方有提供shell脚本进行一键部署,通过对其进行编辑修改即可满足各种需要
官方脚本
#!/bin/bash -e
# Use the following variables to control your install:
# Password for the SA user (required)
# 设置密码
MSSQL_SA_PASSWORD='<YourStrong!Passw0rd>'
# Product ID of the version of SQL server you're installing
# Must be evaluation, developer, express, web, standard, enterprise, or your 25 digit product key
# Defaults to developer
# 选择版本,有多种版本可供原则,具体版本标识符可自行百度
MSSQL_PID='evaluation'
# Install SQL Server Agent (recommended)
SQL_ENABLE_AGENT='y'
# Install SQL Server Full Text Search (optional)
# SQL_INSTALL_FULLTEXT='y'
# Create an additional user with sysadmin privileges (optional)
# 新建一个额外添加的用户,(可选)
# SQL_INSTALL_USER='<Username>'
# SQL_INSTALL_USER_PASSWORD='<YourStrong!Passw0rd>'
if [ -z $MSSQL_SA_PASSWORD ]
then
echo Environment variable MSSQL_SA_PASSWORD must be set for unattended install
exit 1
fi
# --------------------------- 远程拉包 并安装的过程
echo Adding Microsoft repositories...
sudo curl -o /etc/yum