Can't install sql server on amazon linux instance - Requires: systemd-units systemd and numactl-libs - sql-server

I tried to install sql-serven on a medium Ec2 with amazon linux and I get errors with a few packages.
I was using following command: sudo yum install mssql-server
And I get this error:
Error: Package: mssql-server-14.0.3076.1-2.x86_64 (packages-microsoft-com-mssql-server-2017)
Requires: systemd-units
Error: Package: mssql-server-14.0.3076.1-2.x86_64 (packages-microsoft-com-mssql-server-2017)
Requires: systemd
Error: Package: mssql-server-14.0.3076.1-2.x86_64 (packages-microsoft-com-mssql-server-2017)
Requires: numactl-libs
When I tried to install the systemd-units package I got another error:
sudo yum install systemd-units
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main | 2.1 kB 00:00:00
amzn-updates | 2.5 kB 00:00:00
2 packages excluded due to repository priority protections
No package systemd-units available.
Error: Nothing to do
How can I solve this error?
Thanks in advance.

Sql-Server is not compatible with Amazon Linux 1, the only soltion for me was create an RDS.

SQL Server does install successfully on Amazon Linux 2, so if you make sure you're using an Amazon Linux 2 AMI to launch your instance you won't get those errors.
For example, in US N. Virginia the current Amazon Linux AMI is ami-035b3c7efe6d061d5, that will not work, but the current Amazon Linux 2 AMI is ami-0cc96feef8c6bbff3 and it does work - I have used it myself.

Related

Launch Mongodb in AWS envirement after installation

During 3 days I have been trying to install mongo BD in AWS ec2 instance, today finally managed to install it in Ubuntu, now I can't launch it in AWS environment, after numerous attempts to check the status in aws environment terminal I get errors:
What I have already tried do:
installed mongodb on Ubuntu 16.04 (Xenial)
launch mongo as a service (Ubuntu)
sudo service mongod start
sudo service mongod status
Go to AWS environment and do attempts to check if I'm connected to DB, and get errors:
sudo: mongod: command not found
mongod: unrecognized service
sudo: apt-get: command not found
bash: mongo: command not found
Please help to set my environment
I am pretty sure that Шоира is dealing not with Ubuntu OS but Amazon Linux or so.
So, if she is dealing with Community Edition version of it, the actual docs for every *nix based OS can be found here (MongoDB Docs)
And if I remember this fact correctly, AWS instances comes with Amazon Linux by default, so the documentation guide should been read for Amazon Linux (here), not Ubuntu.
To ensure that she is using Amazon Linus, she must type command grep ^NAME /etc/*release in terminal. If so, the reply should be: Amazon Linux or Amazon Linux AMI
Also, I don't know does it matter or not, but MongoDB Atlas provides also free-tier (as EC2 instance) servers in (almost) every data centers from GCP / Azure / AWS, so sometimes it's better to dealing with Cloud Service (which includes Compass and Realms by default, out of the box) instead of using the Community edition of the -raw DB, and write code and https API for it, later.
I tried to recreate the issue on an EC2 instance with Ubuntu 16.04:
NAME="Ubuntu"
VERSION="16.04.6 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.6 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
I followed the instructions from your link:
Install MongoDB Community Edition on Ubuntu
I had no issues and was able to install mangoDB as described in the link. The mongoDB is working fine on my instance:
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: active (running) since Sun 2020-07-19 08:21:41 UTC; 8s ago
Docs: https://docs.mongodb.org/manual
Main PID: 3214 (mongod)
Tasks: 24
Memory: 69.6M
CPU: 746ms
CGroup: /system.slice/mongod.service
└─3214 /usr/bin/mongod --config /etc/mongod.conf
Thus, please double check and ensure that you follow the instructions from the link. The instructions are correct.
Also please make sure to use Ubuntu 16.04:
This means that, you are trying to connect to the mongod process running on the local host which is binded on the default port of 27017

Nothing provides python needed by mssql-server-is

I'm trying to install SQL Server Integration Services on RHEL 8. I have SQL Server 2019 (version v15) installed and running successfully, but when I try and follow this:
https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup-ssis?view=sql-server-ver15#RHEL
The RHEL 8 repo doesn't have the mssql-server-is package in it, and using the RHEL 7 repo throws this error:
Error: Problem: conflicting requests
- nothing provides python needed by mssql-server-is-15.0.2000.5-4.x86_64 (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
I have both Python2 and Python 3 installed, and when I run this:
alternatives --config python
I see that /usr/bin/python2 is selected
Any ideas how I can get SSIS installed for RHEL 8 and SQL Server 2019?
I could install it by downloading the rpm and then installing it using --nodeps option as below:
sudo yum download mssql-server-is
sudo rpm -Uvh --nodeps mssql-server-is*rpm
Worked pretty smooth for me.

How to install Snapper on Ubuntu 16.04 Server using BTRFS as file system

I am having some difficulty installing Snapper(http://snapper.io/) on Ubuntu Server 16.04.
When I follow instructions from Snapper for Ubuntu 16.04, I am getting the below error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libsnapper
0 upgraded, 1 newly installed, 0 to remove and 41 not upgraded.
Need to get 197 kB of archives.
After this operation, 674 kB of additional disk space will be used.
Err:1
(download.opensuse.org/repositories/filesystems:/snapper/xUbuntu_16.04 libsnapper 0.5.1 Protocol "http" not supported or disabled in libcurl
E: Failed to fetch)
(download.opensuse.org/repositories/filesystems:/snapper/xUbuntu_16.04/./amd64/libsnapper_0.5.1_amd64.deb Protocol "http" not supported or disabled in libcurl)
This seems to work fine for Ubuntu 16.04 Desktop. Can I make it work for server???
I just changed the https to http in the /etc/apt/sources.list.d/snapper.list and now it works
This is a work around as opensuse org does not support https i guess.
https://github.com/openSUSE/snapper/issues/357

Connecting MSSQL to PHP 5.5 on Centos 6

I want to connect mssql in my site and it's on CENTOS 6 and I am using PHP 5.5.
Got many solutions online about installing drivers regarding the PDO and ODBC, always getting error of no package found or failed dependencies, don't know why I am not able to install or proceed further.
Any help will be appreciated.
Thanks
If You want to use mssql_connect, You need to install php-mssql from extras repository:
yum install --enablerepo=extras php-mssql
and restart httpd:
service httpd restart
That's it :-)

Install mod_jk with Apache 2.2

I have downloaded mod_jk-1.2.28-httpd-2.2.X.so for Apache 2.2 running on CentOS, and set up as per http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html. When I try to start httpd it fails with the following error:
"Starting httpd: httpd: Syntax error on line 993 of /etc/httpd/conf/httpd.conf: Syntax error on line 2 of /opt/apache-tomcat-6.0.26/conf/jk/mod_jk.conf-auto: Cannot load /etc/httpd/modules/mod_jk-1.2.28-httpd-2.2.X.so into server: /etc/httpd/modules/mod_jk-1.2.28-httpd-2.2.X.so: wrong ELF class: ELFCLASS32"
Does that mean that mod_jk-1.2.28-httpd-2.2.X.so has not been properly compiled?. What can I do about that?
Thanks
Peter
It means that you have a 32-bit module, but are not running a 32-bit httpd. Install the proper gcc package from the repositories and rebuild the module.
To fix, I installed the Tomcat Connector using yum:
yum search mod_jk
mod_jk-ap20.x86_64 : Tomcat mod_jk connector for Apache 2.0.x
mod_jk-ap22.x86_64 : Tomcat mod_jk connector for Apache 2.x
yum install mod_jk

Resources