redis安装
包上传/home/application/docker/images/
docker load < /home/application/docker/images/redisarm.tar
docker tag xxxx redis:arm64v8
vi /etc/sysctl.conf
添加
vm.overcommit_memory=1
net.core.somaxconn= 1024
保存执行sysctl -p
准备redis.conf 打开最后一行注释
找到requirepass 行打开注释并设置密码为nczz2021@123
docker run -d --privileged=true --restart=always -p 6379:6379 -v /home/application/docker/redis/conf/redis.conf:/etc/redis/redis.conf -v /home/application/docker/redis:/data --name redis redis:arm64v8 /etc/redis/redis.conf --appendonly yes --requirepass "nczz2021@123"
rabbitmq安装
包上传/home/application/docker/images/
docker load < /home/application/docker/images/rabbitmqarm64v8.tar
docker tag xxxx rabbitmq:arm64v8
docker run -d --restart=always --privileged=true --name rabbitmqarm64v8 -e RABBITMQ_DEFAULT_USER=root -e RABBITMQ_DEFAULT_PASS=nczz2021@123 -p 5672:5672 -p 15672:15672 -v /home/application/docker/rabbitmq:/var/lib/rabbitmq rabbitmq:arm64v8
fastdfs安装
上传包libfastcommon-1.0.38.tar.gz、fastdfs-5.11.tar.gz到指定目录/home/application/fastdfs
tar -zxvf libfastcommon-1.0.38.tar.gz
cd libfastcommon-1.0.38/
./make.sh
./make.sh install
tar -zxvf fastdfs-5.11.tar.gz
cd fastdfs-5.11/
./make.sh
./make.sh install
进入conf目录
cp mime.types http.conf /etc/fdfs/
在fastdfs目录下创建文件夹 tracker、storage
cd /etc/fdfs/
配置tracker
cp tracker.conf.sample tracker.conf
vi tracker.conf
将内容修改为“base_path=/home/application/fastdfs/tracker”和“thread_stack_size = 128KB"
启动tracker
/usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf start
配置storage
创建两个存放数据的目录path0、path1
cd /etc/fdfs/
cp storage.conf.sample storage.conf
vi storage.conf
将内容修改为“base_path=/home/application/fastdfs/storage”、“store_path0=/XXXX/path0”、store_path1=/XXXX/path1 和“tracker_server=XX.XX.XX.XX:22122”(注意将store_path0上一行的path_cout改为2)
启动storage
/usr/bin/fdfs_storaged /etc/fdfs/storage.conf start
配置client
cd /etc/fdfs/
cp client.conf.sample client.conf
vi client.conf
将内容修改为“base_path=/home/application/fastdfs/tracker”和“tracker_server=XX.XX.XX.XX:22122”
安装和配置fastdfs-nginx-module
tar -zxvf fastdfs-nginx-module-v1.15.tar.gz
cd /XXX/fastdfs-nginx-module/src/
vi config
去掉所有路径中的local
cp /XXXX/fastdfs-nginx-module/src/mod_fastdfs.conf /etc/fdfs/
vi /etc/fdfs/mod_fastdfs.conf
base_path=/XXXX/fastdfs
tracker_server=XXXXXXX:22122
url_have_group_name = true
store_path0=
store_path1=
http.need_find_content_type=true
安装和配置Nginx
tar -zxvf nginx-1.15.2.tar.gz
cd nginx-1.15.2
./configure --prefix=/usr/local/nginx
或
./configure --prefix=/usr/local/nginx --add-module=/XXX/fastdfs-nginx-module/src/
make
make install
启动nginx
cd /usr/local/nginx/sbin/
./nginx -c /usr/local/nginx/conf/nginx.conf