Last active
August 9, 2017 13:41
-
-
Save kotauchisunsun/c59001a40d2750261ad38f2426782133 to your computer and use it in GitHub Desktop.
コマンド1つで作れる!かんたん自宅Amazon S3互換環境! ref: http://qiita.com/kotauchisunsun/items/c870bb65cfa12edcce13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get install docker.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo docker run --rm -p 8080:9000 -it \ | |
-e MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE \ | |
-e MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY \ | |
minio/minio server /export |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo docker run --rm -p 8080:9000 -it -e MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE -e MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY minio/minio server /export | |
Created minio configuration file successfully at /root/.minio | |
Endpoint: http://172.17.0.2:9000 http://127.0.0.1:9000 | |
AccessKey: AKIAIOSFODNN7EXAMPLE | |
SecretKey: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY | |
Browser Access: | |
http://172.17.0.2:9000 http://127.0.0.1:9000 | |
Command-line Access: https://docs.minio.io/docs/minio-client-quickstart-guide | |
$ mc config host add myminio http://172.17.0.2:9000 AKIAIOSFODNN7EXAMPLE wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY | |
Object API (Amazon S3 compatible): | |
Go: https://docs.minio.io/docs/golang-client-quickstart-guide | |
Java: https://docs.minio.io/docs/java-client-quickstart-guide | |
Python: https://docs.minio.io/docs/python-client-quickstart-guide | |
JavaScript: https://docs.minio.io/docs/javascript-client-quickstart-guide | |
.NET: https://docs.minio.io/docs/dotnet-client-quickstart-guide | |
Drive Capacity: 87 GiB Free, 96 GiB Total |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get install python-pip | |
$ sudo pip install awscli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ aws configure | |
AWS Access Key ID [****************MPLE]: AKIAIOSFODNN7EXAMPLE | |
AWS Secret Access Key [****************EKEY]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY | |
Default region name [None]: | |
Default output format [None]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ aws --endpoint-url http://localhost:8080 s3 ls | |
2017-07-23 17:17:04 miniotest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ aws --endpoint-url http://localhost:8080 s3 mb s3://miniotest | |
make_bucket: miniotest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ aws --endpoint-url http://localhost:8080 s3 rb s3://miniotest | |
remove_bucket: miniotest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ aws --endpoint-url http://localhost:8080 s3 ls s3://miniotest | |
2017-07-23 17:19:00 0 testfile_from_local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ aws --endpoint-url http://localhost:8080 s3 cp testfile s3://miniotest/testfile_from_local | |
upload: ./testfile to s3://miniotest/testfile_from_local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ aws --endpoint-url http://localhost:8080 s3 cp s3://miniotest/testfile_from_local testfile_from_s3 | |
download: s3://miniotest/testfile_from_local to ./testfile_from_s3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ aws --endpoint-url http://localhost:8080 s3 rm s3://miniotest/testfile_from_local | |
delete: s3://miniotest/testfile_from_local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment