
运维服务
docker离线安装
一、准备工作:确认架构并下载安装包 1.1 确认目标服务器架构 在目标服务器上执行以下命令,确认系统架构: 输出 x8664:对应 amd64 架构(Intel/AMD 64位服务
[root@wulaoer ~]# yum install epel-release [root@wulaoer ~]# yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm [root@wulaoer ~]# yum install yum-utilsutils是yum源的管理工具,下面安装php7.3版本的
[root@wulaoer ~]# yum install -y php73-php-fpm php73-php-cli php73-php-bcmath php73-php-gd php73-php-json php73-php-mbstring php73-php-mcrypt php73-php-mysqlnd php73-php-opcache php73-php-pdo php73-php-pecl-crypto php73-php-pecl-mcrypt php73-php-pecl-geoip php73-php-recode php73-php-snmp php73-php-soap php73-php-xmll根据网络安装时间不等,安装完成后启动一下php
[root@wulaoer ~]# systemctl enable php73-php-fpm [root@wulaoer ~]# systemctl start php73-php-fpm安装完成,看一下php的进程
[root@wulaoer ~]# ps -ef | grep php root 1028 1 0 13:48 ? 00:00:00 php-fpm: master process (/etc/opt/remi/php73/php-fpm.conf) apache 1155 1028 0 13:48 ? 00:00:00 php-fpm: pool www apache 1156 1028 0 13:48 ? 00:00:00 php-fpm: pool www apache 1157 1028 0 13:48 ? 00:00:00 php-fpm: pool www apache 1160 1028 0 13:48 ? 00:00:00 php-fpm: pool www apache 1161 1028 0 13:48 ? 00:00:00 php-fpm: pool www root 1565 1540 0 13:58 pts/0 00:00:00 grep --color=auto phpphp安装完成,看源码安装方法。
[root@wulaoer ~]# yum -y install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel MySQL pcre-devel [root@wulaoer ~]# yum -y install curl-devel [root@wulaoer ~]# yum -y install libxslt-devel [root@wulaoer ~]# yum install openssl openssl-devel [root@wulaoer ~]# wget http://at1.php.net/distributions/php-7.0.2.tar.gz解压进入文件进行安装到指定文件路径下
[root@wulaoer ~]# ./configure --prefix=/usr/local/php --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pdo-sqlite --with-pear --with-png-dir --with-xmlrpc --with-xsl --with-zlib --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-gd-native-ttf --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-xml --enable-zip编译php文件
[root@wulaoer ~]# make && make install配置php文件,并设置启动
[root@wulaoer ~]# cp php.ini-development /usr/local/php/lib/php.ini [root@wulaoer ~]# cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf [root@wulaoer ~]# cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf [root@wulaoer ~]# cp -R ./sapi/fpm/php-fpm /etc/init.d/php-fpm启动php文件
[root@wulaoer ~]# /etc/init.d/php-fpm安装后我们使用nginx做一下测试,可以参考:https://www.wulaoer.org/?p=1452
评论 0