Installing SaltStack on RHEL 7? - salt-stack

I need help on installing saltstack on RHEL 7.
RHEL 7 server is from AWS Amazon.
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.0 (Maipo)
I'm getting an error during installation:
$ wget -O - http://bootstrap.saltstack.org | sudo sh
2014-08-04 09:41:45 (932 KB/s) - written to stdout [177548/177548]
INFO: Found function install_red_hat_enterprise_linux_7_stable_deps
INFO: Found function install_red_hat_enterprise_linux_stable
INFO: Found function install_red_hat_enterprise_linux_stable_post
INFO: Found function install_red_hat_enterprise_linux_restart_daemons
INFO: Found function daemons_running
INFO: Running install_red_hat_enterprise_linux_7_stable_deps()
ERROR: Stable version is not available on RHEL 7 Beta/RC. Please set installation type to git.
ERROR: Failed to run install_red_hat_enterprise_linux_7_stable_deps()!!!
Is this version of RHEL 7 not supported for saltstack?

Run the following commands to install from the latest develop branch:
curl -o install_salt.sh -L https://bootstrap.saltstack.com
sudo sh install_salt.sh -M git develop
Remove the -M from the command above if you don't want to install a salt-master and only want to install salt-minion.

I have a similar problem, I tried to install it from epel 7 beta, but there's another problem, see https://bugzilla.redhat.com/show_bug.cgi?id=1127348. Finally I was able to install it by combining pip and yum. I don't have the exact sequence of commands, but sth. like this should work:
yum install --skip-broken salt python-pip
pip install jinja2

I have tried installing SaltStack on CentOS 7 , which should be similar to Redhat 7, and you could try it, hope it works for you:
**[updated]** http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
and then you could
yum install -y salt-master
or
yum install -y install salt-minion
to install it.

You need to enable the rhel-7-server-optional-rpms repo in subscription-manager.

Related

I've installed python-3.9.1 and pip but while running the command python3 -V got the result as python 3.6.9 how do I get python version 3.9

