Lamp Cluster Project Four installing Apache, PHP and its plugins

Source: Internet
Author: User
Tags install openssl php and mysql phpinfo zts install wordpress egrep

Rpm-qa httpd* See if Apache is available

Rpm-e httpd-2.2.22.2 Uninstall the file, if not let unload, then add parameter:--nodeps do not do the dependency check in software

./configure--prefix=/application/apache/--enable-deflate--enable-expires--enable-headers--enable-modules=most- -enable-so--with-mpm=worker--enable-rewrite

Make && make install

Configure http.conf

Modify ServerName

Open vhosts CD extra/

Configure Vhost

Mkdir/app/logs-p Creating a log file

Rpm-qa zlib-devel libxml2-devel libjpeg-devel freetype-devel libpng-develyum install zlib libxml libjepg freetype Lib PNG ge Curl libiconv zlib-devle libxml2-devel libjpeg-devel freetype-devel  libpng-devel  gd-devel Crul-devel-y
Install Libiconv Library wget http: // ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz Ibiconv Library [1]  provides a iconv () function for applications that need to be converted to convert one character encoding to another character encoding: /configure--prefix=/usr/local/libiconvmakemake Install

Bin/apachectl-t  Check Syntax

 forNinch' Ls/data0/www '; Doecho $n >/data0/www/$n/index.html; Done modifies the Hosts file C:\Windows\System32\drivers\etc192.168.1.27bbs.etiantian.org blog.etiantian.org www.etiantian.org hao123.etiantian.org status.etiantian.org with Egrep To view Egrep-V"#|^$"httpd.conf<directory"/application/apache//htdocs">Options Indexes followsymlinks allowoverride None Order allow,deny allow from All</Directory>

Switch

" /data0/www ">    -Indexes followsymlinks    allowoverride None    Order allow,deny      from All </Directory>-no index required
Apachectl Graceful Smooth Restart command

Install PHP

http://museum.php.net/php5/older versions of PHP

Install PHP using 5.3.8 above

Tar XF php-5.5. the. Tar.bz2yum install OpenSSL OpenSSL-devel Curl-devel Libxslt-devel-Yln-s/usr/lib64/libssl.so/usr/lib/compile: You need to specify the path to PHP and MySQL./Configure--prefix=/application/php5.3.15 --with-apxs2=/application/apache/bin/Apxs--with-mysql=/usr/local/MySQL--with-Xmlrpc--with-OpenSSL--with-zlib--with-freetype-dir--with-GD--with-jpeg-dir--with-png-dir--with-iconv=/usr/local/Libiconv--enable- Short-Tags--enable-Sockets--enable-zend-multibyte--enable-Soap--enable-mbstring--enable-Static --enable-gd-native-TTF--with-Curl--with-XSL--enable-FTP--with-libxml-Dirmake&&Make Installln-s/application/php5.3.15/application/php Create link copy configuration file: CP php.ini-production/application/php/lib/php.ini configuration Apache support PHP on line 311 to add AddType application/x-httpd-php. php. Phtmladdtype application/x-httpd-php-source. phpsloadmodule Php5_module Modules/libphp5.so will change both user and group to Ett users (but not found) in 65 useradd ett-m-s/sbin/Nologinvi httpd.conf+166in line 166 add a home file index.php then check the syntax:./bin/apachectl-T../bin/apachectl Graceful

Restart Apache

http://www.etiantian.org/phpinfo.php

Installing PHP Extensions
' Export Lc_all=c '>>/etc//etc/profileinstallation eaccelerator-0.9. 6 . tar.bz2 accelerated extension (incompatible with high version PHP) tar jxf eaccelerator-0.9. 6 . tar.bz2/application/php/bin/phpize. /configure--enable-eaccelerator=shared--with-php-config=/application/php/bin/php-&& make Install

Installing the Memcache Cache expansion module

Tar zxf memcache-2.2.5.tgz/application/php/bin/phpize./configure--with-php-config=/application/php/bin/ Php-configmake && make Install

 Installing the Pdo_mysql expansion module (not required)

/application/php/bin/phpize

./configure--with-php-config=/application/php/bin/php-config--with-pdo-mysql=/usr/local/mysql

To configure the PHP-related extension module:

Ls-l/application/php/lib/php/extensions/no-debug-zts-20090626/Cat>>/application/php/lib/php.ini<<EOF;--cache ext Start by Oldboy --4- ---extension=memcache.soextension=pdo_mysql.soextension=imagick.so;--cache ext End by Oldboy --4- ---Eoftail-5/application/php/lib/Php.inicd/application/php/lib/CP php.ini Php.oldboy.20120418-sed-I.'s#; extension_dir = "./" #extension_dir = "/application/php5.3.15/lib/php/extensions/no-debug-zts-20090626/" #g 'php.ini# Note: The path must be written to grep"Extension_dir ="Ini

Configuring the Eaccelerator Plugin

Mkdir-p/tmp/Eacceleratorchown-R ett.ett/tmp/Eacceleratorcat>>/application/php/lib/php.ini<<eof[eaccelerator]extension=eaccelerator.soeaccelerator.shm_size=" -"Eaccelerator.cache_dir="/tmp/eaccelerator"eaccelerator.enable="1"Eaccelerator.optimizer="1"Eaccelerator.check_mtime="1"Eaccelerator.debug="0"Eaccelerator.filter=""Eaccelerator.shm_max="0"Eaccelerator.shm_ttl="3600"Eaccelerator.shm_prune_period="3600"eaccelerator.shm_only="0"eaccelerator.compress="1"Eaccelerator.compress_level="9"EOF

Check the acceleration situation:

To view the cache directory:

Ll/tmp/eaccelerator

Configuring XCache Acceleration

echo >>'; xcache config by Oldboy 20120418----------------------' >>  -2/home/oldboy/tools/xcache-1.3. 2/xcache.ini >>php.ini

Http://www.etiantian.org/phpinfo.php visit the site to view the installation plug-in situation

Install Wordpress,discuz, Dedecms

MV WordPress/*    /data0/www/blog/mv dedecms-v5.7-gbk-sp1-full/uploads/*     /data0/ www/www/  unzip discuz_x2.5_sc_gbk.zip               MV upload/*/data0/www/bbs/Creating databases Create DATABASE Www;create DB BBS Create DATABASE Blog;grant select,insert,update,delete,alert,create on  www.* to [email protected] ' 10.0.0.% ' Identified by ' 123456 '; 

Lamp Cluster Project Four installing Apache, PHP and its plugins

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.