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

Example Analysis of Linux+Apache+PHP+MySQL+Zend Optimizer+PHPMyAdmin

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces the example analysis of Linux+Apache+PHP+MySQL+Zend Optimizer+PHPMyAdmin, which is very detailed and has certain reference value. Friends who are interested must finish it!

I. Preface

Found that many users in this version of the problems are about space building, so write this composition hope to help you, this is also the moderator's duty, hehe. The integration process described in this article is for Discuz! And write, in order to make Discuz! To run better. The principle is not to install, weave and match things that are not needed, so as to make the system clean and fast to the maximum extent.

II. Preparatory procedures

The versions of all of the following programs are recommended and are the latest at the time of release of this article.

Apache 2.0.55

Download address: http://apache.justdn.org/httpd/httpd-2.0.55.tar.gz

PHP 4.4.1

Download address: http://cn.php.net/get/php-4.4.1.tar.gz/from/cn2.php.net/mirror

MySQL 4.0.26

Download address:

Http://downloads.mysql.com/archi... T-4.0.26-0.i386.rpm

Http://downloads.mysql.com/archi... R-4.0.26-0.i386.rpm

Zend Optimizer 2.6.0

Download address: http://prdownloads.sourceforge.n... Pl1.tar.gz?download

PHPMyAdmin 2.7.0-pl1

Download address: https://www.phpmyadmin.net

Third, install the integrated environment

1. Preparatory work:

Since the watermarking function of Discuzables 4.0 needs to be implemented by calling the GD library, please make sure that the GD environment has been installed in your system:

QUOTE:

# rpm-qa | grep zlib

# rpm-qa | grep libpng

# rpm-qa | grep freetype

# rpm-qa | grep jpeg

# rpm-qa | grep gd

If it is not installed, you can install it manually by following these steps:

QUOTE:

(1) install zlib

# tar zxvf zlib-1.2.2.tar.gz

# cd zlib-1.2.2

#. / configure

# make

# make install

(2) install libpng

# tar zxvf libpng-1.2.7.tar.tar

# cd libpng-1.2.7

# cd scripts/

# mv makefile.linux.. / makefile

# cd..

# make

# make install

Note that the makefile here is not generated with. / configure, but is copied directly from the scripts/.

(3) install freetype

# tar zxvf freetype-2.1.9.tar.gz

# cd freetype-2.1.9

#. / configure

# make

# make install

(4) install Jpeg

# tar zxvf jpegsrc.v6b.tar.gz

# cd jpeg-6b/

#. / configure-enable-shared

# make

# make test

# make install

Note: here configure must take the-enable-shared parameter, otherwise, the shared library will not be generated.

(5) install GD

# tar zxvf gd-2.0.33.tar.gz

# cd gd-2.0.33

#. / configure-with-png-with-freetype-with-jpeg

# make install

2. Install and configure MySQL

Before installing MySQL, first check that the MySQL RPM that comes with the Linux installation CD is installed on the system:

QUOTE:

# rpm-qa | grep mysql

If no result is returned, MySQL RPM is not installed in the system. If MySQL RPM information is returned,

You need to uninstall it first:

QUOTE:

# rpm-e MySQL-xxxxxx

The uninstall process may indicate that there is a package dependency problem and the uninstall cannot be completed. You can use-- nodeps or-- force to uninstall.

Force uninstall.

When the MySQL on the system is uninstalled, we begin to install the new version:

Install the client:

QUOTE:

# rpm-ivh MySQL-client-4.0.26-0.i386.rpm

Install the server:

QUOTE:

# rpm-ivh MySQL-server-4.0.26-0.i386.rpm

Start MySQL Server:

QUOTE:

# / etc/rc.d/init.d/mysql start

Set the root password:

QUOTE:

# mysqladmin-u root password new_password_for_root

3. Install and configure Apache

QUOTE:

# tar xzvf httpd-2.0.55.tar.gz

# cd httpd-2.0.55

