LAP + MySQL

Source: Internet
Author: User
Tags bz2 install php mysql client

LAP:

Yum Installation:

Yum install-y httpd httpd-devel mysql php-devel php


Source Installation:

1) Install Apache

yum-y Install Apr-devel apr-util-devel

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

tar zxf httpd-2.2.27.tar.gz; CD httpd-2.2.27

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

Make && make install


2) Install the MySQL client

Yum-y install MySQL


3) Install PHP

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-mysql=mysqlnd

--with-mysqli=mysqlnd

--with-pdo-mysql=mysqlnd

--with-apxs2=/usr/local/apache/bin/apxs

Make-j8 && make Install-j8

4) Modify the local Hosts file

Vim/etc/hosts

MySQL IP set a domain name

One of the advantages of this approach is that if you want to switch the database, do not need to go to the configuration file changes, directly modify the local Hosts file can be


to modify the Apache configuration file:

sed-i-E ' S/addtype application\/x-gzip. gz. Tgz/addtype application\/x-gzip. gz. tgz \ n AddType application\/x-http d-php. php/' $HTTP _d/conf/httpd.conf


Sed-i ' s/directoryindex\ index.html/directoryindex\ index.php\ index.html/' $HTTP _d/conf/httpd.conf


echo "<?php phpinfo ();? > ">>/usr/local/apache/htdocs/index.php


Access to the PHP information page via IP access



MySQL:      

tar zxf mysql-5.1.63.tar.gz; CD mysql-5.1.63

./configure--prefix=/usr/local/mysql --enable-assembler ; Make-j8 && make Install-j8


Cp/usr/local/mysql/share/mysql/my-medium.cnf/etc/my.cnf

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

Chkconfig--add mysqld

Chkconfig--level 345 mysqld on

Cd/usr/local/mysql


Useradd MySQL


Chown-r Mysql.mysql/usr/local/mysql

./bin/mysql_install_db--user=mysql

Chown-r mysql.mysql var

./bin/mysqld_safe--user=mysql &


Log in to MySQL to authorize the database:

./bin/mysql

>create database Discuz;

>grant all * * to [e-mail protected] '% ' identified by ' 123456 ';

>quit



################ #最后, if you want to install the forum please continue, otherwise, you can omit ###############################

Log in to MySQL to authorize the database:

./bin/mysql

>create database Discuz;

>grant all Discuz . * To [email protected] '% ' identified by ' 123456 ';

>quit


LAP:

Download the Discuz source package file and unzip it:

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

Unzip Discuz_x3.1_sc_utf8.zip

To rename a program file:

MV upload/*/usr/local/apache/htdocs/

Give Discuz directory full access permissions:

CD /usr/local/apache/htdocs/

chmod 777 Data/uc_server/config/uc_clien


Then visit the IP Installation discuz forum, select "I Agree" and fill in the following information according to your needs


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/71/89/wKiom1XTFE_RS250AAFjzbDzzW4460.jpg "title=" F40TZ0F7U{63{A{~FAD) 1ix.png "alt=" Wkiom1xtfe_rs250aafjzbdzzw4460.jpg "/>

Installation Complete!!!


Novice, please advise, do not spray ^ ^^ ^^ ^

LAP + MySQL

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.