sudo apt-get install python3.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3.7 is already the newest version (3.7.10-1+bionic2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
N: Ignoring file 'security' in directory '/etc/apt/sources.list.d/' as it has no filename extension
root#ubuntu:~# python3 -V
Python 3.6.9
I presume you are a Linux user. I faced a similar issue when I was trying to install Python
3.9 but when I ran python -V in the terminal, it would tell me I had version 2.
I can't guarantee
this will work but it worked for me. If you are using Ubuntu 20.04 a Linux distro, by default you have Python 3.9. In Ubuntu 18 and 16 there is also a Python version pre-installed. In your case, you need to first uninstall Python 3.
Using this command in the terminal.
sudo apt-get remove --purge python3
After uninstalling, reinstall as Python 3.9 version using this command:
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.9
python3.9 --version
Again if you're using an editor like Pycharm your base interpreter will be messed up! So please be careful when uninstalling.
And this code works on Ubuntu which I presume is what you are working on.
Another thing you need to install a repository to get Py 3.9. it's called deadsnakes I've mentioned the code above on how you could install it.
I hope you faced no issues. Remember it worked for me but I'm not sure it will work for you. Enjoy with Python 3.9 if the installation is successful :)

Cannot install .NET Core 3.1 using Fedora 31

I followed the documentation for installing .NET Core 3.1 using Fedora 31 with the following link: https://learn.microsoft.com/en-us/dotnet/core/install/linux-package-manager-fedora30
The commands I ran was:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo wget -q -O /etc/yum.repos.d/microsoft-prod.repo https://packages.microsoft.com/config/fedora/30/prod.repo
Followed by:
sudo dnf install dotnet-sdk-3.1
It keeps reporting the package as not found. See terminal output:
Last metadata expiration check: 1:14:48 ago on Thu 05 Dec 2019 15:44:56 GMT.
No match for argument: dotnet-sdk-3.1
Error: Unable to find a match: dotnet-sdk-3.1
Are the docs wrong?
Since Fedora 32 the dotnet SDK repository comes build-in :
https://fedoraproject.org/wiki/DotNet
https://learn.microsoft.com/en-us/dotnet/core/install/linux-package-manager-fedora32
What worked for me was :
Remove old repository from package manager
sudo rm -rf /etc/yum.repos.d/microsoft-prod.repo
Clean dnf cache
sudo dnf clean all
Remove all dotnet packages
sudo dnf remove dotnet*
Hint: If you're using fish or zsh as your regular shell run the command in bash
And reinstall the SDK :
sudo dnf install dotnet-sdk-3.1
have you typed sudo dnf update before?
I just installed in Fedora 31 and gone well.
This tends to happen on a system that has been upgraded from fedora 30 to 31 and has had a version of dotnet core previously installed.
I went nuclear and deleted all my dotnet shared folders(warning! you will lose all dotnet references):
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/bin/dotnet
sudo rm -rf /etc/yum.repos.d/microsoft-prod.repo
sudo wget -q -O /etc/yum.repos.d/microsoft-prod.repo https://packages.microsoft.com/config/fedora/30/prod.repo
I then found https://unix.stackexchange.com/questions/505625/fedora-29-repo-issue.
Then ran the following:
sudo dnf clean all
sudo dnf upgrade
After this I tried the install again and it worked:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo wget -q -O /etc/yum.repos.d/microsoft-prod.repo https://packages.microsoft.com/config/fedora/30/prod.repo
sudo dnf install dotnet-sdk-3.1
I am not clear on why this worked. Will teach me for treating my fedora system as a pet! :)
After upgrading my system from Fedora 31 to Fedora 32 my dotnet command was broken with the error message.
It was not possible to find any installed .NET Core SDKs
The dotnet core package was installed before the upgrade itself with the method descibed in the question.
After inspecting what dotnet packages I had on my system with
sudo dnf list installed 'dotnet*'
the list showed SDKs 2.1, 2.2 and 3.1 as well.
To solve this, I tried to remove the dotnet-sdk-3.1 via
sudo dnf remove dotnet-sdk-3.1
and cleaned dnf caches with
sudo dnf clean all
but after a re-installation the problem persisted.
My solution was to remove all dotnet packages that were listed with the dnf command from above.
After that, I ran
sudo dnf install dotnet-sdk-3.1
And the problem was fixed.
I tried installing dotnet-sdk-3.1 on Fedora 32 without having dotnet installed before. But, I was not able to make it work with dnf, I always got:
It was not possible to find any installed .NET Core SDKs.
The solution for me was to download the Linux x64 Binaries from https://dotnet.microsoft.com/download/dotnet-core, unzip the tar.gz to a directory, and add the directory to the path.
The problem caused by the location where the SDK is installed. When you run the command:
dnf rq -l dotnet-sdk-3.1
It states that the sdk is installed under /usr/share/dotnet/ and not under /usr/lib64/dotnet/ the location where the actual executable is installed.
When you inspect the location you find that more is installed there, like they want to move the location of the software but did half a job. So what I did ... moved everything to /usr/lib64/dotnet/ and then replaced the folder /usr/share/dotnet with a link to /usr/lib64/dotnet.

Error compiling Octave in Centos 7

