Compile and configure the LAMP Environment

Source: Internet
Author: User
Tags rehash
GoogleDocs version here, welcome to participate in the comprehensive documentation docs. google. comdocumentd14ed599Rn9yQvt_V_Bi8uKWBfPmtwZ3la73-KIpWf4_Medit found that GoogleDocs can not be like Zoho to embed documents in HTML, so I had to paste a copy here. Compile, install, and install the Apache dependency library PCRE8.3: extract the source code,

Google Docs version here, welcome to participate in the improvement of the document https://docs.google.com/document/d/14ed599Rn9yQvt_V_Bi8uKWBfPmtwZ3la73-KIpWf4_M/edit found that Google Docs can not be like Zoho that the document is embedded in HTML, so I had to paste a copy here. Compile, install, and install the Apache dependency library PCRE 8.3: Decompress the source code,

The Google Docs version is here. Welcome to the comprehensive documentation.

Https://docs.google.com/document/d/14ed599Rn9yQvt_V_Bi8uKWBfPmtwZ3la73-KIpWf4_M/edit

I found that Google Docs could not embed documents into HTML like Zoho, so I had to paste a copy here.

Compile, install, and install the Apache dependency library PCRE 8.3:
  1. Decompress the source code and run the command
    $./Configure-prefix =/data/cherrotluo/local/pcre
  2. $ Make
  3. $ Make install
Install Apache Httpd 2.4:
  1. Download the apache httpd source code and decompress it. Then, download apr and apr-utils from the srclib/apr/srclib/apr-util directories in the httpd source code directory.
  2. Execute Command
    $./Configure-prefix =/data/cherrotluo/local/httpd-with-supported ded-apr-with-pcre =/data/cherrotluo/local/pcre
  3. $ Make
  4. $ Make install
Install MySQL 5.5.25a:
  1. Install cmake. MySQL 5.5 uses cmake instead of the configure script to configure the installation process. Therefore, it is very easy to install or compile cmake.
  2. Use cmake to configure MySQL. See mysql official documentation: http://forge.mysql.com/wiki/CMake#Very_quick_how-to-build
    And this tutorial: http://www.cnblogs.com/church/archive/2012/07/17/2595749.html
    My configuration command is:
    $ Mkdir build-cherrot
    $ Cd build-cherrot
    $/Cmake \
    # Installation directory
    -DCMAKE_INSTALL_PREFIX =/data/cherrotluo/local/mysql \
    # Database storage directory
    -DMYSQL_DATADIR = ~ /Data/mysql \
    # Unix Socket file path
    -DMYSQL_UNIX_ADDR = ~ /Data/mysql. socket \
    # Install the MYISAM storage engine
    -DWITH_MYISAM_STORAGE_ENGINE = 1 \
    # Installing the InnoBase storage engine
    -DWITH_INNOBASE_STORAGE_ENGINE = 1 \
    # Installing the Archieve storage engine
    -DWITH_ARCHIVE_STORAGE_ENGINE = 1 \
    # Installing the BlackHole storage engine
    -DWITH_BLACKHOLE_STORAGE_ENGINE = 1 \
    # Installing the database partition storage engine
    -DWITH_PARTITION_STORAGE_ENGINE = 1 \
    # Allow Local Data Import
    -DENABLED_LOCAL_INFILE = 1 \
    # Use the ZLIB library that comes with MySQL source code. My system Zlib library version is old. If this sentence is not provided, although cmake can be used, the following error occurs when you make to 56%: storage/innobase/page/page0zip. c: 2968: error: 'z _ Block' undeclared (first use in this function) (see http://bugs.mysql.com/bug.php? Id = 65856)
    -DWITH_ZLIB = bundled \
    # Use the system READLINE library to implement the shortcut key function
    -DWITH_READLINE = system \
    # Use the built-in SSL library
    -DWITH_SSL = system \
    # Use the UTF-8 Character Set
    -DDEFAULT_CHARSET = utf8 \
    # Verifying character sets
    -DDEFAULT_COLLATION = utf8_general_ci \
    # Install all extended character sets
    -DEXTRA_CHARSETS = all \
    # Set the listening port
    -DMYSQL_TCP_PORT = 8600 ..
Install MySQL 5.1

Because there is already a mysql 5.0 on the machine, and 5.5 greatly incompatible (https://discussions.apple.com/thread/2698727), so return 5.1 re-Compilation

  1. . /Configure-prefix =/data/cherrotluo/local/mysql5.1-localstatedir =/data/cherrotluo/data/mysql-enable-local-infile-with-charset = utf8-with-collation = utf8_general_ci-with-extra-charsets = all? -With-unix-socket-path =/data/cherrotluo/data/mysql. socket-with-tcp-port = 8600? -With-mysqld-user = cherrotluo-with-zlib-dir = bundled
  2. Make; make install
  3. Initialize the database:
    ./Bin/mysql_install_db-datadir =/data/cherrotluo/data/mysql
  4. Start mysqld with your own configuration file:
    ./Bin/mysqld_safe-defaults-file = ~ /Source/mysql-5.1.63/support-files/my-large.cnf
  5. Change Password:
    Mysqladmin-u root-h 127.0.0.1 password 'new-password' # Use-S to specify the socket path when replacing 127.0.0.1 with localhost
Install PHP5.4.5
  1. ./Configure-prefix =/data/cherrotluo/local/php-with-apxs2 =/data/cherrotluo/local/httpd... -With-mysql =/data/cherrot/local/mysql5.1/-with-mysql-sock =/data/cherrotluo/data/mysql/-with-pdo-mysql =/data/ cherrot/local/mysql5.1/
  2. Make; make install
Multi-instance running

Multi-instance running mainly involves MySQL multi-instance and Apache Multi-instance.

MySQL multi-instance running

$ Mysqld_safe-defaults-file = ~ /Data/mysql/my. cnf
$ Mysql-h localhost-P 8600-S ~ /Data/mysql. socket-u root-p
# Or $ mysql-h 127.0.0.1-P 8600-u root-p. The following command can be replaced
$ Mysqladmin-h localhost-P 8600-S ~ /Data/mysql. socket-u root-p shutdown

Anonymous Users are enabled by default. Therefore, you can only log on anonymously with the root account or without the specified password. If you log on with another user, an Access Denied message is displayed. After deleting anonymous users, you can use other users to log on to mysql.

Edit the configuration file (my. cnf) and change no-auto-rehash to support Automatic completion. When the client connects to the database, add the-auto-rehash parameter to automatically complete the TAB, but only the table and column names can be completed.

Original article address: Compile and configure the LAMP environment. Thanks to the original author for sharing.

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.