LAMP server for Environment Establishment

Source: Internet
Author: User
Article Title: LAMP Server is an environment. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Install and configure Apache 2.2.6 + PHP 5.2.5 + Mysql5.0.46 + Zend Optimizer 3.3.0 + PHPMyAdmin 2.11.1 source code in RedHat Enterprise Linux

Note:

RPM package and source code package storage location/usr/local/src
Source code package compilation and installation location (prefix)/usr/local/xxx

Script and maintenance program storage location/usr/local/sbin
MySQL database location/var/lib/mysql
Apache website root directory/usr/loca/apache2/htdocsl
Apache VM log root directory/data/logs/www
Yum RPM package information file/etc/yum. list
● Install and configure mysql 5.0.46
Mysql 5.0.46 is an enterprise version. It seems that both versions are enterprise versions. I personally think the code quality is better than the Community version. You can download it for free. You do not need to pay for mysql.

Cd/usr/local/src
# Wget http://mirror.provenscaling.com/mysql/enterprise/source/5.0/mysql-5.0.46.tar.gz
# Tar xzvf mysql-5.0.46.tar.gz
# Cd mysql-5.0.46

Modify the maximum number of connections of the mysql client. The default value is only 100, which is far from our requirement.

# Vi SQL/mysqld. cc

Search for the following line:
{"Max_connections", OPT_MAX_CONNECTIONS,
"The number of simultaneous clients allowed.", (gptr *) & max_connections,
(Gptr *) & max_connections, 0, GET_ULONG, REQUIRED_ARG, 100, 1, 16384, 0, 1,
0 },

Change the value of 100 to 1500. Of course, you can change it to a smaller value. It is not recommended to change it too much based on your needs.

{"Max_connections", OPT_MAX_CONNECTIONS,
"The number of simultaneous clients allowed.", (gptr *) & max_connections,
(Gptr *) & max_connections, 0, GET_ULONG, REQUIRED_ARG, 1500, 1, 16384, 0, 1,
0 },

Save.

#. /Configure -- prefix =/usr/local/mysql -- localstatedir =/var/lib/mysql -- with-comment = Source -- with-server-suffix =-enterprise-gpl --- mysqld-user = mysql -- without-debug -- with-big-tables -- with-charset = utf8 -- with-collation = utf8_general_ci -- with-extra-charsets = all -- with-pthread -- enable-static -- enable-thread-safe-client -- with-client-ldflags =-all-static -- with-mysqld-ldflags =-all-static -- enable-validator --- innodb -- without-ndb-debug -- without-isam


If the configuration is successful, the following message is displayed:

MySQL has a Web site at http://www.mysql.com/which carries details on
Latest release, upcoming features, and other information to make your
Work or play with MySQL more productive. There you can also find
Information about mailing lists for MySQL discussion.

Remember to check the platform specific part of the reference manual
Hints about installing MySQL on your platform. Also have a look at
Files in the Docs directory.

Thank you for choosing MySQL!
# Make
Compilation may take a long time. After all, the optimization is quite powerful.

# Mamake ske install

After compilation and installation are complete, perform the following operations:
# Useradd mysql // Add a mysql user
# Cd/usr/local/mysql
# Bin/mysql_install_db -- user = mysql
# Chown-R root: mysql. // set the permission. Note that there is "."
# Chown-R mysql/var/lib/mysql // set mysql Directory Permissions
# Chgrp-R mysql. // note that there is "."
# Cp share/mysql/my-medium.cnf/etc/my. cnf
# Cp share/mysql. server/etc/rc. d/init. d/mysqld // automatically start mysql upon startup.
# Chmod 755/etc/rc. d/init. d/mysqld
# Chkconfig -- add mysqld
#/Etc/rc. d/init. d/mysqld start // start MySQL
# Bin/mysqladmin-u root password "password_for_root"
# Service mysqld stop // close MySQL

[1] [2] [3] [4] Next page

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.