In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Preface LNMP refers to a group of free software acronyms that are usually used together to run dynamic websites or servers. L refers to Nginx,M generally refers to MySQL, can also refer to MariaDB,P generally refers to PHP, can also refer to Perl or Python. 2. PHP configuration and installation 1. Installation environment dependency package yum-y install\ libjpeg\ libjpeg-devel\ libpng libpng-devel\ libxml2\ libxml2-devel\ freetype freetype-devel\ zlib zlib-devel\ curl curl-devel\ openssl openssl-devel-// parameters explain libjpeg libjpeg-devel / / identify jpg picture libpng lbpng-devel / / identify Png picture freetype freetype-devel / / font recognition libxml2 libxml2-devel / / for xml file recognition zlib zlib-devel / / compression function curl curl-devel / / curl supports web page upload, Download openssl openssl-devel / / Authentication login 2, mount shared files Extract the php installation package cd / abc/LNMPtar jxvf php-7.1.10.tar.bz2-C / opt/3, Compile and configure cd / opt/php-7.1.10/./configure\-- prefix=/usr/local/php\-- with-mysql-sock=/usr/local/mysql/mysql.sock\-- with-mysqli\-- with-zlib\-- with-curl\-- with-gd\-- with-jpeg-dir\-- with-png-dir\-- with-freetype-dir\-- with-openssl\-- enable-fpm\-- enable-mbstring\-- enable-xml\ -- enable-session\-- enable-ftp\-- enable-pdo\-- enable-tokenizer\-- enable-zip4 Make & & make installmake & & make install5, configuration optimization php have three configuration files. Php. Ini (core profile) php-fpm.conf (process service profile) www.conf (extended profile) / main configuration file cp php.ini-development / usr/local/php/lib/php.inivim / usr/local/php/lib/php.ini// input / default_sock lookup mysqli.default_socket = / usr/local/mysql/mysql.sock// input / data.time lookup, remove the preceding'; 'comment. Date.timezone = Asia/Shanghai
6. Verify the installed module / usr/local/php/bin/php-m 3, configure and optimize FPM module 1, copy a default template as the configuration file of php-fpm, and then modify it. # configure and optimize FPM module cd / usr/local/php/etc/cp php-fpm.conf.default php-fpm.confvim php-fpm.conf// to annotate symbols'; 'remove pid = run/php-fpm.pid similarly this php-fpm.d also needs to copy a default template cd / usr/local/php/etc/php-fpm.d/cp www.conf.default www.conf
2. Launch configuration / usr/local/php/sbin/php-fpm-c / usr/local/php/lib/php.ininetstat-anpt | grep 9000
3. Optimize the path. Check the process ln-s / usr/local/php/bin/* / usr/local/binps aux | grep-c "php-fpm"
4. Let nginx support PHP function configuration 1. Modify the configuration file vim / usr/local/nginx/conf/nginx.conf// of nginx enter location ~\ .php$ to find location ~\ .php$ {root html; fastcgi_pass 127.0.0.1 fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME / usr/local/nginx/html$fastcgi_script_name Inclide fastcgi_params;}
2. Set the input of index.phpvim / usr/local/nginx/html/index.php// on the inspection web page:
3. Open the nginx service systemctl restart nginx// test web page http://192.168.111.141/index.php
5. Create a new database bbs to test whether the database is working properly mysql-u-root-p / / enter the password "abc123" to log in / create a database / / CREATE DATABASE bbs; GRANT all ON bbs.* TO 'bbsuser'@'%' IDENTIFIED BY' admin123';GRANT all ON bbs.* TO 'bbsuser'@'localhost' IDENTIFIED BY' admin123';// refresh the database / / mysql > flush privileges / / change the content of the original test page: vim / usr/local/nginx/html/index.php systemctl restart nginx tests "http://192.168.111.141/index.php"" on the web page
6. Discuz! Deployment of Community Forum 1. Decompress and install cd / abc/LNMPunzip Discuz_x3.4_SC_UTF8.zip-d / opt2, Authorized installation forum cd / opt/dir_SC_UTF8/cp-r upload/ / usr/local/nginx/html/bbs/cd / usr/local/nginx/html/bbs/chown-R root:nginx. / config/chown-R root:nginx. / data/chown-R root:nginx. / uc_client/chown-R root:nginx. / uc_server/chmod-R 777. / config/chmod-R 777. / data/chmod-R 777. / uc_client/chmod-R 777. / uc_server/3, Enter http://192.168.111.141/bbs/install/index.php installation in the browser
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.