Unable to install ansible error is no package ansible available .nothing to do installing in redhat 7 - ansible-2.x

Unable to install ansible on red hat 7 . No package ansible avialable error nothing to do

Try this:
Unfortunately, Red Hat recently moved Ansible (and some other Devops tools) to their extras repository that requires a subscription. However, we are adding another repository to our configuration that will restore access to it. We are in the process of refreshing our servers right now, in the interim, you can do the following:
Create a new file called 'ansible.repo' in /etc/yum.repos.d
Copy the following content into it:
[Ansible]
name = ansible
baseurl = https://releases.ansible.com/ansible/rpm/release/epel-7-x86_64/
enabled = 1
gpgcheck = 0
3. Run 'yum update'
4. Install ansible ('sudo yum install ansible')
5. Successed

Related

MariaDB version 10.5.9 unable to install

In my current workplace we are using MariaDB version 10.5.9 for our DB's and we are trying to reinstall this version for testing purposes on a separate container. However, seems anything from 10.5.9 below is failing with the follow error;
root#mdb-10-5:~# curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version=mariadb-10.5.9
# [info] Checking for script prerequisites.
# [warning] Found existing file at /etc/apt/sources.list.d/mariadb.list. Moving to /etc/apt/sources.list.d/mariadb.list.old_5
# [error] MariaDB Server version 10.5.9 is not working.
# Please verify that the version is correct.
#
# The latest MariaDB Server versions are:
# 10.10.1 10.3.36 10.4.26 10.5.17 10.6.10 10.7.6 10.8.5 10.9.3
#
# More information on MariaDB releases is available at:
# https://mariadb.com/kb/en/release-notes/
When I try the same command with version 10.5.10, it works and downloads successfully.
I am using the following procedure, one of which is the MariaDB KB:
https://mariadb.com/kb/en/mariadb-package-repository-setup-and-usage/
https://www.dbi-services.com/blog/how-to-install-a-specific-version-of-mariadb/
Both guides use the same repo, and it is also the only thing that I have found specific when I search for information to install this particular version or MariaDB.
Can anyone offer any suggestions or have experienced similar problems?
We (MariaDB corporation) recently moved over our repositories to a content delivery network instead of using our own servers only. Unfortunately the new service does not have a full archive of older releases yet, the oldest 10.5 we have on there for example is 10.5.10.
I have filed an internal bug report / feature request about that already, but it is still pending.
Meanwhile you can "fix" this by first running the repo setup script with a supported version like 10.5.10, and then editing the repository file it created, replacing the version number with 10.5.9, and the host name dlm.mariadb.com with download.mariadb.com.
On Debian and Ubuntu the repository file would be /etc/apt/sources.list.d/mariadb.list, and you'd have to run apt-get update afterwards to pick up the repo change before installing packages.
On RHEL, CentOS, Rocky etc. the file is /etc/yum.repos.d/mariadb.repo and no further action is needed before installing actual packages.

How to get VSCode Liveshare extension working when running inside VSCode Remote Dev Container

When installing the LiveShare extension in a devContainer instance I get an error.
For example using: https://github.com/microsoft/vscode-remote-try-go/ and then adding the extension to the devcontainer.json file
"extensions": [
"ms-vscode.go",
"ms-vsliveshare.vsliveshare-pack"
]
When I attempt to start a liveshare I see:
Agent terminated with exit code: 0 and signal null: FailFast: Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.at System.Environment.FailFast(System.String) at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode() at System.Globalization.GlobalizationMode..cctor() at System.Globalization.CultureData.CreateCultureWithInvariantData() at System.Globalization.CultureData.get_Invariant() at System.Globalization.CultureInfo..cctor() at System.StringComparer..cctor() at System.AppDomain.InitializeCompatibilityFlags() at System.AppDomain.Setup(System.Object)Aborted (core dumped)
So it turns out that this requires the docker images to install icu tools and then things function as expected.
For the golang image I added:
RUN apt update && apt install icu-devtools -y
The rebuild the container and things worked nicely.
One thing to note is that you need to use the alternative sign in flow using a code to signin

PHP 7.x connection with MSSQL server with MAMP

