Issue with hosting website on google cloud - google-cloud-storage

Hosted website on google cloud, the PHP pages dont open in browser instead the webpage download, html pages work fine
we had a website hosted on hostinger it worked fine there, i have pointed my cname to google setup a bucket and all & uploaded files on public html from hostinger to this bucket
How to i get my php website to work on google cloud

You need to deploy LAMP stack on your GCP instance. Here are the steps to setup LAMP stack:
Install Apache and PHP on your instance
Debian 8 and Ubuntu 14
sudo apt-get update
sudo apt-get install apache2 php5 libapache2-mod-php5
Debian 9 and Ubuntu 16/17
sudo apt-get update
sudo apt-get install apache2 php libapache2-mod-php
CentOS 6 and 7
Install Apache and PHP:
sudo yum check-update
sudo yum -y install httpd php
Start the Apache service:
sudo service httpd start
Optional: Set the Apache service to start automatically:
sudo chkconfig httpd on
For complete documentation: Setting up LAMP on Compute Engine

Related

How to uninstall collectd completely from ubuntu 16.04 server

I had collectd-5.5 installed on my ubuntu-16.04 server and I tried to install the newer version as described in collectd download page..
it seems that it didn't work, so now I'm trying to uninstall collectd from my server completely, to install a fresh version again.
To uninstall, I've run below commands:
sudo apt-get remove collectd
sudo apt-get remove --auto-remove collectd
sudo apt-get purge collectd
sudo apt-get purge --auto-remove collectd
now when I delete the /var/lib/collectd folder, it gets created immediately with the rrd folder in it.
collectd command and service do not exist anymore, but it seems that it's not removed from my server completely, or maybe I have another version of collectd running?
how can I check?
did I miss something in the uninstalling process?
Thanks.
as #Lutz mentioned in question comments, the collectd process was running after the uninstall, so I had to kill it manually, restarting the server would do the work though, but in my case, I was working on a production server, so I decided to kill it this way:
sudo killall collectd

How to install Ambari in Hortonworks HDP?

I am trying to install HortonWorks HDP manually on a CentOS box. I am following the instructions given on this page http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.2/bk_installing_manually_book/content/meet-min-system-requirements.html
I do not see any instruction on installing Apache Ambari. How to do it?
The instructions that you are looking at are for installing HDP manually, that means installing HDP without Ambari. You cannot have a manual installation with Ambari since Ambari is a tool for provisioning, managing and monitoring Hadoop clusters. If the cluster is configured manually it cannot be managed or monitored by Ambari.
If you do intend on having Ambari provision the cluster for you and the machine has access to the internet you can run the following commands:
For CentOS6
sudo wget -nv http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.1.2/ambari.repo -O /etc/yum.repos.d/ambari.repo
sudo yum install ambari-server
sudo ambari-server setup
For CentOS7
sudo wget -nv http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.1.2/ambari.repo -O /etc/yum.repos.d/ambari.repo
sudo yum install ambari-server
sudo ambari-server setup
If the machine doesn't have access to the internet or if you need further information see the official HDP documentation for installation guidance.

Mongorestore on AWS EC2 MEAN by Bitnami

I have and issue with mongodb that was preinstalled on MEAN server pre-configuration.
I want to use mongorestore tool to restore my database from local machine on AWS server. As i know so far this tools have an issue (https://jira.mongodb.org/browse/TOOLS-620) so i decided to downgrade version on mongo from 3.0 to 2.6. Unfortunately on Bitnami the instalation is pretty strange and i can't unistall mongo in standard way.
sudo apt-get purge mongodb mongodb-clients mongodb-server mongodb-dev
sudo apt-get purge mongodb-10gen
sudo apt-get autoremove
The same problem i have with trying to replace tools with older version:
sudo apt-get purge mongodb-org-tools
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install -y mongodb-org-tools=2.6.0
System just doesn't recognize this names. Does anyone here have any experience with bitnami mean stack for AWS EC2, and can help me with replacing tools or (the best sollution for me) version of mongo to 2.6?
Thanks
Marcin
Bitnami developer here.
Bitnami stacks are self contained so you won't be able to use apt-get to downgrade one component.
If you are using a native installer the best you can do is asking for an old version of the mean stack that shipped mongo 2.6.

how to install openfire on cpanel (my domain)

I have installed openfire on my pc and I have spark client also .Its working fine when server/host : is localhost .
But How do I install the same on my domain www.example.com/test/ .I transferred the entire zip file and I did not find any set up/html/php file to run setup on my cpanel hosting folder.
How do I install openfire on my domain ? I really appreciate any help.Thanks in Advance.
Since you are using shared hosting (Cpanel) you need to have SSH access to your server. You can easily enable SSH for your shared hosting server. How to enable SSH/Shell Access in cPanel might help you to do so else use Google it.
Installing and configuring open fire
Login to your server via SSH in terminal
ssh username_of_server#ip_adress_of_server
Run in terminal
sudo apt-get update
sudo apt-get upgrade
Install JRE ( if you didn't have already because Openfire is in JAVA)
sudo apt-get install openjdk-7-jre
Now you have enviornment of java and openfire. Following tutorial Installing Openfire heading onwards .......
I hope it helps you to kick off.

How to find pgAdminIII GUI in Ubuntu

I got a machine where the OS is Ubuntu and already PostgreSQL has been installed. And also the credentials being provided
User Name: somename
Password: somepassword
Basically I work in Windows 8 environment and after installation of PostgreSQL, we can find it from Start charms as
How to do the same from Ubuntu?
In Ubuntu, you can install PgAdmin3 using following console command:
sudo apt-get install pgadmin3
After you've done that, you can start it from the console as pgadmin3 or you can find it in Unity by pressing Windows key and typing pgadmin.
If your Ubuntu is older than 12.04, standard provided PgAdmin may be too old to be usable and you may have to install pgadmin3 from alternative Ubuntu repository. For example, when I need to install it on Ubuntu 10.10, I do this:
sudo apt-add-repository ppa:rhonda/pgadmin3
sudo apt-get update
sudo apt-get install pgadmin3