#. / configure-- prefix=/usr/local/apache-- enable-so (here to save memory and improve Apache performance, only dynamic module parameters are allowed to load, but no other modules are loaded.

If you need any modules, you can mount them manually in the future. )

# make

# make install

Configure Apache:

QUOTE:

# vi / usr/local/apache/conf/httpd.conf

The following lists only the areas where httpd.conf needs to be changed and configured. Other places do not need to be changed for the time being. Skip it.

[Copy to clipboard] [-]

CODE:

ServerAdmin changes this to the E-Mail address of the server administrator (for example: webmaster@yourdomain.com)

[Copy to clipboard] [-]

CODE:

ServerName changed this to the domain name of the server (for example: www.yourdomain.com:80)

[Copy to clipboard] [-]

CODE:

DocumentRoot changes this to your website root (for example: "/ var/www")

3. Install and configure PHP

QUOTE:

# tar xzvf php-4.4.1.tar.gz

# cd php-4.4.1

# / configure-- prefix=/usr/local/php-- with-apxs2=/usr/local/apache/bin/apxs-- with-mysql-- with-config-file-path=/usr/local/php/etc-- with-gd-- enable-gd-native-ttf-- enable-gd-jis-conv-- with-freetype-dir-- with-jpeg-dir-- with-png-dir-- with-zlib-- enable-xml-- enable-mbstring

# make

# make install

# cp php.ini-recommend / usr/local/php/etc/php.ini

Integration with Apache:

Edit the httpd.conf file:

QUOTE:

# vi / usr/local/apache/conf/httpd.conf

Find:

[Copy to clipboard] [-]

CODE:

DirectoryIndex

Add index.php to the later default file

Find:

[Copy to clipboard] [-]

CODE:

AddType application/x-gzip .gz .tgz

Add a line below:

[Copy to clipboard] [-]

CODE:

AddType application/x-httpd-php .php

Save exit

4. Install Zend Optimizer

QUOTE:

# tar xzvf Zend*.gz

# rm-f Zend*.gz

# cd Zend*

#. / install.sh

The installation process is very friendly and simple, but you must enter the correct: / usr/local/php/etc when entering the path to the php.ini file

Zend Optimizer automatically restarts Apache after the installation is complete.

5. Install and configure PHPMyAdmin

QUOTE:

# tar xzvf phpMyAdmin-2.7.0-pl1.tar.gz

Move the extracted directory to the root directory of the server website (set up the web site root directory as / var/www)

# mv phpMyAdmin-2.7.0-pl1 / var/www/phpMyAdmin

Configure PHPMyAdmin:

QUOTE:

# cd / var/www/phpMyAdmin

# vi config.inc.php

Modify:

[Copy to clipboard] [-]

CODE:

$cfg ['PmaAbsoluteUri'] =' http://www.yourdomain.com/phpMyAdmin'; (write out the absolute URL that accesses phpMyAdmin)

[Copy to clipboard] [-]

CODE:

$cfg ['blowfish_secret'] =' cookie'; (using cookie encryption)

[Copy to clipboard] [-]

CODE:

$cfg ['Servers'] [$I] [' connect_type'] = 'socket'; (connect MySQL in socket)

[Copy to clipboard] [-]

CODE:

$cfg ['Servers'] [$I] [' compress'] = TRUE; (enable compression to speed up, change back to FALSE if the access is abnormal)

[Copy to clipboard] [-]

CODE:

$cfg ['Servers'] [$I] [' auth_type'] = 'cookie'; (using cookie for authentication)

Save exit.

At this point, the environment has been built. You can upload Discuz! The forum program begins to install the forum.

The optimization of the environment varies from environment to environment, so please find some optimization documents to have a look at them according to your own hardware configuration and

Server load is targeted to optimize, do not copy mechanically, otherwise it may be counterproductive.

The above is all the content of this article "sample Analysis of Linux+Apache+PHP+MySQL+Zend Optimizer+PHPMyAdmin". Thank you for reading! Hope to share the content to help you, more related 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

Servers

Wechat

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

12
Report