Hi Dears,
In this article, we will see Installation of AWS CLI and S3FS
We can use multiple AWS services by using AWSCLI.
It’s a command line interface which can manage S3 to copy, list, move files from local filesystem to Bucket as one of the service.
1 2 3 4 5 6 7 8 9 10 11 |
Wget "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" unzip awscli-exe-linux-x86_64.zip" sudo ./aws/install – Need to run with root user oracle@lnx01.oracle.com:/u05 [UNKNOWN] $ aws –version aws-cli/2.0.58 Python/3.7.3 Linux/3.10.0-1127.13.1.el7.x86_64 exe/x86_64.oracle.7 E.g. aws s3 cp /home/oracle/TEST s3://test-bucket –recursive aws s3 ls s3://test-bucket/FULL_BKP/ |
Configure Bucket into database:
1 2 3 4 5 6 |
$ aws configure AWS Access Key ID [None]: AWS Secret Access Key [None]: Default region name [None]: Default output format [None]: |
Configure s3fs (FUSE)
As a local filesystem we can mount S3 Bucket on our instance.
We can use simple commands like ls, cp , mv commands to run locally as a system commands.
S3FS is a fuse filesystem which is backed by AWS.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Need to run as Root user # yum update # yum install automake fuse fuse-devel gcc-c++ git libcurl-devel libxml2-devel make openssl-devel # git clone https://github.com/s3fs-fuse/s3fs-fuse.git # cd s3fs-fuse # ./autogen.sh # ./configure # make # make install # vi /etc/passwd-s3 AWS Access Key ID [None]: AWS Secret Access Key [None] # chmod 640 passwd-s3 # which s3fs |
Create An IAM role to S3 bucket , attach IAM role to particular instance & mount S3 bucket using IAM role
1 2 3 4 5 6 |
# cp /etc/fuse.conf fuse.conf_bkp # vi /etc/fuse.conf user_allow_other (Enable the parameter) # s3fs <bucketname> <filesystem name> -o allow_others S3fs test-backup /u05/s3_bucket –o allow_other # df –Ph |
Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates
KTEXPERTS is always active on below social media platforms.
Facebook : https://www.facebook.com/ktexperts/
LinkedIn : https://www.linkedin.com/company/ktexperts/
Twitter : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts