Difference in MariaDB installation packages on RHEL server? - rhel7

On trying to install MySql on RHEL7 I came to know that we need to use MariaDB instead.
I tried the installation on my machine which is RHEL6 by adding MariaDB.repo file to /etc/yum.repos.d/ with following lines -
[mariadb]
name = MariaDB-5.5.39
baseurl=https://downloads.mariadb.com/files/MariaDB/mariadb-5.5.39/yum/rhel6-amd64/
# alternative: baseurl=http://archive.mariadb.org/mariadb-5.5.39/yum/rhel6-amd64/
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
https://mariadb.com/kb/en/mariadb/yum/
Thereafter I installed it successfully using following command -
sudo yum install MariaDB-server MariaDB-client
Now on an RHEL7 production box same steps failed with following conflict -
file /etc/my.cnf from install of MariaDB-common-5.5.39-1.el6.x86_64 conflicts with file from package maria-libs-1:5.5.44-2.el7.x86_64
So I understand I am pointing to rhel6 repo on rhel7 and probably some pre-installed files are in conflict.
But when I execute below mysql/mariadb gets installed successfully, what difference does case make here?
sudo yum install mariadb mariadb-server
I am not sure if it is linked to a different repository in background, I dont have access to the instance to dig further in repo settings, can anyone help me out here?

You can clarify that using yum search mariaDB
I executed that an ended up with same result as mariaDB and mariadb
============================= N/S matched: mariaDB =============================
mariadb-bench.x86_64 : MariaDB benchmark scripts and data
mariadb-devel.i686 : Files for development of MariaDB/MySQL applications
mariadb-devel.x86_64 : Files for development of MariaDB/MySQL applications
mariadb-libs.i686 : The shared libraries required for MariaDB/MySQL clients
mariadb-libs.x86_64 : The shared libraries required for MariaDB/MySQL clients
mariadb-server.x86_64 : The MariaDB server and related files
mariadb.x86_64 : A community developed branch of MySQL
mariadb-test.x86_64 : The test suite distributed with MariaD
Name and summary matches only, use "search all" for everything.

Related

I am not able to install Apache Airflow in Windows

My attempts include:
[ here i have python 3.9 so my constraints is 3.9]
I created a virtual environment and attempted to install Apache-Airflow by using pip install 'apache-airflow==2.5.1' / —constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.5.1/constraints-3.9.txt," but I received an error that I couldn't understand, so I looked on the stack community for advice and learned that I needed to add -t, which I did.
but then I started getting permission errors, then I went into community posts and how to fix permission errors, and it was suggested that I should run command prompt as administrator and then install unfortunately this thing isn't working for me
I've tried running cmd as administrator, going to my project's directory, activating virtualenv, and installing the library, but I still get the same problem. PermissionError: [WinError 5] Access is denied: 'D:\\'
Thanks in advance.
Try removing the slash (/) from the command before the --constraint and then running inside the cmd terminal; it will work.
pip install apache-airflow==2.5.1 --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.5.1/constraints-3.9.txt"
Note : Please be aware that the above recommendation is for Windows, but even if it is successfully installed you won't be able to run airflow because of the files used, such as pwd and others. Therefore, I will recommend that you use airflow in Windows using Ubuntu. You can follow this link to install Ubuntu in your system and set up airflow.
youtube-video-url

Is Passenger Deprecated for Nginx versions above 1.14?

I updated nginx from version 1.14 to 1.18 (Ubuntu) on Ubuntu 18.04.
Doing so appeared to break passenger. So I uninstalled and attempted to reinstall the Open Source Passenger version via the Passenger installation Ubuntu 18.04 instructions.
I got to this line:
sudo apt-get install -y libnginx-mod-http-passenger
Which throws this error
libnginx-mod-http-passenger : Depends: nginx-common (< 1.14.1) but 1.18.0-3ubuntu1+bionic1 is to be installed
Update I also attempted with the enterprise version. Following the enterprise version installation instructions, I received a similar error message:
libnginx-mod-http-passenger-enterprise : Depends: nginx-common (< 1.14.1) but 1.18.0-3ubuntu1+bionic1 is to be installed
I did attempt to research the issue and I found this issue on Phusion's GitHub as well as this more recent issue. It appears that what most people are doing is rolling back their nginx version to 1.14.
It is not deprecated, no. The problem is that the packaged module you are trying to install was made for an older Nginx version that is distributed through the system default repository. This appears in the installation guide that you've mentioned:
At this point we assume that you already have Nginx installed from your system repository.
What this means is that the following instructions assume that you have Nginx specific version (1.14.0 in your case) installed, for which the packaged module was built. This is emphasised in the new passenger documentation:
If you want to use our packaged Nginx module, you must use your distro's provided Nginx package. If for example you have the repo provided by NGINX setup, you will instead need to compile a dynamic module compatible with that Nginx.
The link in the last quote will bring you to the guide on how to compile a dynamic passenger module and enable it in Nginx configuration. I will not repeat the whole process to keep the answer short but the general approach is this:
Get passenger module for Nginx source code.
Get Nginx source code for the version you have installed.
Compile Nginx with the passenger module:
cd /path-to-nginx-source-dir
./configure --prefix=/opt/nginx \
--with-some-configure-flag \
--add-dynamic-module=$(passenger-config --nginx-addon-dir) \
--add-module=/path-to-some-other-nginx-module
make
sudo make install
Make Nginx to load the module by adding this line to nginx.conf:
load_module modules/ngx_http_passenger_module.so;
Personally, I'd rather chosen the 'nginx-behind-nginx' approach than building the module. That is you have Nginx any version you like but it runs as a reverse proxy for another Nginx with passenger enabled (Passenger Standalone). With an unnoticeable penalty to performance this will be much easier to maintain (install, update). See this guide for details.

Ambari Server on Ubuntu 18.04: Response 403 while pulling Apache Ambari repository

I'm a newbie to Ubuntu. Now I'm trying to install Apache Ambari Server on Ubuntu 18.04.
I've successfully completed steps like installing jdk, turning off firewall, stopping SELinux. However I came up against an error when running the command to pull Apache repo. The command is:
$ wget -O /etc/apt/sources.list.d/ambari.list http://public-repo-1.hortonworks.com/ambari/ubuntu18/2.x/updates/2.7.5.0/ambari.list
The error was some HTTP response failure with code 403: Forbidden. I also try another version for ambari (like 2.6.2.0) and even different link for the repo but still the error happened.
So anyone could tell me what is the problem and how to fix it? Thanks so much for helping me out!
I am trying to install ambari on CentOs. I found out that one of the providers cloudera has stopped freely offering the ambari installation starting from this year. You can take a look here. P.S. hortonworks should be under cloudera so that might be the reason why you cannot download the public image.
One of the solutions would be to follow the guide from Apache Ambari official website, which is over here. You can follow the installation guide there for your desired Ambari version on Ubuntu.
For example, if you are going to install Apache Ambari with version 2.7.5, you will find this page useful.
Below is based on my understanding and the instructions described on the documentation but I have not try it yet since my working environment is on CentOS.
Take installation on Ubuntu for instance
Step 1: Install the prerequisites
According to this answer, at least you might need to install python, node and npm on your machine.
Step 2: Build the project using maven
# download ambari
wget https://www-eu.apache.org/dist/ambari/ambari-2.7.5/apache-ambari-2.7.5-src.tar.gz (use the suggested mirror from above)
tar xfvz apache-ambari-2.7.5-src.tar.gz
cd apache-ambari-2.7.5-src
mvn versions:set -DnewVersion=2.7.5.0.0
pushd ambari-metrics
mvn versions:set -DnewVersion=2.7.5.0.0
popd
# build ambari
mvn -B clean install jdeb:jdeb -DnewVersion=2.7.5.0.0 -DbuildNumber=5895e4ed6b30a2da8a90fee2403b6cab91d19972 -DskipTests -Dpython.ver="python >= 2.6"
Step 3: Install Ambari Server
apt-get install ./ambari-server*.deb
Step 4: Setup and Start Ambari Server
# setup your server
ambari-server setup
# start your server
ambari-server start
Step 5: Install and Start Ambari Agent on All Hosts
Note: This step needs to be run on all hosts that will be managed by Ambari.
apt-get install ./ambari-agent*.deb
Edit /etc/ambari-agent/ambari.ini
...
[server]
hostname=localhost
...
Make sure hostname under the [server] section points to the actual Ambari Server host, rather than "localhost".
# start ambari agent
ambari-agent start

Centos7: Can't install nginx (or epel)

I have a clean install of Centos 7 on a RaspberryPi3b+. I am trying to install nginx and am running into problems with each approach.
Most of the research I've done points to installing epel, and then installing nginx. When I run yum install epel-release, I get the error:
No package epel-release available.
Error: Nothing to do.
Some searching led me to wget it directly from fedora. I was able do that. I then ran rpm -ivh epel-release-latest-7.noarch.rpm successfully and then tried yum install nginx. That gave me this long error:
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot retrieve metalink for repository: epel/armhfp. Please verify its path and try again
So, I found another method that doesn't require epel. I created a .repo file for nginx at /etc/yum.repos.d/nginx.repo, and added:
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
I ran yum repolist and got an error:
http://nginx.org/packages/centos/7/armhfp/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
For laughs, I tried installing nginx anyway and got an error similar to the long one above that the nginx repo failed.
Finally, I tried going to nginx.org and finding the correct link and hard-coding it in the repo file. That didn't work either, and now I am well and truly stuck.

Amazon EC2 - PHP GD image library

I've got a brand new install of WordPress setup and activated a custom-built theme along with a good amount of plugins. In the posts, I have built it so the user can create a post, upload an image as a thumbnail and it will automatically resize the image to a custom size set in my functions.php file.
All this has been working on my local end (MAMP) correctly but when I tried making everything work on our Amazon EC2 server, the images do not resize to the size set. They resize by actual code but do not resize the actual image and save it in the new size.
Apologies if the question/subject is completely non-sense but I have little to no experience with Amazon EC2 servers and I have been placed into a situation where the person in charge of all the work within EC2 had to leave the project.
I'm assuming that this has to do with the GD library not being installed.. I created a test page with phpinfo() and didn't see a GD area on the results page.
How would I go about installing the library on my Amazon EC2 server? I just learned how to connect to the server via Terminal and that's all I've got for now.. so you get an idea of how much I know about the subject.
I'm guessing you have some type of Linux installed, probably Ubuntu or CentOS.
Ubuntu: sudo apt-get install php5-gd
CentOS: sudo yum install php-gd
You probably have to restart Apache afterwards: service httpd restart or service apache2 restart -- the names differ from distribution to distribution.
Let me know if this works!
In my case, I was getting error like there is version conflict between different versions of php-common when I entered "yum install php-gd" so I checked my php version using "php -v" in shell and then installed the corresponding gd using "yum install php56-gd" because I had php 5.6 installed in my machine.
Hope someone will get help from this.
Cheers
to avoid compatibility problems first do:
php --version
to know your php version
the answer is something in the form PHP X.Y.Z
so you have to take X, Y and do:
sudo yum install phpXY-gd
for instance if php --version says PHP 5.5.26
you will do:
sudo yum install php55-gd
In my case of ec2 server running Amazon Linux 2 with php version 7.2.24, following was the sequence:
sudo yum install php-gd
But event after repeat server restart with
sudo systemctl restart httpd
it was not working unless I rebooted with
sudo reboot
In Amazon Linux, we have to add the following line to the etc/php.ini file
extension=gd.so
Step 1: Install the package using following command
sudo yum install php-gd
Step 2: Include the following line to the etc/php.ini file
extension=gd.so
If the line is commented, then uncomment it.
Step 3: Restart the httpd service
sudo service httpd restart

Resources