압축 해제 ㅋㅋㅋ tar -xjvf
yum install -y lrzszswoole 파일 패키지 업로드
[root@VM_0_5_centos ~]# cd /home/[root@VM_0_5_centos home]# mkdir -p work/study/softpackage[root@VM_0_5_centos softpackage]# pwd/home/work/study/softpackage[root@VM_0_5_centos softpackage]# ll total 14900-rw-r--r-- 1 root root 15235268 Apr 2 21:19 php-7.2.29.tar.bz2[root@VM_0_5_centos softpackage]# tar -xjvf php-7.2.29.tar.bz2 drwxrwxr-x 14 root root 4096 Mar 17 18:16 php-7.2.29-rw-r--r-- 1 root root 15235268 Apr 2 21:19 php-7.2.29.tar.bz2[root@VM_0_5_centos softpackage]# cd php-7.2.29/[root@VM_0_5_centos php-7.2.29]# yum install gcc----configure: error: libxml2 not found. Please check your libxml2 installation.----//start安装豪华套餐yum -y install gcc libxml2 yum -y install php-mcrypt libmcrypt libmcrypt-devel autoconf freetype gd jpegsrc libmcrypt libpng libpng-devel libjpeg libxml2 libxml2-devel//end[root@VM_0_5_centos php-7.2.29]# ./configure --prefix=/home/work/study/soft/php[root@VM_0_5_centos php-7.2.29]# make[root@VM_0_5_centos php-7.2.29]# make install[root@VM_0_5_centos php-7.2.29]# cd /home/work/study/[root@VM_0_5_centos study]# ll total 8drwxr-xr-x 3 root root 4096 Apr 2 22:04 soft drwxr-xr-x 3 root root 4096 Apr 2 21:44 softpackage[root@VM_0_5_centos study]# cd soft/php/[root@VM_0_5_centos php]# [root@VM_0_5_centos php]# ./bin/php -m//测试[root@VM_0_5_centos php]# vim test.php[root@VM_0_5_centos php]# ./bin/php test.php 1585836467[root@VM_0_5_centos php]# //编辑[root@VM_0_5_centos php]# vi ~/.bash_profile # .bash_profile # Get the aliases and functionsif [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programsPATH=$PATH:$HOME/binexport PATHalias php=/home/work/study/soft/php/bin/php//让配置生效[root@VM_0_5_centos php]# source ~/.bash_profile [root@VM_0_5_centos php]# php -vPHP 7.2.29 (cli) (built: Apr 2 2020 22:03:18) ( NTS )Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies//测试[root@VM_0_5_centos study]# mkdir demo[root@VM_0_5_centos study]# cd demo/[root@VM_0_5_centos demo]# vim t.php[root@VM_0_5_centos demo]# php t.php1585836787[root@VM_0_5_centos demo]# pwd/home/work/study/demo
[root@VM_0_5_centos study]# cd softpackage/php-7.2.29/[root@VM_0_5_centos php-7.2.29]# pwd/home/work/study/softpackage/php-7.2.29[root@VM_0_5_centos php-7.2.29]# cp php.ini-development /home/work/study/soft/php/etc/[root@VM_0_5_centos ~]# cd /home/work/study/soft/php/etc/[root@VM_0_5_centos etc]# ll total 80-rw-r--r-- 1 root root 1354 Apr 2 22:05 pear.conf-rw-r--r-- 1 root root 71232 Apr 2 22:17 php.ini-development[root@VM_0_5_centos etc]# mv php.ini-development php.ini[root@VM_0_5_centos php-7.2.29]# php -i | grep php.ini Configuration File (php.ini) Path => /home/work/study/soft/php/lib[root@VM_0_5_centos php-7.2.29]# cd /home/work/study/soft/php/[root@VM_0_5_centos php]# mv ./etc/php.ini ./lib/rrree 이 저작물은 "CC 라이센스"를 채택하고 있으며, 재인쇄 시 작성자와 이 글에 대한 링크를 명시해야 합니다
위 내용은 PHP7 소스코드 설치 swoole의 전체 과정을 소개합니다.의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!