Cento 安装配置FastFDS

简介: unzip -x libfastcommon-master.zip ./make.sh ./make.sh install /usr/include/fastcommon cd FastDFS .
unzip -x libfastcommon-master.zip
./make.sh 
./make.sh install 
/usr/include/fastcommon

cd FastDFS
./make.sh 
./make.sh install

file /usr/local/bin/fdfs_trackerd does not exist!
cp init.d/fdfs_trackerd /usr/local/bin/  
[root@ser-tracker-230 FastDFS]# /etc/init.d/fdfs_trackerd start
file /usr/local/bin/stop.sh does not exist!




cp *.sh /usr/local/bin/

#创建fastdfs用户
/usr/sbin/groupadd fastdfs
/usr/sbin/useradd -g fastdfs fastdfs

./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module

:%s/\/usr\/local\/bin/\/usr\/bin/g


ln -s /data0/data /home/fastdfs/storage/data/M00


scp /usr/local/nginx/conf/vhosts/fdfs.conf root@192.8.2.234:/usr/local/nginx/conf/vhosts/


ln -s /data0/data /home/fastdfs/storage/data/M00

group1/M00/00/00/oYYBAFRTYVCASSwnAAA9xXln_4s789.jpg

group1/M00/00/00/oYYBAFRTYZOAGGcnAAQJ2UjNiTU288.jpg

group1/M00/00/00/oYYBAFRTYZyASSgvAAlVE-DOvkk681.jpg






server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 300m;
sendfile        on;
tcp_nopush      on;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 16k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;


gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;

proxy_cache_path /var/cache/nginx/proxy_cache levels=1:2 keys_zone=http-cache:500m max_size=10g inactive=30d;
proxy_temp_path /var/cache/nginx/proxy_cache/tmp;



location ~ /purge(/.*) {
    allow              127.0.0.1;
    deny               all;
    proxy_cache_purge  tmpcache $1$is_args$args;
}



groupadd fastdfs      
useradd -g fastdfs -s /sbin/nologin -M fastdfs

mkdir -p /home/fastdfs
chown -R fastdfs:fastdfs /home/fastdfs

/usr/bin/fdfs_trackerd /etc/fdfs/conf/tracker.conf restart

/usr/bin/fdfs_storaged /etc/fdfs/conf/storage.conf restart


yum -y install gcc gcc-c++ zlib zlib-devel


groupadd www      
useradd -g www -s /sbin/nologin -M www

wget http://luajit.org/download/LuaJIT-2.0.3.tar.gz
wget http://openresty.org/download/ngx_openresty-1.7.2.1.tar.gz | tar xz



# 编译 安装
cd ngx_openresty-1.7.2.1
./configure
make && make install

./configure  \
--with-http_lua_module \
--with-jemalloc \
--user=www --group=www \
--with-http_lua_module \
--with-luajit-inc=/usr/local/include/luajit-2.0 \
--with-luajit-lib=/usr/local/lib/ \
--add-module=/home/software/fastdfs-nginx-module-master/src \
--add-module=/home/software/nginx-gridfs-master \
&& make && make install \
&& echo "OK" || echo "Failed"





./configure  \
--with-http_lua_module \
--with-jemalloc \
--user=www --group=www \
--with-http_lua_module \
--with-luajit-inc=/usr/local/include/luajit-2.0 \
--with-luajit-lib=/usr/local/lib/ \
--add-module=/root/software/ngx_cache_purge-master \





server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 300m;
sendfile        on;
tcp_nopushon;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 16k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 128k;
proxy_temp_file_write_size 128k;
#设置缓存存储路径、存储方式、分配内存大小、磁盘最大空间、缓存期限
proxy_cache_path /var/cache/nginx/proxy_cache levels=1:2 keys_zone=http-cache:500m max_size=10g inactive=30d;
proxy_temp_path /var/cache/nginx/proxy_cache/tmp;





proxy_next_upstream http_502 http_504 error timeout invalid_header;
proxy_cache http-cache;
proxy_cache_valid  200 304 12h;
proxy_cache_key $uri$is_args$args;
proxy_pass http://fdfs_group1;
expires 30d;









/root/software/ngx_cache_purge-master





# 更改脚本权限
chmod a+x /etc/init.d/nginx
chkconfig --add nginx && chkconfig nginx on

--------------------------------------------
在启动nginx时会出现,sbin/nginx: error while loading 
shared libraries: libluajit-5.1.so.2:   cannot open shared object file: 
No such file or directory   这个的错误信息,导致nginx无法启动
# 解决方法:
echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf
/sbin/ldconfig





mkdir -p /data0
mkdir -p /home/fastdfs/storage/data/M00
ln -s /data0/data /home/fastdfs/storage/data/M00
ln -s /data0/data /home/fastdfs/storage/data/M00


cat fastdfs_client.ini >> /etc/php.ini


http://www.linuxidc.com/Linux/2014-10/107577p2.htm



curl -i http://127.0.0.1/group1/M00/00/00/wKgBCFRjKZeANqfTAAAADFmwwCQ735.txt

 

目录
相关文章
|
4月前
服务器安装步骤(部分)
服务器安装步骤(部分)
38 0
|
Kubernetes 监控 数据可视化
K8S超级完整安装配置
K8S超级完整安装配置
1750 0
K8S超级完整安装配置
|
Python Windows
anaconda安装配置教程
anaconda安装配置教程
1889 0
anaconda安装配置教程
|
Web App开发 监控 PHP
lnmp安装,zabbix源码安装安装教程
lnmp源码安装,zabbix源码安装,mysql基础
1889 0
|
应用服务中间件 开发工具
安装配置Shibboleth
0.前言 本文介绍了如何搭建Shibboleth,实现Shibboleth+Ldap的SSO解决方案 1.什么是Shibboleth Shibboleth是一个基于标准的,实现组织内部或跨组织的网页单点登录的开源软件包。
6727 0
|
测试技术 Apache