Here is a list of the steps that I did in order to attempt to install Octave 4.2.1 in Centos 7 (repo version is 3.8.2 which is really old now)
1) yum update
2) yum-builddep -y octave
3) yum -y install qt-devel mercurial gcc-c++ lapack-devel libtool
4) yum -y install epstool transfig pstoedit qscintilla-devel
(NOTE: First problem was right here as there is NO pstoedit in Centos 7, as far as I know)
5) sudo yum install bzip2-devel atlas-devel libsndfile-devel portaudio-devel GraphicsMagick-c++-devel
6) ln -s /usr/lib64/atlas/libtatlas.so /usr/lib64/libatlas.so (One of the tutorials recommended doing this to fix a place where a library was being searched for or something like that. It seemed harmless enough)
7) wget ftp://ftp.gnu.org/gnu/octave/octave-4.2.1.tar.gz
8) tar-xvf octave-4.2.1.tar.lz
9) cd octave-4.2.1
10) export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
11) ./configure --prefix=/usr/local/octave/versions/4.2.1
12) make -j4
It failed with this error:
In file included from libgui/src/settings-dialog.cc:31:0:
libgui/src/ui-settings-dialog.h:13:29: fatal error: QtWidgets/QAction: No such file or directory
#include <QtWidgets/QAction>
Has anyone come up with this problem and has some workaround or solution? Thanks
QtWidgets/QAction is specific to Qt5, and it seems that when you executed yum-builddep -y octave it got dependencies for Qt4. Configure octave with the option --with-qt=4. Another option is to install qt5 libraries and its devel files, configure --with-qt=5, and make.
Or you can just use Flatpack to install the latest version of Octave without any hassle:
flatpak install flathub org.octave.Octave
flatpak run org.octave.Octave
CentOS 7 already comes with built-in Flatpack app, but your distro doesn't have one you can install it:
sudo yum install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Official website:
https://flatpak.org/setup/

Building RStudio from sources: javac error

I want to build RStudio on my Linux Mint 18 Laptop. I have both openjdk-8-jdk and openjdk-9-jdk installed, and I use the following code to compile the package:
git clone http://github.com/rstudio/rstudio.git
cd rstudio
mkdir build
cd dependencies/linux
./install-boost
./install-qt-sdk
./install-dependencies-debian
cd ../../build
cmake .. -DRSTUDIO_TARGET=Desktop -DCMAKE_BUILD_TYPE=Release
But then I try:
sudo make install
and get an error:
[javac] error: Source option 1.5 is no longer supported. Use 1.6 or later.
[javac] error: Target option 1.5 is no longer supported. Use 1.6 or later.
Is it possible to fix it?
Thanks to Logan Kulinski: openjdk from standard distribution has too old version of Java, so I had to install Oracle version:
sudo add-apt-repository ppa:webup8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default

C compiler gcc not found while installing passenger and nginx

I'm trying to install Passenger and Nginx on my VPS.
I followed these instructions and replaced all links of all sources to the current version.
But when i ran the Phusion Passenger installer for Nginx, something with gcc compiler went wrong:
Compiling and installing Nginx...
# sh ./configure --prefix='/opt/nginx' --with-http_ssl_module --with-http_gzip_static_module --with-cc-opt='-Wno-error' --add-module='/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.17/ext/nginx'
checking for OS
+ Linux 2.6.32-220.el6.x86_64 x86_64
checking for C compiler ... not found
./configure: error: C compiler gcc is not found
What should I do?
OBS: My VPS works with CentOS 6.2 x64
Have the same problem and the following commands solve it; (on ubuntu server)
sudo apt-get install linux-kernel-headers
sudo apt-get install build-essential
If you do have gcc installed, the problem stems from /tmp being mounted as noexec. The error doesn't exactly help, but if you remount /tmp as exec you can install passenger properly.
mount -o remount,rw,exec,nosuid /tmp
Got the same error. Just installed gcc and it started working:
yum install gcc
same problem here and I found out that I am not able to run command as root
has to use
sudo
and it worked like charm
Be sure that you sudo, if applicable.
Example:
sudo ./configure ...
One quick hack (I struggled a lot with it and finally install pre-built) is to install the pre-built package of Nginx rather than compiling it from source.
For RHEL/CentOS create the file named /etc/yum.repos.d/nginx.repo with the following contents:
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/
gpgcheck=0
enabled=1
In above baseurl replace “OS” with “centos” and “OSRELEASE” with “6”.
Finally execute yum install nginx
Reference https://nginx.org/en/linux_packages.html#stable

Resources