LNMP source installation and simple configuration, lnmp source configuration _php Tutorial

Source: Internet
Author: User
Tags php software

LNMP source installation and simple configuration, LNMP source configuration


Nginx Software:

a:openssl-1.0. 1r.tar.gz Tar zxf OpenSSL-1.0. 1r.tar.gzb:pcre-8.32. tar.gz Tar zxf OpenSSL-1.0. 1r.tar.gz CD Pcre-8.32      ./configure--prefix=/usr/local/lanmp/lib/pcre #安装目录make&&Make installc:zlib-1.2.7. tar.gz Tar zxf zlib-1.2.7. tar.gz CD zlib-1.2.7      ./configure--prefix=/usr/local/lanmp/lib/zlib #安装目录make&&Make Installd:nginx-1.8.0. tar.gz Tar zxf nginx-1.8.0. tar.gz CD Nginx #--user=www-data Specify user #--group=www-data specified user group--prefix=/usr/local/lanmp/Nginx--with-http_ssl_module #开启HTTP SSL module to support HTTPS requests--with-openssl=/usr/local/src/openssl-1.0. 1r #源码的路径--with-zlib=/usr/local/src/zlib-1.2.7#源码的路径--with-pcre=/usr/local/src/pcre-8.32#源码的路径--conf-path=/etc/lanmp/nginx.conf# configuration file path make&&Make Install/usr/local/lanmp/nginx/sbin/Nginx #启动nignx, can also join the service CP/usr/local/lanmp/nginx/sbin/nginx/etc/init.d/

Nginx Simple configuration:

Global: worker_processes   2  65535; #最多打开文件数events {use    epoll; #事件模型    worker_connections  10240 ; #每个进程最多连接数}http Bureau:    keepalive_timeout  0; #超时时间    gzip on  ; #支持压缩      - 8K; #申请内存大小     6 ; #压缩级别    gzip_min_length 4K; #允许压缩的最小字节数    gzip_types text/html,text/css; #压缩类型    gzip_ vary on; #根据http头部来判断是否压缩   Server Office:        ~. * (gif|jpg|png|bmp|  SWF) $ {#缓存类型           expires 1d; #缓存时间       }

MySQL Software:

mysql-5.6. the. Tar.gztar zxf MySQL-5.6. the. TAR.GZCD MySQL-5.6. the#必须安装以下的包, or cmake will go wrong. Yum-y install Ncurses-devel or apt-GetInstall libncurses5-Dev CMake. \-dcmake_install_prefix=/usr/local/lanmp/mysql \-dmysql_datadir=/usr/local/lanmp/mysql/data \ #数据库存放路径-dsysconfdir=/etc/lanmp/mysql \ #conf路径-dwith_myisam_storage_engine=1\ #MYISAM引擎支持-dwith_innobase_storage_engine=1\ #INNODB引擎支持-dwith_memory_storage_engine=1\ #MEMORY引擎支持-dwith_readline=1 \-dmysql_unix_addr=/var/lib/mysql/mysql.sock \-dmysql_tcp_port=3306 \-denabled_local_infile=1\ #允许从本地导入数据-dwith_partition_storage_engine=1\ #分区支持-dextra_charsets=All \-ddefault_charset=UTF8 \-ddefault_collation=utf8_general_ci #字符集make&&Make installgroupadd MySQL #建一个mysql用户组useradd-r-g MySQL MySQL #建一个mysql用户, belongs to the MySQL user group, and the user is not displayed on the login screen (-function of r parameter) Chown-R mysql:mysql/usr/local/lanmp/MYSQLCD/usr/local/lanmp/mysql/scripts./mysql_install_db--user=mysql--basedir=/usr/local/lanmp/mysql--datadir=/usr/local/lanmp/MySQL #初始化安装cd/usr/local/lanmp/mysql/support-files# Registration Service CP Mysql.server/etc/init.d/mysqld# using the default profile CP my-default. cnf/etc/lanmp/mysql/my.cnf# start service mysqld start/usr/local/lanmp/mysql/bin/mysqladmin-u Root Password"123456"#设置密码

MySQL Simple configuration:

Innodb_buffer_pool_size =33061=/var/lib/mysql/  384   =2

PHP Software:

a:freetype-2.4.Ten. Tarb:jpegsrc.v8b.tar.gzc:libpng-1.5. -. TAR.GZD:LIBXML2-2.9.0. Tar.gze:libiconv-1.7the. tar.gz is also decompressed and installed/usr/local/lanmp/lib/Next f:php-7.0.3. tar.gz Tar zxf php-7.0.3. tar.gz cd PHP-7.0.3    ./configure--prefix=/usr/local/lanmp/fcgphp--with-config-file-path=/etc/lanmp/Fcgphp.ini--with-mysqli=/usr/local/lanmp/mysql/bin/mysql_config #mysqli--enable-mbstring--with-freetype-dir=/usr/local/lanmp/lib/FreeType--with-jpeg-dir=/usr/local/lanmp/lib/libjpeg #jpg--with-png-dir=/usr/local/lanmp/lib/libpng #png--with-zlib-dir=/usr/local/lanmp/lib/zlib--with-libxml-dir=/usr/local/lanmp/lib/Libxml--enable-XML #xml支持--with-iconv-dir=/usr/local/lanmp/lib/libiconv# Character Set conversion support--enable-fpm #支持fcgi方式--with-pdo-mysql=/usr/local/lanmp/Mysql#pdo Support #--with-apxs2=/usr/local/lanmp/apache2/bin/Apxs#apache Module make&&Make install CP php.ini-development/etc/lanmp/fcgphp.ini

cd/usr/local/lanmp/fcgphp/etc/php-fpm.d/
CP Www.conf.default www.conf #配置
#启动
/usr/local/lanmp/fcgphp/sbin/php-fpm

PHP-FPM Configuration Parameters

 dynamic 5#空闲最大进程数

http://www.bkjia.com/PHPjc/1106378.html www.bkjia.com true http://www.bkjia.com/PHPjc/1106378.html techarticle LNMP source installation and simple configuration, LNMP source configuration Nginx Software: a:openssl-1.0.1r.tar.gz tar zxf openssl-1.0.1r.tar.gzb:pcre-8.32. tar.gz ta R zxf openssl-1.0.1r.tar ....

  • 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.