I am trying to connect mssql server to PHP 7.0.8 through MAMP. I have tried using freetds. On some blog people are saying to use pdo_dblib.so extension but it's not working.
Please guide me through the process of connection.
For those who still have this problem:
/Applications/MAMP/bin/php/php7.2.1/bin/pecl install sqlsrv pdo_sqlsrv
Edit php.ini:
extension=sqlsrv.so
extension=pdo_sqlsrv.so
If necessary, use brew install autoconf if you don't have it already.
While the answers posted by Vague Space and Pedro Santiago helped, I still think the answers are a bit lacking and incomplete… Or ask you to do too much. Honestly the official Microsoft instructions are overkill when they state you need to install their Docker image of SQL Server and such? C’mon… Most people just need the drivers installed to make a connection.
So here is my answer based on my experience installing the pdo_sqlsrv.so and sqlsrv.so modules in MAMP (version 5.2) but should work for most any MAMP version that supports some flavor of PHP 7.
Adjust the .bash_profile so MAMP’s binaries and libraries are a part of your $PATH settings.
First, adjust your .bash_profile so the MAMP stuff is in there; makes it easier to launch and work with MAMP specific binaries and ensures MAMP libraries are checked when doing things like installing new modules like this.
The way I like to do it is like this; set $MAMP_BIN and $MAMP_PHP variables like this and then rebuild the $PATH variables:
# MAMP stuff.
export MAMP_BIN="/Applications/MAMP/Library/bin";
export MAMP_PHP="/Applications/MAMP/bin/php/php7.2.10/bin";
# Final $PATH setting.
export PATH="/usr/local/bin:/usr/local/sbin:$MAMP_BIN:$MAMP_PHP:$PATH";
Save it and just log out of the Terminal session and back in, or just resource the .bash_profile like this:
source ~/.bash_profile
With that done, let’s install the core Microsoft ODBC binary stuff.
Install the Microsoft ODBC stuff.
Do this to install the core ODBC stuff on macOS; be sure to have Homebrew installed:
brew tap microsoft/SQLSRV-release https://github.com/Microsoft/homebrew-SQLSRV-release
brew update
brew install --no-sandbox msodbcsql17 SQLSRV-tools
Then when that’s done, go ahead and install the Unix ODBC stuff like this:
brew install unixodbc
Now install the actual PHP modules via PECL:
pecl install sqlsrv pdo_sqlsrv
With the modules installed, add them to the php.ini file in MAMP so PHP can recognize it. For PHP 7.2.10 on MAMP 5.x it should be located here:
/Applications/MAMP/bin/php/php7.2.10/conf/php.ini
And just add these config lines to the bottom of the file:
; Enable 'Microsoft Drivers for PHP for SQL Server' extension module
extension = sqlsrv.so
extension = pdo_sqlsrv.so
; Configuration
;sqlsrv.WarningsReturnAsErrors = 1
;sqlsrv.LogSeverity = 0
;sqlsrv.LogSubsystems = 0
;sqlsrv.ClientBufferMaxKBSize = 10240
;pdo_sqlsrv.log_severity = 0
;pdo_sqlsrv.client_buffer_max_kb_size = 10240
Note, most tutorials—and even PECL when you install the modules—simply mention adding extension = sqlsrv.so and extension = pdo_sqlsrv.so to the php.ini config, but these config options are the ones that RedHat has when installing the PHP SQLSRV via the Remi repo. Yeah, most of them are commented out but I still like having it there for reference.
Follow this guide through step 3: Microsoft PHP drivers for SQL Server
Find where pecl drops extensions in your local machine
Copy the files pdo_sqlsrv.so and sqlsrv.so into your MAMP's PHP extension directory. Mine was located at /Applications/MAMP/bin/php/php7x.x/lib/php/extensions/no-debug-foo-bar
Edit your php.ini file to include the new extensions:
extension=sqlsrv.so
extension=pdo_sqlsrv.so
Restart your MAMP servers.
having just done this in 2019 with MAMPPRO4 on windows 10 (follow upto step 4 to test that you are connected and then do point 9 ) point 5 onwards is for changing the path in the command line
download dll files from microsoft
https://www.microsoft.com/en-gb/download/details.aspx?id=20098
follow the instruction after running the exe file and place the dll
files into the extension directory of the php version that you are
using eg: MAMP/bin/php/php7.1.29/ext
check phpinfo for the Loaded Configuration File of the php.ini file
add the 2 dll files depending on your requirements (I wasted time by
using the 64.dll) make sure you are using ts(thread safe) not
nts(none thread safe) in the file name of the dll
extension=php_sqlsrv_71_ts_x86.dll
extension=php_pdo_sqlsrv_71_ts_x86.dll
in control panel search for advanced system settings and click
click Environment Variables
under system variables not user variables click path and click edit
click new and add C:\MAMP\bin\php\php7.1.29 (Edit this to your path)
restart MAMP
open a new command line an enter php -v
you should see the php version displayed

