Install and configure xampp in CentOS

Source: Internet
Author: User

 1. Here I selectCentOSOf course, you can choose your own version.Http://www.centos.orgOf course, it is worth noting that32Bitwise AND64Bit selection. If the machine meets64It is not necessary to use32Bit installation here is nothing to mention, try to minimize the installation, leave a development tool! To

  

I. Installation

Here I choseCentOSOf course, you can choose your own version.Http://www.centos.org

Of course, it is worth noting that32Bitwise AND64Bit selection. If the machine meets64It is not necessary to use32Bit

There is nothing to talk about here for installation. Try to minimize installation and leave one"Development Tools"That's it!

As for partitions,GoogleA lot! However, we tried to select the default partition for the first contact. The application is successfully achieved, and further research is still feasible. This will increase your confidence and learning efficiency!


II,AMPInstallation, configuration, and optimization

That isApache,Mysql,Php

In my learning process, using an integrated installation package instead of configuring one by one will compromise your confidence and lead to many problems!

Here, I recommend:LAMPPOfficial Address:Http://www.apachefriends.org/zh_cn/xampp-linux.html

Download the source code package, decompress it, and install and start it.

WgetHttp://nchc.dl.sourceforge.net... linux-1.6.8a.tar.gz

Tar xvfz xampp-linux-1.6.8a.tar.gz-C/opt

/Opt/lampp start

At this time,LamppThe component is successfully started, but it does not start with the system every time

Ln-s/opt/lampp/etc/rc. d/rc3.d/S99lampp
Ln-s/opt/lampp/etc/rc. d/rc4.d/S99lampp
Ln-s/opt/lampp/etc/rc. d/rc5.d/S99lampp

In this wayOKNow!

Then let's restart the server and check whether the server is successful or not.

Shutdown-r now

------------------------------------------

However, this is dangerous. If your server is already in the public network, you need to execute the following command immediately and set the password as prompted. For details, refer toLamppOfficial description

/Opt/lampp security


------------------------------------------

EnableEAccelerator

Vi/opt/lampp/etc/php. ini

SearchEaccelerator#Remove and restartApacheYou can.

You can also change the parameters by default. For exampleEaccelerator. shm_sizeChange32
It meansEacceleratorThe number of available shared memory in the cache is32 M

------------------------------------------

In this case, yourLAMPIt is already a basic application! But you need to know that this component does not exist by default.ZendYou can also install the configuration.

ZendOptimizer3.3.9 and earlier versions have been installed in Linux. sh installation script. After installation, there is no other solution except to disable SELinux. In the Fedora version, I went from Fedora 6 to Fedora 10, from CentOS 5.1 to CentOS5.3, I have never succeeded in testing multiple versions. It seems that SELinux has never been disabled before it can be used.

Wget http://downloads.zend.com/optimizer/3.3.9/ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
The next step is to decompress the package.

Tar zxvf ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz

After decompression, copy the file to the corresponding path.

Music ZendOptimizer-3.3.9-linux-glibc23-i386/usr/local/Zend
Cp/usr/local/Zend/data/5_rjx_comp/ZendOptimizer. so/usr/local/Zend

Add it to the php. ini file.

Vi/etc/php. ini
Add the following lines to the end of php. ini.
Zend_optimizer.optimization_level = 1
Zend_extension = "/usr/local/Zend/ZendOptimizer. so"

The most important thing is to modify the FACL value.

Chcon-u system_u /Usr/local/Zend/
Chcon-t httpd_sys_content_t/usr/local/Zend/

Chcon-u system_u/usr/local/Zend/ZendOptimizer. so
Chcon-t texrel_shlib_t/usr/local/Zend/ZendOptimizer. so

Restart httpd to check whether it is OK...

/Etc/init. d/httpd restart
Stopping httpd: [OK]
Starting httpd: [OK]

 


------------------------------------------


Time Difference

Add in php. ini (under eaccelerator)

;;;;;;;;;;;;;;;;;;;
; Module Settings;
;;;;;;;;;;;;;;;;;;;

[Date]
; Defines the default timezone used by the date functions
; Date. timezone =
Date. timezone = Etc/GMT-8

------------------------------------------


Modify the maximum number of mysql connections

My. cnf

Add a line under [mysqld]

Max_connections = 1500

------------------------------------------


Pseudo-static

Open the apache configuration file (httpd. conf)

Find
# LoadModule rewrite_module modules/mod_rewrite.so
Remove the previous #
Then locate AllowOverride None.
Change All of them to AllowOverride All
Pseudo-static functions are supported.

Place corresponding htaccess rules in the root directory of the bbs and other sites.


------------------------------------------

# Include conf/extra/httpd-mpm.conf

# Include conf/extra/default httpd-default.conf Value

# Include conf/extra/httpd-info.conf

# Include conf/extra/httpd-vhosts.conf this is the configuration file of the apache Virtual Host

Remove the front edge # Make proper configuration according to relevant principles!

Httpd-mpm.conf is the most influential

<IfModule prefork. c>
ServerLimit 2000
StartServers 10
MinSpareServers 10
MaxSpareServers 15
MaxClients 1500
MaxRequestsPerChild 10000
</IfModule>

This is my configuration

 


Virtual Host Configuration


# Include conf/extra/httpd-vhosts.conf this is the configuration file of the apache Virtual Host


<VirtualHost *: 80>
ServerAdmin www@iamhe.cn
DocumentRoot/opt/lampp/htdocs/wwwroot/bbs (website directory)
ServerName bbs.123.com (domain name)
ServerAlias bbs2.123.com (alias)
& Nbs

Related Article

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.