Configuring the Environment
- Obtain the installation packages listed in OS and Software Requirements and upload the required packages to the corresponding directory (/usr/local/src is used as an example).
- Go to the /usr/local/src directory.
cd /usr/local/src
- Install the dependencies.
yum install git gcc gcc-c++ make automake autoconf libtool pcre pcre-devel zlib zlib-devel openssl-devel wget vim -y
- Install libfastcommon.
- Decompress the package and go to the installation path.
tar -zxvf libfastcommon-1.0.43.tar.gz cd libfastcommon-1.0.43
- Perform compilation and installation.
./make.sh && ./make.sh install
- Decompress the package and go to the installation path.
- Install FastDFS.
- Go to the /usr/local/src directory of the installation package.
cd /usr/local/src
- Decompress the package and go to the installation path.
tar -zxvf fastdfs-6.06.tar.gz cd fastdfs-6.06
- Perform compilation and installation.
./make.sh && ./make.sh install
- Copy related configuration files.
cp /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf cp /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf cp /etc/fdfs/client.conf.sample /etc/fdfs/client.conf # Client file used for testing cp /usr/local/src/fastdfs-6.06/conf/http.conf /etc/fdfs/ # For Nginx access cp /usr/local/src/fastdfs-6.06/conf/mime.types /etc/fdfs/ # For Nginx access
- Go to the /usr/local/src directory of the installation package.
- Install fastdfs-nginx-module.
- Go to the /usr/local/src directory of the installation package.
cd /usr/local/src
- Decompress the fastdfs-nginx-module installation package and copy the mod_fastdfs.conf file to the /etc/fdfs directory.
tar -zxvf fastdfs-nginx-module-1.22.tar.gz cp /usr/local/src/fastdfs-nginx-module-1.22/src/mod_fastdfs.conf /etc/fdfs
- Go to the /usr/local/src directory of the installation package.
- Install Nginx.
- Go to the /usr/local/src directory of the installation package.
cd /usr/local/src
- Obtain the installation package.
wget http://nginx.org/download/nginx-1.16.1.tar.gz
- Decompress the package and go to the installation path.
tar -zxvf nginx-1.16.1.tar.gz cd nginx-1.16.1/ ./configure --add-module=/usr/local/src/fastdfs-nginx-module-1.22/src/
- Perform compilation and installation.
make && make install
- Modify environment variables.
vim /etc/profile
PATH=$PATH:/usr/local/nginx/sbin
- Make the environment variables take effect.
source /etc/profile
- Go to the /usr/local/src directory of the installation package.
Parent topic: FastDFS 6.06 Deployment Guide (CentOS 7.6)