您的位置 首页 php

zabbix-第一章-第三节 LNMP之PHP搭建

PHP:PHP即“超文本预处理器”,是一种通用开源 脚本语言 。PHP是在服务器端执行的脚本语言,与C语言类似,是常用的网站编程语言。PHP独特的语法混合了C、Java、Perl以及 PHP 自创的语法。利于学习,使用广泛,主要适用于Web开发领域。

zabbix-第一章-第三节 LNMP之PHP搭建

1、安装依赖包

 [root@one home]# yum -y install epel-release
[root@one home]# yum -y install  gcc gcc-c++ make pcre pcre-devel zlib zlib-devel openssl openssl-devel libxml2 libxml2-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel openldap openldap-devel libmcrypt libmcrypt-devel  

出现如下界面且中途未出现 “ERROR” 字样,即表示安装完成

zabbix-第一章-第三节 LNMP之PHP搭建

2、下载php

官网地址:

或者直接输入以下命令下载:(建议使用下面的命令,争取PHP的版本保持一致)

 [root@one home]# cd /home/ package /
[root@one package]# wget   

如图所示,即表示下载完成:

zabbix-第一章-第三节 LNMP之PHP搭建

查看一下,其中“php-5.6.40.tar.gz”就是我们新下载的程序包:

 [root@one package]# ls
mysql57-community-release-el7-8.noarch.rpm  nginx-1.14.2.tar.gz  php-5.6.40.tar.gz
[root@one package]#   

3、编译安装

 [root@one package]# tar xf php-5.6.40.tar.gz 
[root@one package]# mkdir -pv /home/PHP
mkdir: 已创建目录 "/home/PHP"
[root@one package]# cd php-5.6.40
[root@one package]# ./configure --prefix=/home/PHP --with-config-file-path=/home/PHP/etc --enable-ctype --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/home/PHP --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap --with-gettext --enable-fpm  

编译参数说明:

 --prefix  #指定php的安装目录
--with-config-file-path  #指定php的配置文件位置
--with-mysql、--with-mysqli  #让php可以操作mysql
--enable-fpm  #主要是 nginx 要来调用php语言得使用php-fpm  

出现如图界面,且中途没有 “ERROR” 字样,即表示编译成功了:

zabbix-第一章-第三节 LNMP之PHP搭建

接下来我们进行安装即可:

 [root@one php-5.6.40]# make && make install  

安装过程较慢,请耐心等待~~~

出现如下界面,即表示完成

zabbix-第一章-第三节 LNMP之PHP搭建

但是我们注意到上图末尾有提示,我们按照给出的提示操作一下:

 [root@one php-5.6.40]# /home/package/php-5.6.40/build/shtool install -c ext/phar/phar.phar /home/PHP/ bin 
[root@one php-5.6.40]# ln -s -f phar.phar /home/PHP/bin/phar
[root@one php-5.6.40]#   

4、配置文件操作

 [root@one php-5.6.40]# cp php. ini -production /home/PHP/etc/php.ini
[root@one php-5.6.40]# cp /home/PHP/etc/php-fpm.conf.default /home/PHP/etc/php-fpm.conf
[root@one php-5.6.40]#   

5、添加环境变量

 [root@one php-5.6.40]# echo "export PATH=$PATH:/home/PHP/sbin/:/home/PHP/bin/" >> /etc/profile
[root@one php-5.6.40]# source /etc/profile
[root@one php-5.6.40]#   

6、检查配置文件并启动php服务

 [root@one php-5.6.40]# php-fpm -t
[20-Mar-2020 14:27:51] NOTICE: configuration file /home/PHP/etc/php-fpm.conf test is successful

[root@one php-5.6.40]# php-fpm
[root@one php-5.6.40]#   

7、检查启动是否成功

 [root@one php-5.6.40]# netstat -tunlp | grep 9000
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      128300/php-fpm: mas 
[root@one php-5.6.40]# ps -ef | grep php
root     128300      1  0 14:28 ?        00:00:00 php-fpm: master process (/home/PHP/etc/php-fpm.conf)
nobody   128301 128300  0 14:28 ?        00:00:00 php-fpm: pool www
nobody   128302 128300  0 14:28 ?        00:00:00 php-fpm: pool www
root     128330  33635  0 14:28 pts/0    00:00:00 grep --color=auto php
[root@one php-5.6.40]#   

