文件名称:Docker的CentOS6.8的镜像中离线安装Ngnix(离线安装gcc编译环境)
文件大小:142.9MB
文件格式:RAR
更新时间:2022-05-29 13:14:31
Docker CentOS gcc
在CentOS6.8的Docker容器中离线安装Ngnix。 先安装gcc编译环境, 再安装依赖, 最后安装Nginx。 全部使用gcc目录下的文件即可,其他目录文件也是网上下载的,但是未安装成功。 1、安装gcc编译环境: cd /pkg/nginx/gcc rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm rpm -ivh cpp-4.4.7-17.el6.x86_64.rpm rpm -ivh kernel-headers-2.6.32-642.el6.x86_64.rpm rpm -ivh glibc-headers-2.12-1.192.el6.x86_64.rpm rpm -ivh glibc-devel-2.12-1.192.el6.x86_64.rpm rpm -ivh libgomp-4.4.7-17.el6.x86_64.rpm rpm -ivh gcc-4.4.7-17.el6.x86_64.rpm rpm -ivh libstdc++-devel-4.4.7-17.el6.x86_64.rpm rpm -ivh gcc-c++-4.4.7-17.el6.x86_64.rpm gcc -v 如果这里出现gcc版本,说明gcc安装成功! 2、安装依赖及解压: rpm -ivh pcre-devel-7.8-7.el6.x86_64.rpm rpm -ivh zlib-devel-1.2.3-3.x86_64.rpm cd nginx tar -zxvf nginx-1.14.2.tar.gz cd nginx-1.14.2 3、安装Ngnix: ./configure make make install cd /usr/local/nginx/sbin ./nginx ps -ef|grep nginx 4、如果运行容器时加了端口,就可以打开Nginx的首页了 http://192.168.99.100/