Skip to content


Category: Networking

Open command prompt – Run as Administrator and run the following commands,

net stop w32time
w32tm /config /syncfromflags:manual /manualpeerlist:””
net start w32time
w32tm /config /update
w32tm /resync /rediscover


Method 2:

You can configure using Local Group Policy in the member server, snapshot shows in details.

Setup in the local group policy , force update the policy (gpupdate /force) and restart the service – Windows Time.


Apache installation

Step 1 » Update the repositories.
[root@krizna ~]# yum check-update
Step 2 » After updating repository, issue the below command to install apache package.
[root@krizna ~]# yum install httpd
Step 3 » Now start the service and enable it at startup.
Command to start the service
[root@krizna ~]# systemctl start httpd.serviceCommand to enable at startup
[root@krizna ~]# systemctl enable httpd.service
Step 4 » By default, Apache will listen on port 80. you need to exclude from firewall.
you can simply exclude http service from firewall.
[root@krizna ~]# firewall-cmd --permanent --add-service http
Step 5 » Now restart firewall service.
[root@krizna ~]# systemctl restart firewalld.service
Step 6 » Apache installation is over . For testing, open http://serverip in your browser, you can see apache demo page like below.
install lamp server on centos 7

MySQL installation.

Step 7 » Start installing MariaDB, MySQL drop-in replacement.
[root@krizna ~]# yum install mariadb-server mariadb
Step 8 » Now start the service and enable it at startup.
Start the service
[root@krizna ~]# systemctl start mariadbEnable at startup
[root@krizna ~]# systemctl enable mariadb.service
Step 9 » Secure your DB installation. Type the below command and provide values.
[root@krizna ~]# mysql_secure_installation1. current password ( Leave blank and hit Enter ).
2. Enter new password.
3. Re Enter password.
and Hit enter for all the other options.

Step 10 » MariaDB installation is over. For testing, Check login into DB using the below command.
[root@krizna ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.37-MariaDB MariaDB Server
Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>

PHP installation.

Step 11 » Install PHP and other recommended packages.
[root@krizna ~]# yum install php php-mysqlAdditional packages are required if you would like to install phpmyadmin .
[root@krizna ~]# yum install php-gd php-pear php-mbstring php-pgsql
Step 12 » Now restart apache service.
[root@krizna ~]# systemctl restart httpd.service
Step 13 » For testing, Create a file phpinfo.php in /var/www/html/ ( Default root directory ) and add the below code.
<?php phpinfo(); ?>Now open http://serverIP/phpinfo.php in your browser. you will see PHP version and other configuration details in the page.

[root@linux-svr ~]# yum install wget
Loaded plugins: fastestmirror

You have enabled checking of packages via GPG keys. This is a good thing.
However, you do not have any GPG public keys installed. You need to download
the keys for packages you wish to install and install them.
You can do that by running the command:
rpm –import public.gpg.key
Alternatively you can specify the url to the key you would like to use
for a repository in the ‘gpgkey’ option in a repository section and yum
will install it for you.

For more information contact your distribution or package provider.



rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY*