소스 패키지 설치

5511 단어 linux기초nginx
소스 패키지 설치
   :rpm、yum、     

1、    nginx

-      

  ```bash
  wget http://nginx.org/download/nginx-1.18.0.tar.gz
  
  tar -xf nginx-1.18.0.tar.gz -C /opt
  
  cd /opt/nginx-1.18.0
  
  #      nginx   
  
  
  #      :https://repo.huaweicloud.com/epel/7/x86_64/Packages/n/
  
  wget https://repo.huaweicloud.com/epel/7/x86_64/Packages/n/nginx-1.16.1-3.el7.x86_64.rpm
  ``

-     

  ```bash
  #    ,    
  [root@www nginx-1.18.0]# ./configure
  
  #          ,       
  [root@www nginx-1.18.0]# yum install pcre pcre-devel -y
  [root@www nginx-1.18.0]# yum install zlib zlib-devel -y
  
  #     
  make 
  	-j :       
  	
  

>      

#   
  make install PROFIX=/usr/local
  
  #   
  [root@www ~]# /usr/local/nginx/sbin/nginx 
  
  #     
  
  ##       
  /etc/profile   #          
  /root/.bash_profile  #          
  
  NGINX_HOME=/usr/local/nginx/sbin
  PATH=$PATH:$NGINX_HOME
  export PATH
  
  /usr/local/sbin
  /usr/local/bin
  /usr/sbin
  /usr/bin
  /root/.local/bin
  /root/bin
  /root/.local/bin
  /root/bin
  /usr/local/nginx/sbin
   

원본 패키지 컴 파일 PHP
    :    PHP
wget  -O  /opt/ php.tar.gz     https://www.php.net/distributions/php-7.4.16.tar.gz

  
cd/opt
wget  php.tar.gz     https://www.php.net/distributions/php-7.4.16.tar.gz

      
tar xvf  php.tar.gz 

        

 1. #     
   . -  cd /opt/php-7.4.16/       
            ./configure
  
2.#          ,       

#  

#  
 yum install libxml2 ibxml2-devel 

 **# libxml2          **

#    
configure: error: Package requirements (sqlite3 > 3.7.4) were not met:

No package 'sqlite3' found
#  

yum install sqlite sqlite-devel 

**# sqlite          **

   
#        make    	-j :        	
   
   >      
   
   #      make install PROFIX=/usr/local

  
3. #   ./configure    ,      Linux           ,
      。
            
Generating files
configure: creating ./config.status
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE.  By continuing this installation |
| process, you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+

4.#HP     ext    ,       ls

[root@mm_centos php-7.2.12]# ls
acinclude.m4      configure.ac     libtool             modules                   README.NEW-OUTPUT-API             scripts
aclocal.m4        CONTRIBUTING.md  LICENSE             NEWS                      README.PARAMETER_PARSING_API      server-tests-config.php
appveyor          CREDITS          ltmain.sh           pear                      README.REDIST.BINS                server-tests.php
build             ext              main                php7.spec                 README.RELEASE_PROCESS            snapshot
buildconf         EXTENSIONS       makedist            php7.spec.in              README.SELF-CONTAINED-EXTENSIONS  stamp-h.in
buildconf.bat     footer           Makefile            php.gif                   README.STREAMS                    tests
CODING_STANDARDS  generated_lists  Makefile.frag       php.ini-development       README.SUBMITTING_PATCH           travis
config.guess      genfiles         Makefile.fragments  php.ini-production        README.TESTING                    TSRM
config.log        header           Makefile.gcov       README.EXT_SKEL           README.TESTING2                   UPGRADING
config.nice       include          Makefile.global     README.GIT-RULES          README.UNIX-BUILD-SYSTEM          UPGRADING.INTERNALS
config.status     INSTALL          Makefile.objects    README.input_filter       README.WIN32-BUILD-SYSTEM         vcsclean
config.sub        install-sh       missing             README.MAILINGLIST_RULES  run-tests.php                     win32
configure         libs             mkinstalldirs       README.md                 sapi                              Zend
[root@VM_139_38_centos php-7.2.12]# ls ext/
bcmath      dba                 filter   imap       mysqli   pcre          pdo_pgsql   recode      soap      sysvsem    xmlrpc
bz2         dom                 ftp      interbase  mysqlnd  pdo           pdo_sqlite  reflection  sockets   sysvshm    xmlwriter
calendar    enchant             gd       intl       oci8     pdo_dblib     pgsql       session     sodium    tidy       xsl
com_dotnet  exif                gettext  json       odbc     pdo_firebird  phar        shmop       spl       tokenizer  zend_test
ctype       ext_skel            gmp      ldap       opcache  pdo_mysql     posix       simplexml   sqlite3   wddx       zip
curl        ext_skel_win32.php  hash     libxml     openssl  pdo_oci       pspell      skeleton    standard  xml        zlib
date        fileinfo            iconv    mbstring   pcntl    pdo_odbc      readline    snmp        sysvmsg   xmlreader


      /usr/bin/php
    #   
           [root@2021~]#  /usr/bin/php
  
  #     
  
5.  #       
  /etc/profile   #          
  /root/.bash_profile  #          
  
  phg_mm=/usr/bin/
  PATH=$PATH:$phg_mm
  export PATH
 
6.  #    
     source /root/.bash_profile
7.      
     
     php -m

좋은 웹페이지 즐겨찾기