LNMP之PHP安裝操作步驟
=======> LNMP 之 PHP安裝操作步驟 1、==>備份預設源==>下載mirrors.163.com源==>yum安裝epel源
wget -O /etc/yum.repos.d/CentOS-Base.repo
yum install epel-release -y
====>檢視依賴庫
rpm -aq pcre pcre-devel openssl openssl-devel zlib-devel
libxml2-devel libjpeg-turbo-devel libpng-devel libcurl-devel libxslt-devel
freetype-devel gd-devel mhash mhash-devel mcrypt libmcrypt-devel
yum install pcre pcre-devel openssl openssl-devel zlib-devel
libxml2-devel libjpeg-turbo-devel libpng-devel libcurl-devel libxslt-devel
freetype-devel gd-devel mhash mhash-devel mcrypt libmcrypt-devel -y
=======>mhash、mhash-devel加密擴充套件庫、mcrypt加密擴充套件庫
mhash mhash-devel mcrypt libmcrypt-devel
2、====>安裝 libiconv-devel庫,需要第三方;
mkdir /home/tools/ -p
cd /home/tools/
wget
tar zxf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr/local/libiconv
make && make install
cd ../
============LNMP==============================================
3、====>配合nginx安裝PHP-5.3.27引數 ===> --with-mysql=mysqlnd
cd /home/tools
rz php-5.3.27.tar.gz
tar zxf php-5.3.27.tar.gz
cd php-5.3.27/
./configure
--prefix=/application/php-5.3.27
--with-mysql=/application/mysql
--with-iconv-dir=/usr/local/libiconv
--with-freetype-dir
--with-jpeg-dir
--with-png-dir
--with-zlib
--with-libxml-dir=/usr
--enable-xml
--disable-rpath
--enable-safe-mode
--enable-bcmath
--enable-shmop
--enable-sysvsem
--enable-inline-optimization
--with-curl
--with-curlwrappers
--enable-mbregex
--enable-fpm
--enable-mbstring
--with-mcrypt
--with-gd
--enable-gd-native-ttf
--with-openssl
--with-mhash
--enable-pcntl
--enable-sockets
--with-xmlrpc
--enable-zip
--enable-soap
--enable-short-tags
--enable-zend-multibyte
--enable-static
--with-xsl
--with-fpm-user=nginx
--with-fpm-group=nginx
--enable-ftp
=================================================================
==========先執行以下一種再make否則會報錯=========================
ln -s /application/mysql/lib/libmysqlclient.so.18 /usr/lib64/
touch ext/phar/phar.phar
=========================
echo "/application/mysql/lib" >>/etc/ld.so.conf
ldconfig
=================================================================
make && make install
ln -s /application/php-5.3.27/ /application/php
cp php-5.3.27/php.ini-production /application/php/lib/php.ini
=====>配置檔案
[root@Lnmp tools]# ll php-5.3.27/php.ini*
-rw-r--r-- 1 101 101 69606 Jul 11 2013 php-5.3.27/php.ini-development ==>開發環境
-rw-r--r-- 1 101 101 69627 Jul 11 2013 php-5.3.27/php.ini-production ==>生產環境
=====>上傳或修改配置檔案
rz php-fpm.conf.5.3.27-cxybase
mv php-fpm.conf.5.3.27-cxybase /application/php/etc/php-fpm.conf
mkdir -p /app/logs
/application/php/sbin/php-fpm -t ====>檢查語法
/application/php/sbin/php-fpm ====>啟動PHP
netstat -lntup|grep php-fpm ====>檢視服務程式
ps -ef|grep php-fpm|grep -v grep
=================================================================
開機自啟動:
/application/php/sbin/php-fpm
/application/nginx/sbin/nginx
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/3034/viewspace-2801389/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- linux下安裝redis 單節點安裝操作步驟LinuxRedis
- vnc安裝步驟,vnc安裝步驟詳解VNC
- LNMP--mysql php安裝配置LNMPMySqlPHP
- [ 安裝 ] Zeppelin安裝步驟!
- Linux環境下MySQL安裝部署操作步驟LinuxMySql
- ubuntu20.04.3安裝Qt6.22操作步驟UbuntuQT
- xftp安裝步驟,xftp安裝的2大步驟FTP
- Nagios安裝步驟iOS
- STF 安裝步驟
- anaconda安裝步驟
- Linux 安裝步驟Linux
- CentOS7.2編譯安裝PHP7.2.3之史上最詳細步驟。CentOS編譯PHP
- vnc安裝步驟,如何在Linux(CentOS 7)下vnc安裝步驟VNCLinuxCentOS
- 畫江湖之 docker 篇 【lnmp 下如何安裝 PHP 擴充套件】DockerLNMPPHP套件
- 畫江湖之 docker 篇 [lnmp 下如何安裝 PHP 擴充套件]DockerLNMPPHP套件
- Sublime Text安裝步驟
- aws安裝jenkins步驟Jenkins
- Iris 框架安裝步驟框架
- zookeeper安裝部署步驟
- windows安裝cnpm步驟WindowsNPM
- Maya 2023安裝步驟
- charles的安裝步驟
- Linux安裝Nginx步驟LinuxNginx
- 安裝jdk的步驟JDK
- vnc安裝步驟,4個在Linux下vnc的個安裝步驟VNCLinux
- 操作步驟
- ubuntu 下安裝nginx步驟UbuntuNginx
- linux下安裝docker步驟LinuxDocker
- CDH6.2.0安裝步驟
- Android studio的安裝步驟Android
- MHA安裝和部署步驟
- 【Nginx1.12.2安裝步驟】Nginx
- 國內Kubernetes安裝步驟
- Linux安裝JDK完整步驟LinuxJDK
- 如何安裝discuz論壇,discuz安裝步驟
- Mac安裝Redis,詳細redis安裝步驟MacRedis
- PHP環境LAMP/LNMP安裝與配置筆記PHPLAMPLNMP筆記
- LNMP架構編譯安裝(Linux、Nginx、Mysql、PHP)LNMP架構編譯LinuxNginxMySqlPHP