


lnmp source code installation and simple configuration, lnmp source code configuration_PHP tutorial
lnmp source code installation and simple configuration, lnmp source code configuration
nginx software:
a: openssl-<span>1.0</span><span>.1r.tar.gz tar zxf openssl</span>-<span>1.0</span><span>.1r.tar.gz b: pcre</span>-<span>8.32</span><span>.tar.gz tar zxf openssl</span>-<span>1.0</span><span>.1r.tar.gz cd pcre</span>-<span>8.32</span><span> .</span>/configure --prefix=/usr/local/lanmp/lib/<span>pcre #安装目录 make </span>&&<span> make install c: zlib</span>-<span>1.2</span>.<span>7</span><span>.tar.gz tar zxf zlib</span>-<span>1.2</span>.<span>7</span><span>.tar.gz cd zlib</span>-<span>1.2</span>.<span>7</span><span> .</span>/configure --prefix=/usr/local/lanmp/lib/<span>zlib #安装目录 make </span>&&<span> make install d: nginx</span>-<span>1.8</span>.<span>0</span><span>.tar.gz tar zxf nginx</span>-<span>1.8</span>.<span>0</span><span>.tar.gz cd nginx #</span>--user=www-<span>data 指定用户 #</span>--group=www-<span>data 指定用户组 </span>--prefix=/usr/local/lanmp/<span>nginx </span>--with-<span>http_ssl_module #开启HTTP SSL模块,支持HTTPS请求 </span>--with-openssl=/usr/local/src/openssl-<span>1.0</span><span>.1r #源码的路径 </span>--with-zlib=/usr/local/src/zlib-<span>1.2</span>.<span>7</span><span> #源码的路径 </span>--with-pcre=/usr/local/src/pcre-<span>8.32</span><span> #源码的路径 </span>--conf-path=/etc/lanmp/<span>nginx.conf#配置文件路径 make </span>&&<span> make install </span>/usr/local/lanmp/nginx/sbin/<span>nginx #启动nignx,也可加入服务 cp </span>/usr/local/lanmp/nginx/sbin/nginx /etc/init.d/
nginx simple configuration:
<span>全局: worker_processes </span><span>2</span><span>;#进程数 worker_rlimit_nofile </span><span>65535</span><span>;#最多打开文件数 events { use epoll; #事件模型 worker_connections </span><span>10240</span><span>;#每个进程最多连接数 } http局: keepalive_timeout </span><span>0</span><span>;#超时时间 gzip on; #支持压缩 gzip_buffers </span><span>16</span><span> 8K; #申请内存大小 gzip_comp_level </span><span>6</span><span>;#压缩级别 gzip_min_length 4K;#允许压缩的最小字节数 gzip_types text</span>/html,text/<span>css;#压缩类型 gzip_vary on;#根据http头部来判断是否压缩 server局: location </span>~ .*(gif|jpg|png|bmp|<span>swf)$ {#缓存类型 expires 1d; #缓存时间 }</span>
mysql software:
mysql-<span>5.6</span>.<span>15</span><span>.tar.gz tar zxf mysql</span>-<span>5.6</span>.<span>15</span><span>.tar.gz cd mysql</span>-<span>5.6</span>.<span>15</span><span> #必须安装以下的包,不然cmake会出错 yum </span>-y install ncurses-devel 或者 apt-<span>get</span> install libncurses5-<span>dev cmake . \ </span>-DCMAKE_INSTALL_PREFIX=/usr/local/lanmp/<span>mysql \ </span>-DMYSQL_DATADIR=/usr/local/lanmp/mysql/<span>data \ #数据库存放路径 </span>-DSYSCONFDIR=/etc/lanmp/<span>mysql \ #conf路径 </span>-DWITH_MYISAM_STORAGE_ENGINE=<span>1</span><span> \ #MYISAM引擎支持 </span>-DWITH_INNOBASE_STORAGE_ENGINE=<span>1</span><span> \#INNODB引擎支持 </span>-DWITH_MEMORY_STORAGE_ENGINE=<span>1</span><span> \#MEMORY引擎支持 </span>-DWITH_READLINE=<span>1</span><span> \ </span>-DMYSQL_UNIX_ADDR=/<span>var</span>/lib/mysql/<span>mysql.sock \ </span>-DMYSQL_TCP_PORT=<span>3306</span><span> \ </span>-DENABLED_LOCAL_INFILE=<span>1</span><span> \#允许从本地导入数据 </span>-DWITH_PARTITION_STORAGE_ENGINE=<span>1</span><span> \#分区支持 </span>-DEXTRA_CHARSETS=<span>all \ </span>-DDEFAULT_CHARSET=<span>utf8 \ </span>-DDEFAULT_COLLATION=<span>utf8_general_ci #字符集 make </span>&&<span> make install groupadd mysql #建一个mysql用户组 useradd </span>-r -g mysql mysql #建一个mysql用户,属于mysql用户组,并且该用户不在登录界面显示(-<span>r参数的作用) chown </span>-R mysql:mysql /usr/local/lanmp/<span>mysql cd</span>/usr/local/lanmp/mysql/<span>scripts .</span>/mysql_install_db --user=mysql --basedir=/usr/local/lanmp/mysql --datadir=/usr/local/lanmp/<span>mysql #初始化安装 cd </span>/usr/local/lanmp/mysql/support-<span>files #注册服务 cp mysql.server </span>/etc/init.d/<span>mysqld #使用默认配置文件 cp my</span>-<span>default</span>.cnf /etc/lanmp/mysql/<span>my.cnf #启动 service mysqld start </span>/usr/local/lanmp/mysql/bin/mysqladmin -u root password <span>"</span><span>123456</span><span>"</span> #设置密码
mysql simple configuration:
innodb_buffer_pool_size =<span> 128M port </span>= <span>3306</span><span> server_id </span>= <span>1</span><span> socket </span>= /<span>var</span>/lib/mysql/<span>mysql.sock back_log </span>= <span>384</span><span> key_buffer_size </span>=<span> 128M max_connections </span>= <span>500</span><span> thread_concurrency </span>= <span>2</span>
php software:
a: freetype-<span>2.4</span>.<span>10</span><span>.tar b: jpegsrc.v8b.tar.gz c: libpng</span>-<span>1.5</span>.<span>14</span><span>.tar.gz d: libxml2</span>-<span>2.9</span>.<span>0</span><span>.tar.gz e: libiconv</span>-<span>1.7</span><span>.tar.gz 同样是解压并安装</span>/usr/local/lanmp/lib/<span>下 f: php</span>-<span>7.0</span>.<span>3</span><span>.tar.gz tar zxf php</span>-<span>7.0</span>.<span>3</span><span>.tar.gz cd php</span>-<span>7.0</span>.<span>3</span><span> .</span>/configure --prefix=/usr/local/lanmp/<span>fcgphp </span>--with-config-file-path=/etc/lanmp/<span>fcgphp.ini </span>--with-mysqli=/usr/local/lanmp/mysql/bin/<span>mysql_config #mysqli </span>--enable-<span>mbstring </span>--with-freetype-dir=/usr/local/lanmp/lib/<span>freetype </span>--with-jpeg-dir=/usr/local/lanmp/lib/<span>libjpeg #jpg </span>--with-png-dir=/usr/local/lanmp/lib/<span>libpng #png </span>--with-zlib-dir=/usr/local/lanmp/lib/<span>zlib </span>--with-libxml-dir=/usr/local/lanmp/lib/<span>libxml </span>--enable-<span>xml #xml支持 </span>--with-iconv-dir=/usr/local/lanmp/lib/<span>libiconv#字符集转换支持 </span>--enable-<span>fpm #支持fcgi方式 </span>--with-pdo-mysql=/usr/local/lanmp/<span>mysql#pdo支持 #</span>--with-apxs2=/usr/local/lanmp/apache2/bin/<span>apxs#apache模块 make </span>&&<span> make install cp php.ini</span>-development /etc/lanmp/fcgphp.ini<br /> <br /> cd /usr/local/lanmp/fcgphp/etc/php-fpm.d/<br /> cp www.conf.default www.conf #配置
<em id="__mceDel"> #启动<br /> /usr/local/lanmp/fcgphp/sbin/php-fpm</em>
php-fpm configuration parameters
pm = <span>dynamic</span><span> #进程方式,static为静态 pm.max_children </span>= <span>300</span><span> #最大进程数 pm.start_servers </span>= <span>20</span><span> #启动时创建的进程 pm.min_spare_servers </span>= <span>5</span><span> #最小进程数 pm.max_spare_servers </span>= <span>35</span> #空闲最大进程数

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

PHP logging is essential for monitoring and debugging web applications, as well as capturing critical events, errors, and runtime behavior. It provides valuable insights into system performance, helps identify issues, and supports faster troubleshoot

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

The article discusses adding custom functionality to frameworks, focusing on understanding architecture, identifying extension points, and best practices for integration and debugging.

Article discusses essential security features in frameworks to protect against vulnerabilities, including input validation, authentication, and regular updates.