Trouble installing/using Atom packages on offline PC

I'm currently in the process of setting up my workspace on my company machine and have chosen Atom as my text editor of choice. The computer is not connected to the internet, so I will have to "manually" install packages. I've been having difficulties installing packages via usb transfer. I've copied and extracted packages to my ~/.atom/packages
The package I'm attempting to use (atom-beautify) shows up on the packages tab on the top of the editor. It also shows up under [Settings] -> [Packages].
When attempting to use the beautify I get the error message "Failed to activate the atom-beautify package" ... Cannot find module 'event-kit'
Also using Windows 10. Any help is greatly appreciated!
You can solve your problem. There are some way to solve your problem.I did not used win10, I am on win7.Yet you can try.
Paste atom-beautify to C:\Users\User.atom\packages and change pacakage.json
atom-beautify needs a dependency named bluebird, if you can try to add this to atom.
It step 1 or step 2 failed then goes to step 2,
Connecting your pc to internet run this command from your terminal: apm install atom-beautify
Source: https://github.com/Glavin001/atom-beautify/issues/879#issuecomment-218753674
Safest bet with installing atom packages offline is to install it on another online PC and then copy all contents from your packages location to offline PC.

Unable to install Nagios agent on CentOS7

When I try to install the agent downloaded from (http://assets.nagios.com/downloads/nagiosxi/agents/linux-nrpe-agent.tar.gz) I get a firewalld error. The only solutions I can find is to enable the firewall but I do not want to.
2nd, I tried this command "cat /dev/null > 4-firewall". But the installer also came back with an error "The script that failed was: './A-subcomponents'"
Is there a workaround?
============================
Nagios Linux Agent Installer
============================
This script will install the Nagios Linux Agent by executing all necessary
sub-scripts.
IMPORTANT: This script should only be used on a clean installed system:
RedHat Enterprise, CentOS, Fedora, or Oracle
OpenSUSE or SUSE Enterprise
Ubuntu or Debian
Do NOT use this on a system running any other distro or that
does not allow additional package installation.
Do you want to continue? [Y/n] y
Proceeding with installation...
Running './0-repos'...
Configuring Repos...
epel-release RPM installed OK
Repos configured OK
RESULT=0
Running './1-prereqs'...
Installing prerequisites...
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: anorien.csc.warwick.ac.uk
* epel: epel.besthosting.ua
* extras: centos.hyve.com
* rpmforge: apt.sw.be
* updates: centos.mirroring.pulsant.co.uk
Package autoconf-2.69-11.el7.noarch already installed and latest version
Package gcc-4.8.3-9.el7.x86_64 already installed and latest version
Package glibc-2.17-78.el7.x86_64 already installed and latest version
Package libmcrypt-devel-2.5.8-13.el7.x86_64 already installed and latest version
Package 1:make-3.82-21.el7.x86_64 already installed and latest version
Package 1penssl-devel-1.0.1e-42.el7.9.x86_64 already installed and latest version
Package sudo-1.8.6p7-13.el7.x86_64 already installed and latest version
Package sysstat-10.1.5-7.el7.x86_64 already installed and latest version
Package 2:xinetd-2.3.15-12.el7.x86_64 already installed and latest version
Package bc-1.06.95-13.el7.x86_64 already installed and latest version
Nothing to do
Prerequisites installed OK
RESULT=0
Running './2-usersgroups'...
Adding users and groups...
useradd: user 'nagios' already exists
groupadd: group 'nagios' already exists
useradd: user 'nagios' already exists
groupadd: group 'nagcmd' already exists
Users and groups added OK
RESULT=0
Running './3-services'...
/etc/services updated
RESULT=0
Running './4-firewall'...
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
FirewallD is not running
RESULT=252
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.
The script that failed was: './4-firewall'
In the same folder that contains fullinstall, try creating an empty installed.firewall file by executing:
touch installed.firewall
Then try re-running
./fullinstall
This is based on line 12 of 4-firewall:
# Was this step already completed?
if [ -f installed.firewall ]; then
echo "Firewall rules already configured - skipping."
exit 0
fi
If a file named installed.firewall exists in that directory, the firewall configuration step should get skipped.
Also you can enable firewalld on your server with the following command.
To enable firewalld,
systemctl enable firewalld
To start firewalld
systemctl start firewalld
To check the status of firewalld
systemctl status firewalld

Resources