当前位置:网站首页>Alibaba cloud ECS uses cloudfs4oss to mount OSS

Alibaba cloud ECS uses cloudfs4oss to mount OSS

2022-07-05 03:59:00 Source village

cloudfs4oss Can help us to OSS Mount directly to ECS On , It's as easy to access as a directory . Usage method :

1、 Install the configuration environment :

yum install libcurl libcurl-devel openssl-devel fuse fuse-libs fuse-devel libxml2-develoss-cn-qingdao- internal .aliyuncs.com 

2、 download cloudfs4oss File and extract ( This can be purchased in alicloud's cloud market ( Free of charge ) There will also be a link to download ), Decompress and then go to cloudfs4oss Catalog :

wget http: //blog.cloudtalkers.com/w ... ar.gz
tar -zxf CloudFS_Centos64_0273.tar.gz
yum install libunwind-devel
cd CloudFS_Centos64

3、 install cloudfs4oss, There are default and custom installations

  • The default installation is cloudfs The installation directory of is /usr/local/cloudfs,oss The mount directory of is /mnt/oss, The operation is as follows :./CloudFS_Install.sh
  • Custom installation ( I personally suggest that , convenient ), If it is wordpress Program , It can be mounted directly to /home/wwwroot/ Website directory /wp-content/uploads, The operation is as follows :
./CloudFS_Install.sh INSTALL_DIR=/usr/local/cloudfs MOUNT_POINT=/home/wwwroot/ Website directory /wp-content/uploads

What needs to be noted here is : Website directory /wp-content/uploads Medium uploads Directory must be empty , Otherwise it will go wrong !

4、 Mount and configure cloudfs.conf file , Generally in /usr/local/cloudfs/conf Next , The specific configuration is as follows : Insert picture description here
According to their own OSS You can configure the situation .

5、 function cloudfs4oss, Input :

service cloudfs start

Then you can go to Wordpress Add files to your multimedia , And then OSS Let's see if there are any files just added , If there is one, it means success .

原网站

版权声明
本文为[Source village]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207050341034951.html