Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install php5 on ubuntu12

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly shows you "how to install php5 on ubuntu12", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to install php5 on ubuntu12" this article.

The method of installing php5 on ubuntu12: 1, create users; 2, install dependency packages; 3, compile and install php;4, modify configuration files and start php.

This article operating environment: Ubuntu12.04 system, PHP5.5 version, DELL G3 computer

How to install php5 on ubuntu12?

Ubuntu 12.04 install php5.5:

1. Create a user

/ usr/sbin/groupadd www/usr/sbin/useradd-r www-g www

2. Install the dependency package

Apt-get install-y make gcc gathers + curl libxml2 libxml2-dev libssl-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev bzip2 libbz2-dev libxpm-dev libfreetype6-dev libedit-dev libxslt-dev tar zxvf libmcrypt-2.5.8.tar.gz-C / home/tbt/src/cd / home/tbt/src/libmcrypt-2.5.8//sbin/ldconfigcd libltdl/./configure-- enable-ltdl-installmake & & make installcd. / configuremake & & make install tar zxvf libiconv-1.14.tar .gz-C / home/tbt/src/cd / home/tbt/src/libiconv-1.14sed-I-e'/ gets is a security/d'. / srclib/stdio.in.h./configure-- prefix=/usr/localmake & & make install

3. Compile and install php

Tar zxvf php-5.5.14.tar.gz-C / home/tbt/src/cd / home/tbt/src/php-5.5.14./configure-prefix=/home/tbt/php\-- with-mysql=/home/tbt/mysql\-- with-mysqli=/home/tbt/mysql/bin/mysql_config\-- with-pdo-mysql=/home/tbt/mysql\-- enable-fpm\-- with-fpm-user=www\-- with-fpm- Group=www\-- with-curl\-- with-pear\-- with-gd\-- with-jpeg-dir\-- with-png-dir\-- with-zlib\-- with-xpm-dir\-- with-freetype-dir\-- with-mcrypt\-- with-mhash\-- with-openssl\-with-xmlrpc\-- with-xsl\-- with-bz2\-- with-gettext\-- disable-debug\-- enable-exif\-- enable-wddx\-- Enable-zip\-- enable-bcmath\-- enable-calendar\-- enable-ftp\-- enable-mbstring\-- enable-soap\-- enable-sockets\-- enable-shmop\-- enable-dba\-- enable-sysvsem\-enable-sysvshm\-- enable-sysvmsg\-- enable-pcntl\-- with-libedit\-- with-readlinemake ZEND_EXTRA_LIBS='-liconv'make install

Note: if mysql and php are not on the same server, you need to modify the above parameters for mysql to the following

-with-mysql\-with-mysqli\-with-pdo-mysql\

4. Modify the configuration file and start php

Cp php.ini-production / home/tbt/php/lib/php.inicd / home/tbt/php/etc/cp php-fpm.conf.default php-fpm.confcd.. sed-I's / ^ Date.timezone = / date.timezone = PRC/' / home/tbt/php/lib/php.inichown-R www:www / home/tbt/phpcp php.ini-production / home/tbt/php/lib/php.inicd / home/tbt/php/etc/cp php-fpm.conf.default php-fpm.confcd.. sed-I's / ^ Date.timezone = / date.timezone = PRC/' / home/tbt/php/lib/php.inichown-R www:www / home/tbt/php/home/tbt/php/sbin/php-fpm is all the contents of the article "how to install php5 on ubuntu12". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report