sudo apt-get install automake autotools-dev \fuse g++ git libcurl4-gnutls-dev libfuse-dev \libssl-dev libxml2-dev make pkg-config
創(chuàng)新互聯(lián)公司專(zhuān)注于企業(yè)全網(wǎng)營(yíng)銷(xiāo)推廣、網(wǎng)站重做改版、永川網(wǎng)站定制設(shè)計(jì)、自適應(yīng)品牌網(wǎng)站建設(shè)、H5技術(shù)、成都做商城網(wǎng)站、集團(tuán)公司官網(wǎng)建設(shè)、外貿(mào)網(wǎng)站建設(shè)、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁(yè)設(shè)計(jì)等建站業(yè)務(wù),價(jià)格優(yōu)惠性價(jià)比高,為永川等各大城市提供網(wǎng)站開(kāi)發(fā)制作服務(wù)。
git clone https://github.com/s3fs-fuse/s3fs-fuse.git
cd s3fs-fuse
sudo ./autogen.sh
sudo ./configure
sudo make
sudo make install
sudo vim /etc/passwd-s3fs
key format: AKIAJExxxxxxxxxxxxxxxxxxxxxxx:Gcdpi2axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sudo chmod 640 /etc/passwd-s3fs
sudo mkdir -p /s3/folder-name
sudo s3fs -o allow_other bucket-name /s3/folder-name
中國(guó)區(qū)AWS S3掛載路徑不同:
sudo s3fs -o allow_other bucket-name /s3/folder-name -o url=https://s3.cn-north-1.amazonaws.com.cn
取消掛載:
sudo umount -l /s3/folder-name
寫(xiě)入/etc/fstab 實(shí)現(xiàn)開(kāi)機(jī)自動(dòng)掛載
sudo vim /etc/fstab
bucket-name /s3/folder-name fuse.s3fs _netdev,allow_other 0 0
參考文檔:http://www.whiteboardcoder.com/2017/12/how-to-mount-s3-bucket-as-hard-drive.html