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

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

Related

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.

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.

Centos6 PHP7 Install SPL_Types

I am running CentOS 6 and am trying to install the SPL_Types extension for PHP7. I have php7 up and running however, any time I do pecl install SPL_Types,
I get massive compiler errors and can't find a way around. Ubuntu users can fix the issue by installing libpcre3-dev, but this is not a valid package on CentOS 6. I have verified that pcre and pcre-devel are installed and the latest version. Does anyone have a solution to this?
EDIT 1: A full log when I run the sudo pecl install SPL_Types command: http://pastebin.com/QG3mFjaf
I got it figured out. For those who wish to know, I had to use a third party source to compile and install the extension, then I had to edit my php.ini file manually to add the new module.
https://github.com/esminis/php_pecl_spl_types
then once you have it, run the commands:
phpize --clean
phpize
chmod +x configure
./configure --prefix=/usr
make install
Then, edit your php.ini file and under the dynamic modules section, add
extension=spl_types.so
Restart the httpd service by doing
sudo service httpd restart
Then verify the new module is loaded with phpinfo().

amazon ec2 micro RHEL: how to install nginx or others?

I chose micro free RHEL6.4 instance with EC2/Amazon, when I login, I found there no gcc, which I can yum install it. and there no nginx to yum install ?
I must install gcc and develop tools and download nginx source code to install ? oh ,the free is only 30Gb one month?
Check the installation page inside nginx website

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