日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux安装libfastcommon+fastdfs+nginx

發布時間:2025/3/19 linux 19 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux安装libfastcommon+fastdfs+nginx 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

安裝依賴包

yum install git gcc gcc-c++ make automake autoconf libtool pcre pcre-devel zlib zlib-devel openssl-devel -y

安裝libfastcommon

cd /opt/fastdfs //下載 git clone https://github.com/happyfish100/libfastcommon.git --depth 1 cd libfastcommon //安裝 ./make.sh && ./make.sh install

安裝fastdfs

cd /opt/fastdfs //下載 git clone https://github.com/happyfish100/fastdfs.git --depth 1 cd fastdfs //安裝 ./make.sh && ./make.sh install

配置tracker

/etc/fdfs cp tracker.conf.sample tracker.conf vim tracker.conf

修改base_path = /fastdfs/tracker

# 創建上面配置的tracker目錄 mkdir -p /fastdfs/tracker# 啟動tracker /etc/init.d/fdfs_trackerd start #查看啟動情況 [root@192 fdfs]# netstat -tunlp | grep fdfs tcp 0 0 0.0.0.0:22122 0.0.0.0:* LISTEN 11333/fdfs_trackerd#設置tracker開機啟動 vim /etc/rc.d/rc.local 加入這句: /etc/init.d/fdfs_trackerd start

配置storage

cd /etc/fdfs cp storage.conf.sample storage.conf vim storage.conf 做如下修改: base_path = /fastdfs/storage store_path0 = /fastdfs/file tracker_server = 192.168.25.131:22122 #此處IP根據實際填寫#創建需要的storage目錄 mkdir -p /fastdfs/storage mkdir -p /fastdfs/file#啟動storage /etc/init.d/fdfs_storaged start#設置storage開機啟動: vim /etc/rc.d/rc.local 加入這行: /etc/init.d/fdfs_storaged start

上傳測試

修改客戶端配置文件

cd /etc/fdfs cp /etc/fdfs/client.conf.sample /etc/fdfs/client.conf vim client.conf

做如下修改

base_path = /fastdfs/client tracker_server = 192.168.25.131:22122 #IP根據實際填寫

創建一個txt文件,并上傳

[root@localhost fdfs]# echo "hello">a.txt [root@localhost fdfs]# /usr/bin/fdfs_upload_file /etc/fdfs/client.conf a.txt group1/M00/00/00/wKgZg187jumAUztfAAAABjY6MCA472.txt #這串返回值后面測試要用,記下來

安裝nginx

安裝

cd /opt wget http://nginx.org/download/nginx-1.14.0.tar.gz #下載 tar -zxf nginx-1.14.0.tar.gz #解壓 cd nginx-1.14.1/ #安裝到/usr/local/nginx ./configure --prefix=/usr/local/nginx make make install

配置

cd /usr/local/nginx/conf vim nginx.conf

加上紅框部分:

啟動或重啟nginx

cd ../sbin/ ./nginx 或者 ./nginx -s reload

測試下載

打開瀏覽器,輸入地址:

http://192.168.25.131/group1/M00/00/00/wKgZg187jumAUztfAAAABjY6MCA472.txt

可以正常訪問,則說明安裝成功

與50位技術專家面對面20年技術見證,附贈技術全景圖

總結

以上是生活随笔為你收集整理的linux安装libfastcommon+fastdfs+nginx的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。