Centos 7 Step by Step installation guide
Hi, I'm a linux system administrator / DevOps / Cloud Administrator with more than 10 years of experience in the industry. I have shared my real life knowledge and experience here.
How to solve CSS Loading issue After implementing AWS ALB
=> Why this issue is happening : Whenever we use ALB to manage our website traffic like http or https first all request goes to ALB only and ALB manage all traffic, means user get https reply but ALB send only http request on backend server and we don't have https enabled on server so server not able to respond in same way because of this we started facing CSS not loading issue or broken site pages or "ERR_TOO_MANY_REDIRECTS"
define('WP_HOME','https://www.makelinuxinteresting.com/'); define('WP_SITEURL','https://www.makelinuxinteresting.com/'); // Below is the code which you have to implement in wp-config.php if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on';
Network File System (NFS) is a distributed file system protocol originally developed by Sun Microsystems (Sun) in 1984,It allows you to mount your local file systems over a network and remote hosts to interact with them as they are mounted locally on the same system. NFS, like many other protocols, builds on the Open Network Computing Remote Procedure Call (ONC RPC) system.
[root@server1 ~]# yum install nfs-utils
Step 2 : Start the nfs service
[root@server1 ~]# systemctl start nfs-server
systemctl status nfs-server
● nfs-server.service - NFS server and services
Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled)
Active: active (exited) since Tue 2021-06-22 23:12:52 EDT; 1s ago
Process: 9325 ExecStartPost=/bin/sh -c if systemctl -q is-active gssproxy; then systemctl reload gssproxy ; fi (code=exited, status=0/SUCCESS)
Process: 9309 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
Process: 9308 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
Main PID: 9309 (code=exited, status=0/SUCCESS)
Tasks: 0
CGroup: /system.slice/nfs-server.service
Jun 22 23:12:52 server1 systemd[1]: Starting NFS server and services...
Jun 22 23:12:52 server1 systemd[1]: Started NFS server and services.
[root@server1 ~]# systemctl enable nfs-server
Created symlink from /etc/systemd/system/multi-user.target.wants/nfs-server.service to /usr/lib/systemd/system/nfs-server.service.
Step 3 : Configure NFS Share
[root@server1 ~]# vi /etc/exports
/opt/SHAREDRIVE 192.168.43.230(rw,sync,no_root_squash)
Note: In above entry /opt/SHAREDRIVE is a folder which you
want to share over network and 192.168.43.230 is a client
IP to whom you want to share. if you want to share this
NFS drive to all system over network user * in place of IP.
: Now restart nfs service to take effect new configuration
[root@server1 ~]# systemctl restart nfs-server
: Now check your configuration
[root@server1 ~]# showmount -e localhost
Export list for localhost:
/opt/SHAREDRIVE 192.168.43.230
Step 4 : Mount NFS Share on client
Note: if nfs-utils package is not installed on client install it first
: Check available share
NirmalSingh@abcs-Air ~ % showmount -e 192.168.43.62
Exports list on 192.168.43.62:
/opt/SHAREDRIVE 192.168.43.230
[root@client1 ~]# mount -t nfs 192.168.43.62:/opt/SHAREDRIVE /mnt/
: Now Verify your NFS Mount
[root@client1 ~]# mount | grep nfs
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
192.168.43.62:/opt/SHAREDRIVE on /mnt type nfs4 (rw,relatime,vers=4.1,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.43.62,local_lock=none,addr=192.168.43.62)
[root@client1 ~]# vi /etc/fstab
192.168.43.62:/opt/SHAREDRIVE /mnt nfs defaults 0 0
: Now all configuration done you can use share to put data
and check on server.
If you have N number of servers and you have to change password on all server for a particular user like root or any other user you can user this script .
#!/bin/bash
for server in 192.168.1.50 192.168.1.51 192.168.1.53 192.168.1.55
do
echo -e "Changing password for Server: $server"
ssh root@$server 'echo "your_new_passwd" | passwd --stdin username'
done
# rsync -a Colibrism/ project/
# ls project
#cd project
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: .DS_Store
new file: api.php
new file: apps/.DS_Store
new file: apps/native/.DS_Store
new file: apps/native/ajax/.DS_Store
new file: apps/native/ajax/ads/content.php
new file: colibri-db.sql
new file: index.php
new file: nginx.conf
new file: robots.txt
new file: update.php
new file: upload/.DS_Store
new file: upload/default/avatar.png
new file: upload/default/cover.png
new file: web.config
git commit -m "Master branch data"
[master (root-commit) 23db1fc] add first file
15 files changed, 1471 insertions(+)
create mode 100644 .DS_Store
create mode 100755 api.php
create mode 100644 apps/.DS_Store
create mode 100644 apps/native/.DS_Store
create mode 100644 apps/native/ajax/.DS_Store
create mode 100644 apps/native/ajax/ads/content.php
create mode 100755 colibri-db.sql
create mode 100755 index.php
create mode 100644 nginx.conf
create mode 100755 robots.txt
create mode 100755 update.php
create mode 100644 upload/.DS_Store
create mode 100755 upload/default/avatar.png
create mode 100755 upload/default/cover.png
Warning: Permanently added the RSA host key for IP address '52.95.19.19' to the list of known hosts.
Enumerating objects: 23, done.
Counting objects: 100% (23/23), done.
Delta compression using up to 4 threads
Compressing objects: 100% (22/22), done.
Writing objects: 100% (23/23), 17.71 KiB | 2.95 MiB/s, done.
Total 23 (delta 4), reused 0 (delta 0), pack-reused 0
To ssh://git-codecommit.us-east-2.amazonaws.com/v1/repos/project
* [new branch] master -> master
Linux server hardening is the process of securing a Linux server by reducing its attack surface and mitigating security risks. The goal is ...