先安装虚拟机

https://www.virtualbox.org/

再安装

https://www.vagrantup.com/

 1、nginx
http://nginx.org/download/nginx-1.7.4.tar.gz

(1)、yum install pcre pcre-devel openssl openssl-devel -y

 
(2)、mkdir -p /home/work/logs/nginx
 
(3)、切到nginx-1.7.4.tar.gz解压根目录
./configure --prefix=/home/work/app/nginx --error-log-path=/home/work/logs/nginx/error.log --user=work --group=work --with-http_stub_status_module --http-log-path=/home/work/logs/nginx/access.log --with-http_ssl_module && make && make install
 
2、安装PHP
yum install gd-devel libpng-devel libjpeg-devel libmcrypt-devel libtool-ltdl libtool-ltdl-devel  libxml2 libxml2-devel libcurl libcurl-devel bzip2 bzip2-devel icu libicu-devel openldap-devel -y
 
./configure --prefix=/home/work/app/php --enable-fpm --with-fpm-user=work --with-fpm-group=work --with-config-file-path=/home/work/app/php/etc --with-openssl --with-zlib --enable-bcmath --with-curl --with-bz2 --enable-exif --enable-ftp --with-gd --with-freetype-dir --with-jpeg-dir --with-gettext --enable-intl --with-ldap --enable-mbstring --with-mcrypt --with-mysql=mysqlnd --with-mysqli=mysqlnd --enable-opcache --with-pdo-mysql=mysqlnd --enable-soap --enable-sockets --enable-zip --enable-mysqlnd --enable-calendar --enable-dba --with-mhash --enable-pcntl --enable-shmop --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx 
 
make && make install
 
 
如果访问不了虚拟机,请关闭虚拟机防火墙

关闭命令:  service iptables stop 
永久关闭防火墙:chkconfig iptables off

两个命令同时运行,运行完成后查看防火墙关闭状态 
service iptables status

 

Vagrant 安装使用的更多相关文章

  1. Vagrant安装配置

    转载自:https://my.oschina.net/u/3424381/blog/888205 Vagrant安装配置 实际上Vagrant只是一个让你可以方便设置你想要的虚拟机的便携式工具,它底层 ...

  2. Vagrant安装Docker

    ======方法1=========== 一.vagrant安装centos 1.1 什么是vagrant: Vagrant是一个基于Ruby的工具,用于创建和部署虚拟化开发环境.它 使用Oracle ...

  3. Virtualbox/Vagrant安装

    它们分别是什么? VirtualBox: 号称是最强的免费虚拟机软件和VM类似. 不仅具有丰富的特色,而且性能也很优异. Vagrant: 是一个基于Ruby的工具,用于创建和部署虚拟化开发环境. 使 ...

  4. vagrant安装centos7

    1. 安装VirtualBox 去官网https://www.virtualbox.org/wiki/Downloads下载最新版的Virtualbox,然后双击安装,一直点击确认完成. 2. 安装V ...

  5. Vagrant 安装Oracle19c RAC测试环境的简单学习

    1. 学习自网站: https://xiaoyu.blog.csdn.net/article/details/103135158 简单学习了下 能够将oracle RAC开起来了 但是 对后期的维护和 ...

  6. Vagrant安装步骤

    Vagrant安装步骤 下载添加box镜像 vagrant box add base 远端的box地址或者本地的box文件名 建立box镜像关联 vagrant box add centos72 va ...

  7. 环境篇:Virtualbox+Vagrant安装Centos7

    环境篇:Virtualbox+Vagrant安装Centos7 1 安装Vagrant Vagrant下载地址:https://www.vagrantup.com/ Vagrant百度网盘:https ...

  8. vagrant安装的坑

    关于VAGRANT安装过程的坑 标签: 虚拟化     闲来无聊 试试vagrant虚拟化技术 安装过程中坑太多了 所以记录下方便以后 注意: 执行 vagrant up 命令报错 如下   PS F ...

  9. vagrant 安装使用 win7

    第一步.安装VirtualBox和vagrant 下载地址: https://www.virtualbox.org/wiki/Downloads http://downloads.vagrantup. ...

  10. Window vagrant 安装部署【转】

    回想以前,想要安装个虚拟机是多么的麻烦.先要费尽心机找到想要的操作系统镜像文件,然后安装虚拟化软件,按照其提供的GUI界面操作一步步创建,整个过程费时费力.但是,自从使用了Vagrant以后,咱腰不酸 ...

随机推荐

  1. c语言getipaddrtable获得ip地址与sendArp获得mac地址以及一些字节序问题记录

    https://docs.microsoft.com/zh-cn/windows/win32/api/iphlpapi/nf-iphlpapi-getipaddrtable msdn,有很多c的源码还 ...

  2. Visual Studio Code修改全屏背景

    打开VSCode安装目录,找到workbench.desktop.main.css文件 在最后一行添加以下代码: body{ pointer-events:auto !important; backg ...

  3. 一些 乱码 GPU的问题

    # # s = '网站地图' 原始 # s1 = s.encode('utf-8') # print(s1.decode('gbk')) #res 缃戠珯鍦板浘 # s = '缃戠珯鍦板浘' 原始 # ...

  4. pwnable.kr-balckjack-Writeup

    MarkdownPad Document *:first-child { margin-top: 0 !important; } body>*:last-child { margin-botto ...

  5. 启动MySQL5.7时报错:initialize specified but the data directory has files in it. Aborting.

    启动MySQL5.7时报错:initialize specified but the data directory has files in it. Aborting 解决方法: vim /etc/m ...

  6. 「JSOI2015」圈地

    「JSOI2015」圈地 传送门 显然是最小割. 首先对于所有房子,权值 \(> 0\) 的连边 \(s \to i\) ,权值 \(< 0\) 的连边 \(i \to t\) ,然后对于 ...

  7. Springmvc-crud-04错误(路径变量)

    错误: 原因:接收不到restful风格请求的参数(id值),需要添加路径变量注解 @RequestMapping(value="/book/{id}",method=Reques ...

  8. 查看KVM宿主机上虚拟机的IP的脚本

    查看KVM宿主机上虚拟机的IP的脚本 #!/bin/bash #Auth:liucx #ping当前网段内在线的主机,以便产生arp记录. .{..};do { >& }& do ...

  9. IdentityHashCodeTest

    Java学习:identityHashCode和hashCode方法, System类提供了一个identityHashCode(Object x)方法,这个方法返回的是指定对象的精确hashCode ...

  10. P1030 求先序排列 (一个非常棒的写法)

    理论正确就是真正的正确,误... 就是找嘛,找到每一个对应字符,然后对应的左右子树的区间,然后就可以了. #include <bits/stdc++.h> using namespace ...