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

The source code installation shell script for PHP in Linux

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

#! / bin/bash

# install PHP

Rpm-e php php-cli php-ldap php-common php-mysql-- nodeps

Yum-y install zlib-devel libxml2-devel

Tar zxf / libmcrypt-C / usr/src

Cd / usr/src/libmcrypt

. / configure

Make & & make install

Ln-s / usr/local/lib/libmcrypt. / usr/lib

Cd

Tar zxf / mhash--C / usr/src

Cd / usr/src/mhash-

. / configure

Make & & make install

Ln-s / usr/local/lib/libmhash / usr/lib

Cd

Tar zxf / mcrypt--C / usr/src

Cd / usr/src/mcrypt-

Export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

. / configure

Make & & make install

Cd

Tar zxf / php--C / usr/src

Cd / usr/src/php-

/ configure-- prefix=/usr/local/php5-- with-mcrypt-- with-apxs2=/usr/local/httpd/bin/apxs-- with-mysql=/usr/local/mysql-- with-mysqli=/usr/local/mysql/bin/mysql_config-- with-config-file-path=/usr/local/php5-- enable-mbstring

Make & & make install

Cp / usr/src/php-/php.ini-development / usr/local/php5/php.ini

Sed-I '680c default_charset = "utf-8" / usr/local/php5/php.ini

Sed-I 's/short_open_tag = Off/short_open_tag = On/' / usr/local/php5/php.ini

Sed-I '873c extension=php_mysqli.dll' / usr/local/php5/php.ini

Tar zxf / zend-loader-php-C / usr/src

Cd / usr/src/zend-loader-php

Cp ZendGuardLoader.so / usr/local/php5/lib/php

Sed-I '340a zend_extension=/usr/local/php5/lib/php/ZendGuardLoader.so' / usr/local/php5/php.ini

Sed-I '341a zend_loader.enable=1' / usr/local/php5/php.ini

Sed-I '259c DirectoryIndex index.html index.php' / usr/local/httpd/conf/httpd.conf

Sed-I '396a AddType application/x-httpd-php .php' / usr/local/httpd/conf/httpd.conf

/ usr/local/httpd/bin/apachectl restart

Echo "> > / usr/local/httpd/htdocs/test1.php

Echo "

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

Database

Wechat

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

12
Report