Saturday, May 25, 2019

How to install Cpanel in Centos 7 server | Install CMS in Google Cloud Compute Engine

In this article I'll show how you can install WHM Cpanel in google cloud compute engine server or on any centos 7 server.Before starting you need a server if you have fresh one its good but if you don't have then you need to create one read this ( how to create server) .Without wasting time lets start.Note for installation Centos 7 OS should be install on your server.

1.Install WHM on VM instance.
a) Go to vm instance area click on SSH button. A command window will be open. type here sudo su root Press Enter then type CD  Press Enter and Paste below all code and press enter.

yum install perl ; yum install curl ; curl -o latest -L ; systemctl stop NetworkManager.service ; systemctl disable NetworkManager.service ; systemctl enable network.service ; systemctl start network.service ; sh latest ;

After pasting it will take 20 to 30 minute ot install sitback and relax after installation click on arrow this will open your ip in your browser. and type your server ip in which you install  WHM cpanel http://your_ip:2087 and 2087 for WHM login page.

Now your WHM cpanel had been install on your server .After installation you need to inside setup for Cpanel in WHM. Login WHM create Cpanel for detail inside setup watch this video from 8:34 to end.

How to connect Blogger Domain with Google Cloud DNS | Naked Domain not working with blogger Solution

In this article I will show you how you can connect your blogger custom domain with google cloud and if your naked domain is not working than you must try this its 101% working method.If you are new then I want to tell your for this you need Google Cloud Platform account .you can see how to sign up here.For working Naked Domain maybe you have tried these two method with domain registrar I was try them with Godaddy but these methods were not work for me.So sorry if these are working for you but this method is best using google products.

Domain Forwarding Method with Godaddy.

Sub Domain Forwarding Method with Godaddy.

1.How to Forward Naked Domain to WWW.
a)Ad a subdomain(www) record in your GCP domain zone.go to GCP dashboard select Network<Cloud DNS

b) Select your Domain Zone from Cloud DNS

c) Click on Add record set button.
d) Add www in DNS Name field second select Resource Record Type  as CNAME  third in Canonical Name field type your domain name like my if you setting up for blogger type

2. Download your DNS Setting file in Blogger.
a) Click on Settings<Basics<Edit from Right side from you domain .

b)Click on DNS settings file option Note for redirecting naked domain check on redirect option it will redirect your naked domain to www.Now click on save button.
3.Add IP to Domain Zone.
a) After downloading file.Open it and copy ip and CNAME text.
b)Go to Network Services<Cloud DNS<Select domain<click pencil icon
c) Click on Add Item button 3 times for adding 3 more fields total fields should be 4
d)Paste Four lines of IP one by one in these fields and click on save button.
e) Add CNAME text ( and save
After save it will take 10 to 20 minute.But before doing all this stuff your domain should be connect with GCP if you don't know how to connect read this article (How To Link Godaddy Domain Name With Google Cloud Platform).Thanks for reading.

Friday, May 24, 2019

How to install apache in compute engine | Apache installation on Centos 7 server

In previous article I was teach how you can link your domain with GCP from your can read this article here (how to link your domain).In this one I will show you how you can create vm instance for installing your website.Basically vm instance is virtual computer that you will reserve for your website in GCP. You will select Memory Ram ,Storage type,Operating System, Location of your computer stuff like that.It will run 24 hours therefore your site will be accessible for all your visitor  at any time and in replace google will charge from your free trial balance of $300.

1.Create VM instance 
a) Click on Compute engine.

b) Click on Create instance button.

c) Chose your vm instance name.It should be in lower cases and without spaces .
d) Select your vm instance location where it will be located.You should choose which is near to your visitors to reach easily for example my visitors come from US I will choose us location.
e) Choose your Memory Ram of your vm instance Note you should choose your memory ram according to your visitors rush otherwise choose low ram it will be low cost.
f ) Click on change button and  select Operating System type I will choose Centos 7  

