PHP7The column introduces how to install php7 nginx mysql environment in ubuntu
Recommended (Free): PHP7
##1. First add nginx_signing.key:wget http://nginx.org/keys/nginx_signing.key sudo apt-key add nginx_signing.key
sudo apt-get update sudo apt-get install nginx
sudo apt-get install mysql-server-5.6 mysql-client-5.6
sudo apt-get install python-software-properties software-properties-common sudo add-apt-repository ppa:ondrej/php sudo apt-get update
sudo apt-get install php7.0-fpm php7.0-mysql php7.0-common php7.0-curl php7.0-cli php7.0-mcrypt php7.0-mbstring php7.0-dom php7.0-gd php7.0-intl php-pear php-imagick php7.0-imap php-memcache php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl php-gettext
cd /etc wget https://github.com/phpredis/phpredis/archive/php7.zip -O phpredis.zip unzip -o /etc/phpredis.zip && mv /etc/phpredis-* /etc/phpredis && cd /etc/phpredis && phpize ./configure && make && sudo make install
cd /etc sudo git clone https://github.com/nicolasff/phpredis cd phpredis sudo git checkout php7 sudo /usr/local/php7/bin/phpize ./configure --with-php-config=/usr/local/php7/bin/php-config make && make install
in /etc/php/7.0/mods-available/redis.ini. The phpredis extension is connected to php7
sudo ln -s /etc/php/7.0/mods-available/redis.ini /etc/php/7.0/fpm/conf.d/redis.ini sudo ln -s /etc/php/7.0/mods-available/redis.ini /etc/php/7.0/cli/conf.d/redis.ini
at the end of /etc/php/7.0/apache2/php.ini
Restart php and nginx
sudo service php7.0-fpm restart sudo service nginx restart
The above is the detailed content of Introducing the installation of php7 and php7 redis extension on ubuntu. For more information, please follow other related articles on the PHP Chinese website!