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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- php安裝步驟PHP
- php安裝步驟(正式)PHP
- PHP之PDO_MYSQL擴充套件安裝步驟PHPMySql套件
- Centos7Nginx+PHP安裝步驟CentOSNginxPHP
- vnc安裝步驟,vnc安裝步驟詳解VNC
- linux下安裝redis 單節點安裝操作步驟LinuxRedis
- LNMP--mysql php安裝配置LNMPMySqlPHP
- xftp安裝步驟,xftp安裝的2大步驟FTP
- STF 安裝步驟
- oracle 安裝步驟Oracle
- [ 安裝 ] Zeppelin安裝步驟!
- Linux環境下MySQL安裝部署操作步驟LinuxMySql
- 一般安裝EBS 後的 操作步驟,徵集!
- CentOS7.2編譯安裝PHP7.2.3之史上最詳細步驟。CentOS編譯PHP
- windows安裝cnpm步驟WindowsNPM
- zookeeper安裝部署步驟
- Iris 框架安裝步驟框架
- anaconda安裝步驟
- Linux 安裝步驟Linux
- Nagios安裝步驟iOS
- charles的安裝步驟
- 安裝jdk的步驟JDK
- Sublime Text安裝步驟
- Centos安裝tmux步驟CentOSUX
- Ubuntu安裝cacti步驟Ubuntu
- 安裝weblogic步驟Web
- GreenPlum的安裝步驟
- vnc安裝步驟,如何在Linux(CentOS 7)下vnc安裝步驟VNCLinuxCentOS
- ubuntu20.04.3安裝Qt6.22操作步驟UbuntuQT
- 畫江湖之 docker 篇 【lnmp 下如何安裝 PHP 擴充套件】DockerLNMPPHP套件
- 畫江湖之 docker 篇 [lnmp 下如何安裝 PHP 擴充套件]DockerLNMPPHP套件
- shell之lnmp(nginx-1.0.5+php-fpm5.3.6+mysql)安裝指令碼LNMPNginxPHPMySql指令碼
- 操作步驟
- vnc安裝步驟,4個在Linux下vnc的個安裝步驟VNCLinux
- ubuntu 下安裝nginx步驟UbuntuNginx
- MHA安裝和部署步驟
- Linux安裝Nginx步驟LinuxNginx
- CDH6.2.0安裝步驟