一條命令的另一個名字,你能夠理解爲外號。php
[root@localhost /]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 ^C [root@localhost /]# alias viens0s3='vi /etc/sysconfig/network-scripts/ifcfg-enp0s3'
[root@localhost ~]# vi .bashrc 插入alias viens0s3='vi /etc/sysconfig/network-scripts/ifcfg-enp0s3'
[root@localhost src]# wget http://cn2.php.net/distributions/php-7.3.0.tar.bz2 [root@localhost src]# tar jxvf php-7.3.0.tar.bz2 [root@localhost src]# tar jxvf php-7.3.0.tar.bz2 tar (child): bzip2: Cannot exec: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now [root@localhost src]# yum install bzip2 Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.163.com * updates: mirrors.aliyun.com base | 3.6 kB 00:00 extras | 3.4 kB 00:00 updates | 3.4 kB 00:00 extras/7/x86_64/primary_db | 156 kB 00:01 Resolving Dependencies --> Running transaction check ---> Package bzip2.x86_64 0:1.0.6-13.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: bzip2 x86_64 1.0.6-13.el7 base 52 k Transaction Summary ================================================================================ Install 1 Package Total download size: 52 k Installed size: 82 k Is this ok [y/d/N]: y Downloading packages: bzip2-1.0.6-13.el7.x86_64.rpm | 52 kB 00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : bzip2-1.0.6-13.el7.x86_64 1/1 Verifying : bzip2-1.0.6-13.el7.x86_64 1/1 Installed: bzip2.x86_64 0:1.0.6-13.el7 Complete! [root@localhost src]# tar jxvf php-7.3.0.tar.bz2
vi 裏面在通常模式下,按DD能夠刪除行(剪切),5dd(剪切五行),光標挪到要粘貼的位置,按p,操做錯誤後,想要撤銷,能夠按u,反撤銷能夠按ctrl rhtml
編譯安裝一個軟件包的三步驟:python
./configure make make install
./configure --preefix=/usr/local/php-fpm --with-config-file-path=/usr/local/php-fpm/etc --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --with-pear --with-curl --with-openssl
--prefix=/usr/local/php-fpm
--with-config-file-path=/usr/local/php-fpm/etc
--enable-fpm
--with-fpm-user=php-fpm
--with-fpm-group=php-fpm
--with-mysql=/usr/local/mysql
--with-mysqli=/usr/local/mysql/bin/mysql_config
--with-pdo-mysql=/usr/local/mysql
--with-mysql-sock=/tmp/mysql.sock
--with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --with-pear --with-curl --with-openssl
[root@localhost php-7.3.0]# ./configure --prefix=/usr/local/php-fpm --with-config-file-path=/usr/local/php-fpm/etc --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --with-pear --with-curl --with-openssl configure: WARNING: unrecognized options: --with-mysql, --with-mcrypt, --enable-gd-native-ttf checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for a sed that does not truncate output... /usr/bin/sed checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu checking for cc... no checking for gcc... no configure: error: in `/usr/src/php-7.3.0': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details
[root@localhost php-7.3.0]# yum install -y gcc
查找對應的包後,通常都是安裝devel的安裝包mysql
configure: error: libxml2 not found. Please check your libxml2 installation.
[root@localhost php-7.3.0]# yum list |grep libxml2 libxml2.x86_64 2.9.1-6.el7_2.3 @anaconda libxml2-python.x86_64 2.9.1-6.el7_2.3 @base libxml2.i686 2.9.1-6.el7_2.3 base libxml2-devel.i686 2.9.1-6.el7_2.3 base libxml2-devel.x86_64 2.9.1-6.el7_2.3 base libxml2-static.i686 2.9.1-6.el7_2.3 base libxml2-static.x86_64 2.9.1-6.el7_2.3 base [root@localhost php-7.3.0]# yum install -y libxml2-devel.i686 libxml2-devel.x86_64
checking for cURL 7.15.5 or greater... configure: error: cURL version 7.15.5 or later is required to compile php with cURL support yum install libcurl-devel.i686 libcurl-devel.x86_64
configure: error: jpeglib.h not found. yum -y install libjpeg-devel
configure: error: png.h not found. yum install -y libpng-devel
configure: error: freetype-config not found. [root@localhost ~]# yum install -y freetype-devel.i686 freetype-devel.x86_64
php 7.3不支持mysql 或者 mariadb 5.6 之後的版本linux
configure: error: wrong mysql library version or lib not found. Check config.log for more information [root@localhost src]# wget http://mirrors.163.com/mysql/Downloads/MySQL-5.6/mysql-5.6.41-linux-glibc2.12-x86_64.tar.g
tar xzvf mysql-5.6.39-linux-glibc2.12-x86_64.tar.gz mv mysql-5.6.39-linux-glibc2.12-x86_64 /usr/local/mysql5.6
./configure --prefix=/usr/local/php-fpm --with-config-file-path=/usr/local/php-fpm/etc --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-mysql=/usr/local/mysql5.6 --with-mysqli=/usr/local/mysql5.6/bin/mysql_config --with-pdo-mysql=/usr/local/mysql5.6 --with-mysql-sock=/tmp/mysql.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --with-pear --with-curl --with-openssl
ERROR: [pool www] cannot get uid for user ‘php-fpm’ useradd php-fpm
: 補充:nginx
diff 查看兩個文件的差別的,如 diff 1.txt 2.txt 4.28-php編譯安裝2 4.29-php編譯安裝3 4.30-編譯安裝Nginxsql
官網:http://nginx.org/bash
官方文檔:http://nginx.org/en/docs/install.htmldom
wget http://nginx.org/download/nginx-1.14.2.tar.gz
tar zxvf nginx-1.14.2.tar.gz cd nginx-1.14.2
./configure --prefix=/usr/local/nginx --with-http_ssl_module make && make install
啓動:curl
/usr/local/nginx/sbin/nginx