G) Select Storage type I recommend you choose SSD because its very fast than HDD storage and chose your storage size.
H) Allow http and https requests for your visitors select both box it will allow your visitors access with http and https .
i)  Click on Create button now VMinstance had been create.

2.Link your VMinstance IP with your domain.

In this step we will reserve our ip for vm instance.It will give you same IP after restart your vm instance otherwise on every restart you need to change your IP from domain zone.

a) Go to VPC networks>External IP addresses.

b) Click on arrow and select statistics 
c) Give any name and click on reserve options it will reserve your ip

d) After reserve your IP you need to copy this ip and paste it into your domain zone(what is domain zone your can learn here) and read step 3.
e) After pasting your IP click on save button

3.Install Apache on your VMinstance for running your website.

a) Click on arrow for opening SSH window .
b) Type this for root login after $ sign.

c) After this copy below code and paste it after $ sign and press enter it will ask some time Yes or No .Here you need to type Y and press enter it will take 4 to 5 minute to install apache on vm instance.

yum install ; yum install ; yum install yum-utils ; yum-config-manager --enable remi-php70 [Install PHP 7.0] ; sudo yum install certbot python2-certbot-apache ; yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo ; sudo yum install php-xml ; sudo rpm -Uvh ; sudo yum -y install mysql-community-server ; sudo /usr/bin/systemctl start mysqld ; sudo mysql_secure_installation ; sudo yum -y update ; sudo yum -y install httpd ; sudo firewall-cmd --permanent --add-port=80/tcp ; sudo firewall-cmd --permanent --add-port=443/tcp ; sudo firewall-cmd --reload ; sudo systemctl restart httpd.service ; sudo systemctl enable httpd ; sudo systemctl status httpd ; firewall-cmd --zone=public --add-port=10000/tcp --permanent firewall-cmd --reload ; yum install perl ; sudo yum install mod_ssl ; sudo chmod -R 777 /var/www/html/ ; chcon -R -t httpd_sys_content_rw_t /var/www/html/ ; sudo yum install at ; sudo yum install epel-release ; sudo yum install phpmyadmin ; sudo chmod -R 777 /etc/httpd/conf/httpd.conf ; sudo chmod 777 /etc/httpd/conf.d/phpMyAdmin.conf ; sudo yum install php-mbstring ; sudo yum install php-xml ; sudo chmod -R 777 /var/www/ ; sudo chmod -R 777 /etc/pki/tls/private ; sudo chmod -R 777 /etc/pki/tls/certs ; yum install php-pdo ; yum install php-intl ; yum install php-curl ; sudo mysql -u root -p

d)After installing apache your vminstance had been ready to run website now you need to upload your website files.
Next Question

1.How to upload website in vm instance.
2.How to create Database for your website.

Wednesday, May 22, 2019

How to Link any Domain with Google Cloud Platform | How to DNS setup in Cloud DNS

In this article I will show how you can easily link your domain with GCP hosting. For this purpose I will use godaddy domain .So first of all you need a domain if you don't have you can buy from Godaddy in my openion godaddy is best.

Go to GCP dashboard  and click on "Network services>Cloud DNS"

Here Click on "Create Zone"button  to create zone for your domain.

a) In "zone name" field you should put your domain with out extensions e.g its zone name should be example.
b) In "DNS name" filed put your domain without subdomain(WWW) e.g
c) Click on Create button to finish zone creation.
Redirect your naked domain to for this you need to add a record set with CNAME in your domain zone.

a) Click on Add record button.

b) Put WWW in DNS name field.
c) In Resource Record Type click on little arrow and select CNAME.
d) In Canonical name field put your main domain. like
f) Click on create button.

After adding record set you need to zone you need to put your NS record in your registrar .
a)Copy your NS records 
b) Go to your registrar select DNS settings and paste NS records.

c) Select custom and paste your Ns records here.
Click on Save button this will save your DNS settings .Note this seconds can take 24 hours but most of the times its take 1 to 2 hours.After this you need to link your VMinstance IP address in domain zone it will link your domain to your website.
Next Questions
How to install website on VMinstance Compute Engine in GCP.