Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Experience PHP 7.0 on CentOS 7.x / Fedora 21     - Java, extends and implements Usage (Programming)

- CentOS7 install JDK (Linux)

- Depth understanding of DB2 table space (Tablespace) (Database)

- Daemon under Linux (Linux)

- Linux Getting Started tutorial: Experience VirtualBox Virtual Machine chapter (Linux)

- Security measures under Unix multi-user operating system (Linux)

- shell-like program (Programming)

- Implement firewall function on a closed Linux machine (Linux)

- MySQL Tutorial: About checkpoint mechanism (Database)

- Upgrading Oracle to (Database)

- Detailed PHP code optimization [section] (explain reasons) (Programming)

- Use OpenSSL carried BASE64 encoding and decoding (Linux)

- Java generate two-dimensional code by Zxing (Programming)

- High-performance JavaScript reflows and repaints (Programming)

- Linux hybrid character device (Linux)

- Java Concurrency: synchronized (Programming)

- Python implementation restart the router (Programming)

- Observation network performance tools for Linux (Linux)

- Django template inheritance child (Programming)

- Ubuntu 14.10 users to install Audio Recorder 1.5.7 (Linux)

  Experience PHP 7.0 on CentOS 7.x / Fedora 21
  Add Date : 2017-08-31      
  PHP is a well-known general-purpose server web scripting language. Very many online sites are written in PHP. PHP has been evolving over the years, enriching its functionality, making it easier to use, and better to organize scripting languages. PHP development team is preparing for the next PHP version of the release, the name is PHP 7. Now that PHP is PHP version 5.6, you probably know that PHP 6 has gone aborted. PHP 7 proponents do not want the next major version to be confused by other branches, which have been around for a long time. So the next major release of PHP is called PHP 7, not PHP 6. PHP 7.0 is expected to be released in November of this year.

In the next major PHP version there are some good features:

In order to improve the implementation of efficiency and memory footprint, the new version adds the PHPNG function.
The JIT engine was introduced to dynamically compile the Zend opcodes as natural machine code for faster processing performance. This feature allows subsequent programs to call the same code, which will run much faster.
AST (Abstract Syntax Tree) is a newly added feature that enhances support for PHP extensibility and user applications.
Add asynchronous programming capabilities to support parallel tasks in the same request.
The new version will support an independent multi-threaded web server, so you can use a separate storage pool to deal with a lot of concurrent requests.

Install PHP 7 on CentOS / Fedora

Let's take a look at how to install PHP7 on CentOS 7 and Fedora 21. In order to install PHP7, we first need to clone the php-src repository. When the cloning work is complete, we re-configure and compile it. Before proceeding to the next step, make sure that you have installed the following components on the LInux system, otherwise PHP compilation returns an error abort.

All of the above-mentioned requirements can be installed using Yum Package Manager. This is done with one command:

Yum install git autoconf gcc bison
Ready to start installing PHP7? Let us first create a PHP7 directory, as your current working directory.

Mkdir php7
Cd php7
Now clone the php-src repository and run the following command in the terminal.

Git clone https://git.php.net/repository/php-src.git
Work should be completed in a few minutes, here is a sample output, you should see the completion of the task.

[Root @ localhost php7] # git clone https://git.php.net/repository/php-src.git
Cloninginto'php-src '...
Remote: Counting objects: 615064, done.
Remote: Compressing objects: 100% (127800/127800), done.
Remote: Total615064 (delta 492063), reused 608718 (delta 485944)
Receiving objects: 100% (615064/615064), 152.32MiB | 16.97MiB / s, done.
Resolving deltas: 100% (492063/492063), done.
Let us configure, compile PHP7, run the following command in the terminal, start the configuration work:

Cd php-src
The following is a sample output of the ./buildconf command.

[Root @ localhost php-src] #. / Buildconf
Buildconf: checking installation ...
Buildconf: autoconf version 2.69 (ok)
Rebuilding aclocal.m4
Rebuilding configure
Rebuilding main / php_config.h.in
Use the following command to continue the configuration process:

./configure \
--prefix = $ HOME / php7 / usr \
--with-config-file-path = $ HOME / php7 / usr / etc \
--enable-zip \
--enable-bcmath \
--enable-pcntl \
--enable-ftp \
--enable-exif \
--enable-calendar \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-wddx \
--with-curl \
--with-mcrypt \
--with-iconv \
--with-gmp \
--with-pspell \
--with-gd \
--with-jpeg-dir = / usr \
--with-png-dir = / usr \
--with-zlib-dir = / usr \
--with-xpm-dir = / usr \
--with-freetype-dir = / usr \
--with-t1lib = / usr \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--with-openssl \
--with-mysql = / usr \
--with-pdo-mysql = / usr \
--with-gettext = / usr \
--with-zlib = / usr \
--with-bz2 = / usr \
--with-recode = / usr \
--with-mysqli = / usr / bin / mysql_config
This will take a lot of time, when finished you should see the following output:

Creating libtool
Appending configuration tag "CXX" to libtool
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 inthis |
| Distribution in the file LICENSE.By continuing this installation |
| Process, you are bound by the terms of this license agreement. |
| If you donot agree with the terms of this license, you must abort |
| The installation process at this point. |
+ ------------------------------------------------- ------------------- +
Thank you forusing PHP.
Config.status: creating php7.spec
Config.status: creating main / build-defs.h
Config.status: creating scripts / phpize
Config.status: creating scripts / man1 / phpize.1
Config.status: creating scripts / php-config
Config.status: creating scripts / man1 / php-config.1
Config.status: creating sapi / cli / php.1
Config.status: creating sapi / cgi / php-cgi.1
Config.status: creating ext / phar / phar.1
Config.status: creating ext / phar / phar.phar.1
Config.status: creating main / php_config.h
Config.status: executing default commands
Run the following command to complete the compilation process.

The sample output of the "make" command looks like this:

Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
Build complete.
Do not forget to run 'make test'.
Work done, the installation of PHP7, run the following command to install it.

Make install
The sample output of a successful installation process should look something like this:

[Root @ localhost php-src] # make install
Installing shared extensions: / root / php7 / usr / lib / php / extensions / no-debug-non-zts-20141001 /
Installing PHP CLI binary: / root / php7 / usr / bin /
Installing PHP CLI man page: / root / php7 / usr / php / man / man1 /
Installing PHP CGI binary: / root / php7 / usr / bin /
Installing PHP CGI man page: / root / php7 / usr / php / man / man1 /
Installing build environment: / root / php7 / usr / lib / php / build /
Installing header files: / root / php7 / usr / include / php /
Installing helper programs: / root / php7 / usr / bin /
Program: phpize
Program: php-config
Installing man pages: / root / php7 / usr / php / man / man1 /
Page: phpize.1
Page: php-config.1
Installing PEAR environment: / root / php7 / usr / lib / php /
[PEAR] Archive_Tar- installed: 1.3.13
[PEAR] Console_Getopt- installed: 1.3.1
[PEAR] Structures_Graph- installed: 1.0.4
[PEAR] XML_Util - installed: 1.2.3
[PEAR] PEAR - installed: 1.9.5
Wrote PEAR system config file at: /root/php7/usr/etc/pear.conf
You may want to add: / root / php7 / usr / lib / php to your php.ini include_path
/ Root / php7 / php-src / build / shtool install -c ext / phar / phar.phar / root / php7 / usr / bin
Ln -s -f /root/php7/usr/bin/phar.phar / root / php7 / usr / bin / phar
Installing PDO headers: / root / php7 / usr / include / php / ext / pdo /
Congratulations, PHP7 has been installed on your Linux system. After installation, enter the php7 installation file in the sapi / cli inside.

Cd sapi / cli
Verify the PHP version.

[Root @ localhost cli] #. / Php -v
PHP 7.0.0-dev (cli) (built: Mar28201500: 54: 11)
Copyright (c) 1997-2015The PHP Group
ZendEngine v3.0.0-dev, Copyright (c) 1998-2015 ZendTechnologies

to sum up

PHP 7 has also been added to the remi repository, this upcoming version focuses on the implementation of efficiency improvement, its new features to PHP to better meet the needs of modern programming and trends. PHP 7.0 will have many new features, discard some old version of the thing. In the coming days, we would like to see new features and deprecated features. Hope you like it!
- Linux kernel RCU (Read Copy Update) lock Brief (Linux)
- Mac OS X systems create Ubuntu USB boot disk for the Mac (Linux)
- Linux (CentOS) directory file management and file system file compression packing (Linux)
- Replace element and non-replaced elements of learning (Programming)
- Advanced Search Oracle study notes (Database)
- The new features of MySQL 5.7 Generated Column (index function) (Database)
- Puppet Detailed centralized configuration management system (Server)
- Search Linux commands and files - which, whereis, locate, find (Linux)
- ELKstack log analysis platform (Server)
- systemd run levels and service management command Introduction (Linux)
- Piostat - Monitoring and Statistics Linux process (Linux)
- Oracle database import and export (Database)
- Linux script commands - terminal recorder (Linux)
- How to adjust the system time CentOS (Linux)
- SVN hook code set to synchronize Web directory (Server)
- Let Mac OS X dedicated high-speed mobile hard disk can also be read in Linux (Linux)
- Bash command substitution (Programming)
- Linux environment variable settings methods and differences (Linux)
- Zypper command for SUSE Linux package management (Linux)
- CentOS 7.0 Experience with previous versions (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.