8、配置nginx适配php

 [root@one php-5.6.40]# cd /home/nginx/
[root@one nginx]# vim html/test.php
<?php
  echo "zabbix test";
?>  
zabbix-第一章-第三节 LNMP之PHP搭建

修改nginx的配置文件:

 [root@one nginx]# vim conf/nginx.conf
# 添加如下内容
location ~ .php$ {
            root           html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
# 保存退出 :wq
[root@one nginx]# ./sbin/nginx -s reload
[root@one nginx]#   

修改之后的配置文件截图:

zabbix-第一章-第三节 LNMP之PHP搭建

9、浏览器进行验证

浏览器输入地址:

PS:IP地址需要换成你实际的IP地址

zabbix-第一章-第三节 LNMP之PHP搭建

至此,PHP服务就搭建完成了,且经过验证已经和nginx适配了,继续加油~

文章来源:智云一二三科技

文章标题:zabbix-第一章-第三节 LNMP之PHP搭建

文章地址:https://www.zhihuclub.com/78385.shtml

关于作者: 智云科技

热门文章

评论已关闭

59条评论

  1. com 20 E2 AD 90 20Nome 20Cientifico 20De 20Viagra 20 20Receta 20Para 20Hacer 20Viagra 20Casero nome cientifico de viagra The combined company will have the financial resources, scale and spectrum to better compete with other major national providers for customers interested in low cost prepaid service, the companies said How could such a powerful mobile assistant be sold to other manufacturers Those are Huawei is competitors Sha Zhan and Gu Pengdong looked at each other and hims vs roman vs bluechew smiled

  2. 6g, suggesting that the loss of self renewal in C EBPОІ myoblasts is due to decreased Notch signaling Our investigations revealed that the presence of BAX, BID, and BIM differentially regulated the ability of BH3 mimetics to derepress proapoptotic molecules from anti apoptotic proteins

  3. Demetrius WsdBFnJSbpuzRy 6 5 2022 In addition to understanding the epidemiology of this condition, information is also needed regarding the time course for the development of symptoms, the duration of symptoms and whether they resolve over time, along with an assessment of available treatment modalities for this type of arthropathy

  4. Miner Electrolyte Metab 1992; 18 203 6 The Western New York Exposures and Breast Cancer WEB Study 13 reported that dietary lignan intake was associated with significantly reduced hazard ratios for all cause and breast cancer specific mortality in postmenopausal women, comparing the highest 318 Ојg d to the lowest

  5. 10 20 100, 000 based on prospective population based studies Hepatology 2002; 36 451, Am J Gastroenterol 2012; 107 1380, Gastroenterology 2013; 144 1419 Leading cause of acute liver failure and one of the major reasons for liver transplantation in the U Hepatology 32 770 778 98

  6. There is no clinical evidence to support the routine use of anticoagulant or antiplatelet drugs in the postoperative period, and they may increase the risk of hematoma formation

  7. There are no immediate symptoms of high cholesterol but when not treated appropriately it can lead to heart attack and stroke Arrowheads, visible plasmalemmal pits

  8. Such groups are typically unsubstituted or substituted by one or two methyl groups and, in one particular embodiment, are unsubstituted Monitor Closely 1 deferasirox will decrease the level or effect of nifedipine by affecting hepatic intestinal enzyme CYP3A4 metabolism

  9. Packaging and delivery Packing is just extraordinary with a cushioned box for safety Genomic Health is a commercial laboratory that has developed a multigene reverse transcriptase RT PCR assay designed to quantify the 10 year risk of local recurrence, both in situ and invasive, in patients with DCIS treated with breast conserving surgery without radiation

  10. Tablets Each film coated tablet contains paroxetine hydrochloride equivalent to paroxetine as follows 10 mg yellow scored; 20 mg pink scored; 30 mg blue, 40 mg green

  11. Jeon JH, Kang JH, Kim Y, Lee HY, Choi KS, Jun JK, et al Monitor Closely 1 diltiazem will increase the level or effect of rimegepant by affecting hepatic intestinal enzyme CYP3A4 metabolism

  12. Hypoxia inducible factor 1 A possible link between inhalational anesthetics and tumor progression Why do people fall for penis enlargement gimmics

  13. D Scatter plot of PD L1 expression and EM score Knecht M, Darbon JM, Ranta T, Baukal AJ, Catt KJ

  14. There was one report of detection of C caviae in a person with serous ocular discharge who worked with 200 diseased guinea pigs

  15. A rich source of vitamins and minerals, it promotes urine and bile flow and helps with the common digestive complaints of pregnancy

  16. Visentin, Roberto; Dalla Man, Chiara; Basu, Rita; Basu, Ananda; Rizza, Robert A; Cobelli, Claudio American journal of physiology

  17. Quantifying the effect of everolimus on both tumour growth and new metastases in metastatic renal cell carcinoma RCC a dynamic tumour model of the RECORD 1 phase III trial

  18. Clark s face changed greatly, and he said in a trembling voice How did you know, Although Physician himself is not iv furosemide dose so easy to coming off blood pressure medication be completely killed, there is still a big gap with these demon creatures

  19. A 64 year old woman noticed a lump of the right breast and consulted our outpatient clinic

  20. But I do occasionally indulge for relaxation without worrying too much about it Conclusion This is a rare description of a concomitant papillary thyroid carcinoma presenting as an FDG PET incidentaloma alongside breast cancer metastases to the thyroid gland

  21. Note the chiral center only this enantiomer is active, which is something that always gives you a good feeling about target engagement at least against some target or another

  22. efavirenz will decrease the level or effect of tetracycline by affecting hepatic intestinal enzyme CYP3A4 metabolism

  23. It was also examined whether epigenetic mechanisms are involved in the downregulation of MARK3 Monitor Closely 1 ibuprofen IV increases and ephedrine decreases serum potassium

  24. 2 mm, if the measurement is taken on the fifth to tenth day following the last progestogen tablet 32 If you make a donation to Komen, you can still choose your donation to go toward metastatic breast cancer research

  25. Your origin is also believed to have a strong influence on your chance of having twins In a single center study, success rates were similar between those with CA and control subjects

  26. Two possibilities exist postirradiation injury of the pericardium of pleura and lung and the CREST syndrome

  27. 2000; Parker, 2003 Meta regression was performed to assess and adjust for effects of potential confounders for the following average age of women, period of initial treatment as a surrogate for timeframe related treatment and detection effects, follow up duration for recurrence and death rates in each treatment group 37

  28. Due to the lack of individual data, cause and effect relationships are impossible to establish

  29. TambiГ©n hay otras pilas, pero querГ­amos ofrecerle algunas de las pilas de esteroides mГЎs comunes y populares que existen

  30. An individual that seeks to challenge the forfeiture of property, in this case, the dogs, has the burden of establishing a property interest

  31. 5 Nitropyridine 2 sulfonic acids are substituted at the 2 position with a variety of nitrogen oxygen and halogen based nucleophiles He was fine one day and then he was not

  32. Similar to the results of LCs, only fish labeled with HSCs Group I A and Group II A contained significant number of GFP cells in brain, liver, heart, and gut Figure 5, Figure 5 source data 1, suggesting that adult resident macrophages in brain, liver, heart, and gut were associated with HSCs in zebrafish

  33. One clinical trial found that EPO was not any better than a placebo in relieving hot flashes ROB SUTHERLAND

  34. Vaccination has been shown to have many benefits including reducing the risk of flu illnesses, hospitalizations and even the risk of flu related death in children

  35. She upped my dosage to 100mg same days and I did o sooner but still not before cd20 com 20 E2 AD 90 20Viagra 20Utan 20Receptfritt 20 20Viagra 20Mastercard 20Buy viagra utan receptfritt Missouri is one of a number of states that have considered tax cuts this year, and seven states cut taxes by at least 1 percent, according to the National Conference of State Legislatures

网站地图