Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
themeMidnight
# 安装依赖
yum -y install gcc gcc-c++ make libtool zlib zlib-devel pcre pcre-devel openssl openssl-devel
# 编译安装Nginx
tar zxf /root/itcast-iotp/nginx/nginx-1.16.1.tar.gz -C /tmp/
groupadd nginx && useradd -g nginx nginx -s /sbin/nologin
cd /tmp/nginx-1.16.1/
./configure --prefix=/home/nginx --with-http_dav_module --with-http_stub_status_module --with-http_addition_module --with-http_sub_module --with-http_flv_module --with-http_mp4_module --with-pcre --with-http_ssl_module --with-http_gzip_static_module --with-stream --user=nginx --group=nginx && make && make install
ln -s /home/nginx/sbin/nginx /usr/sbin/nginx

# 更改Nginx配置文件
/usr/bin/cp /root/itcast-iotp/nginx/nginx.conf /home/nginx/conf/
/usr/bin/cp -r /root/itcast-iotp/nginx/vhost /home/nginx/conf/

# 将前端文件移动到Nginx网页目录中
/usr/bin/cp -r /root/itcast-iotp/nginx/stu-html /home/nginx/html/
/usr/bin/cp -r /root/itcast-iotp/nginx/tch-html /home/nginx/html/
chown -R nginx.nginx /home/nginx/html

# 检测配置文件语法
nginx -t
# 检测显示以下内容说明配置成功
nginx: the configuration file /home/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /home/nginx/conf/nginx.conf test is successful
# 启动Nginx并加入开机自起
nginx
echo "/home/nginx/sbin/nginx" >> /etc/rc.local 

六、部署FTP服务用于上传视频

Code Block
languagebash
themeMidnight
yum install -y vsftpd ftp 
useradd -d /home/itcast-iotp/data/attachment/video vsftp -s /sbin/nologin
chmod 755 -R /home/itcast-iotp/data/attachment/video
chown vsftp.root /home/itcast-iotp/data/attachment/video



六、配置DNS解析

平台名主机地址域名
管理端服务器出口IPmanager.aftvc.com
学生端服务器出口IPstu.aftvc.com
教师端服务器出口IPtch.aftvc.com
附件中心服务器出口IPfile.aftvc.com
文件预览服务器出口IPview.aftvc.com
xxl-job控制台服务器出口IPxxl-job.aftvc.com
MQ控制台服务器出口IPrabbitmq.aftvc.com

...