Lamp Architecture Website Building

Source: Internet
Author: User

Linux+apache+mysql/mariadb+perl/php/python a group of open-source software used to build Dynamic Web sites or servers , themselves are independent programs, but because they are often used together, they have an increasingly high degree of compatibility, which together form a powerful Web application platform.

with the booming of open source Code of the LAMP has formed a three pillars with the Java EE and . Net business software , and the software development of the project in the software investment cost is low, and therefore by the entire IT community attention.

currently The LAMP architecture is the most favored PHP architecture choice for most SMBs , and is a set of architectures that many Linux SAS prefer. Then we will operate the actual combat, if to build such a structure, of course, you can use the Yum method, the installation command is very simple, a command to take care of all.

Yum install httpd httpd-devel mysql-server mysql-devel phpphp-devel php-mysql–y

this command LAMP Environment can be installed successfully, only need to restart Apache,MySQL service.

If you want more features and custom modules, you need to use a source package to install LAMP Architecture. Below we use the source package to implement the LAMP architecture installation and configuration:

    • Source Installation the Apache of LAMP

CD/USR/SRC;

wget http://mirror.bit.edu.cn/apache/httpd/httpd-2.2.27.tar.gz ;

Tar xzf httpd-2.2.27.tar.gz;cd httpd-2.2.27;

./configure--prefix=/usr/local/apache--enable-so--enable-rewrite &&

Make &&make Install


    • Source Installation the MySQL of LAMP

CD/USR/SRC;

wget http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.63.tar.gz ;

Tar xzf mysql-5.1.63.tar.gz; CD mysql-5.1.63;

./configure--prefix=/usr/local/mysql--enable-assembler

Make&&make Install

Configuration Mysql Service for system services:

Cp/usr/local/mysql/share/mysql/my-medium.cnf/etc/my.cnf. copying the master configuration file

Cp/usr/local/mysql/share/mysql/mysql.server/etc/rc.d/init.d/mysqld copying startup files

Chkconfig--add mysqld add MySQL to server
Chkconfig--level 345 mysqld on Chkconfig is the boot driver that adds the msqld service to the current runlevel. 345 level, default system on, start.

Cd/usr/local/mysql

Useradd MySQL
Chown-r Mysql.mysql/usr/local/mysql
/usr/local/mysql/bin/mysql_install_db--user=mysql initializing MySQL
Chown-r mysql var
/usr/local/mysql/bin/mysqld_safe--user=mysql &


    • Source Installation LAMP 's PHP

CD/USR/SRC;

wget http://mirrors.sohu.com/php/php-5.3.28.tar.bz2 ;

Tar jxf php-5.3.28.tar.bz2; CD php-5.3.28;

./configure--PREFIX=/USR/LOCAL/PHP5--with-config-file-path=/usr/local/php/etc--with-apxs2=/usr/local/apache/ bin/apxs--with-mysql=/usr/local/mysql/

Configure error Xml2-config not found. Please check your LIBXML2 installation

[email protected]/]# Yum install libxml2-devel-y


    • Source Installation apache+php Integration

integrate The apache+php environment, modify The httpd.conf configuration file, and then add the following statement:

LoadModule php5_modulemodules/libphp5.so (default already exists)

AddType application/x-httpd-php.php

DirectoryIndex index.phpindex.html ( before adding index.php to index.html )

then create the index.php test page in the/usr/local/apache/htdocs directory and execute the following command:

Cat >>/usr/local/apache/htdocs/index.php<<eof

<?php

Phpinfo ();

?>

Eof

restarting the Apache service, through the IP access interface such as, represents the LAMP environment to build success.

    • Source Installation DISCUZ Forum

cd/usr/src; wget Http://download.comsenz.com/DiscuzX/3.1/Discuz_X3.1_SC_UTF8.zip

Unzip Discuz Package: unzipdiscuz_x3.1_sc_utf8.zip-d/usr/local/apache/htdocs/

Hint:unzip/zip:command not Found solution:yum install-y unzip zip;

To rename a program file: cd/usr/local/apache/htdocs/; MV upload/*.

Give Discuz Directory Full access permissions: cd/usr/local/apache/htdocs/, chmod 777-r data/uc_server/config/uc_client/

then visit IP installation discuz Forum, for example, select "I Agree"

Enter the following interface, the database installation, if it does not exist, you need to create a new database and authorization.

The database creation and authorization commands are as follows:

CreateDatabase Discuz Charset=utf8;

Grantall on discuz.* to [email protected] ' localhost ' identified by "123456";

Click Next until the installation is complete and go to the long-awaited forum screen:

since this the LAMP environment is integrated and built successfully through direct IP access.

Management background prompt: Please delete install/index.php via ftp!

Solution: Cd/usr/local/apache/htdocs/install

[Email protected] install]# RM-RF index.php

Then the visit will not have this hint.

This article is from the "david0512" blog, make sure to keep this source http://gjr0512.blog.51cto.com/6518687/1431276

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.