Vagrant can be used to quickly build an LNMP environment and pack the environment for future use.

Source: Internet
Author: User
Tags gmp openssl library

Vagrant can be used to quickly build an LNMP environment and pack the environment for future use.

Not much nonsense. Text in full text. It's okay if you press the text.

 

Vagrant download can be downloaded to the official site of VirtualBox: product_box add mycentos CentOS-7.1.1503-x86_64-netboot.box to see if the vagrant box listvagrant init mycentos configuration Vagrantfile file with the following two, in order to add ssh authentication config. ssh. username = "vagrant" config. ssh. password = "vagrant" others, such as shared folders and port forwarding, update the yum source based on your own situation. Install wgetyum install wget in yum update to change the yum source, and use 163 mv/etc/yum. repos. d/CentOS-Base.repo/etc/yum. repos. d/CentOS-Base.repo.backupwget http://mirrors.163.com/.help/CentOS6-Base-163.repoyum makecache install mysqlwget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpmyum localinstall mysql-community-release-el7-5.noarch.rpmyum repolist enabled | grep "mysql. *-community. * "yum install mysql-community-serv Er password Change mysql-u rootuse mysqlselect user, password, host from user; update user set PASSWORD = password ('root') where user = 'root'; flush privileges; you cannot log on to groupadd nginxuseradd-g nginx-s/bin/false to install nginx. to install and install nginx with gcc, you must first compile the source code downloaded from the official website. The compilation depends on the gcc environment. If there is no gcc environment, you must install: yum install gcc-c ++ 2. PCRE pcre-devel installation PCRE (Perl Compatible Regular Expressions) is a Perl library, including a perl-Compatible Regular Expression Library. The http module of nginx uses pcre to parse regular expressions. Therefore, you need to install the pcre Library on linux. pcre-devel is a secondary development library developed using pcre. Nginx also needs this library. Command: yum install-y pcre-devel 3. zlib provides many compression and decompression methods for installing the zlib library. nginx uses zlib to perform gzip on the http package content. Therefore, you need to install the zlib library on Centos. Yum install-y zlib-devel 4. openSSL installation OpenSSL is a powerful Secure Socket Layer cryptographic library, which includes the main cryptographic algorithms, common keys, certificate encapsulation management functions, and SSL protocols, and provides a wide range of applications for testing or other purposes. Nginx not only supports the http protocol, but also supports https (that is, transmitting http over the ssl protocol). Therefore, you need to install the OpenSSL library in Centos. Yum install-y openssl-devel download nginxwget-c https://nginx.org/download/nginx-1.10.1.tar.gzdecompress tar-zxvf nginx-1.10.1.tar.gz cd nginx-1.10.1 configuration. /configure build install make install php7.1 download php7wget-O php7.tar.gz Plugin-xvf php7.tar.gz cd php-7.0.4 install dependency package yum install libxml2 libxml2-devel openssl-devel bzip2 bzip2-devel libcurl-devel libjpeg- devel libpng-devel freetype-devel gmp-devel libmcrypt-devel readline-devel libxslt- y libmcrypt-devel compilation configuration. /configure \ -- prefix =/usr/local/php \ -- with-config-file-path =/etc \ -- enable-fpm \ -- with-fpm-user = nginx \-- with-fpm-group = nginx \ -- enable-inline-optimization \ -- disable-debug \ -- disable-rpath \ -- enable-shared \ -- enable-soap \ -- with-libxml- dir \ -- with-xmlrpc \ -- with-openssl \ -- with-mcrypt \ -- with-mhash \ -- with-pcre-regex \ -- with-sqlite3 \ -- with-zlib \ -- enable- bcmath \ -- with-iconv \ -- with-bz2 \ -- enable-calendar \ -- with-curl \ -- with-cdb \ -- enable-dom \ -- enable-exif \ -- enable-fileinfo \ -- enable-filter \ -- with-pcre-dir \ -- enable-ftp \ -- with-gd \ -- with-openssl-dir \ -- with-jpeg-dir \ -- with-png -dir \ -- with-zlib-dir \ -- with-freetype-dir \ -- enable-gd-native-ttf \ -- enable-gd-jis-conv \ -- with-gettext \ -- with-gmp \ -- with-mhash \ -- enable-json \ -- enable-mbstring \ -- enable-mbregex-backtrack \ -- with-libmbfl \ --- onig \ -- enable-pdo \ -- with-mysqli = mysqlnd \ -- with-pdo-mysql = mysqlnd \ -- with-zlib-dir \ -- with-pdo-sqlite \ --- readline \ -- enable-session \ -- enable-shmop \ -- enable-simplexml \ -- enable-sockets \ -- enable-sysvmsg \ -- enable-sysvsem \ -- enable-sysvshm \ -- enable- wddx \ -- with-libxml-dir \ -- with-xsl \ -- enable-zip \ -- enable-mysqlnd-compression-support \ -- with-pear \ -- enable-opcache install make & & make install configure the environment variable vim/etc/profileexport PATH = $ PATH: /usr/local/php/binsource/etc/profile set php-fpmcp php. ini-production/etc/php. inicp/usr/local/php/etc/php-fpm.conf.default/usr/local/php/etc/php-fpm.confcp/usr/local/php/etc/php-fpm.d/www. conf. default/usr/local/php/etc/php-fpm.d/www. confcp. /sapi/fpm/init. d. php-fpm/etc/init. d/php-fpmchmod + x/etc/init. d/php-fpm start php-fpm/etc/init. d/php-fpm start package vagrantvagrant package -- base mycentos_default_15155794233341747721 -- output centos7-lnmp.box

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.