- Trang chủ
- ›
- Hướng dẫn cài SQLServer 2017 trên Centos7
Hướng dẫn cài SQLServer 2017 trên Centos7
Trước tiên ta SSH vào VPS Centos 7 sau đó cài đặt 2 Repo sau
curl https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo -o /etc/yum.repos.d/mssql-server-2017.repo curl https://packages.microsoft.com/config/rhel/7/prod.repo -o /etc/yum.repos.d/msprod.repo
Sau đó cài đặt SQLServer
yum -y install mssql-server mssql-tools unixODBC-devel
Nếu gặp lỗi Requires: libsss_nss_idmap thì ta cần tài phần này về trước đã.
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/libsss_nss_idmap-1.16.4-21.el7.x86_64.rpm rpm -i libsss_nss_idmap-1.16.4-21.el7.x86_64.rpm
Sau khi cài đặt xong ta bắt đầu cấu hình SQLServer
/opt/mssql/bin/mssql-conf setup
Sẽ có 1 số lựa chọn phiên bản, ở đây nên chọn 2 vì nó miễn phí
Choose an edition of SQL Server: 1) Evaluation (free, no production use rights, 180-day limit) 2) Developer (free, no production use rights) 3) Express (free) 4) Web (PAID) 5) Standard (PAID) 6) Enterprise (PAID) 7) Enterprise Core (PAID) 8) I bought a license through a retail sales channel and have a product key to enter. Enter your edition(1-8): 2
Sau đó chọn Yes
The license terms for this product can be found in
/usr/share/doc/mssql-server or downloaded from:
https://go.microsoft.com/fwlink/?LinkId=855862&clcid=0x409
The privacy statement can be viewed at:
https://go.microsoft.com/fwlink/?LinkId=853010&clcid=0x409
Do you accept the license terms? [Yes/No]:Yes
Tiếp đó ta nhập pass muốn đặt vào 2 lần giống nhau
Enter the SQL Server system administrator password: Confirm the SQL Server system administrator password: Configuring SQL Server...
Quá trình cài đặt thành công
ForceFlush is enabled for this instance. ForceFlush feature is enabled for log durability. Created symlink from /etc/systemd/system/multi-user.target.wants/mssql-server.service to /usr/lib/systemd/system/mssql-server.service. Setup has completed successfully. SQL Server is now starting.
Bật service và để chạy cùng hệ thống
systemctl enable mssql-server && systemctl start mssql-server
Cấu hình môi trường chạy
echo 'export PATH=$PATH:/opt/mssql/bin:/opt/mssql-tools/bin' | sudo tee /etc/profile.d/mssql.sh source /etc/profile.d/mssql.sh
Như vậy là đã xong phần cài đặt và bạn có thể sử dụng. Ta kiểm tra lại bằng câu lệnh sau
sqlcmd -S 127.0.0.1 -U SA
Sau đó nhập pass phía trên vào để kiểm tra là được
Hướng dẫn nổi bật

Hướng dẫn sử dụng VPS Việt Nam tạo SOCKS Proxy

Các công cụ Test tốc độ Websites tốt nhất 2021

Hướng dẫn thiết lập Memcached trên Ubuntu 18.04 LTS

Cách đặt lại mật khẩu VPS Windows

Nâng cấp cURL trên DirectAdmin

Litespeed là gì ? Tất cả các điều cần biết về Litespeed
