Server 06YUM Pack LAMPMB

Source: Internet
Author: User
Tags install openssl php mysql

Lampmd==linux + apahce + MYSQL + PHP + PHPMYADMIN + BIND


First, check and uninstall

Rpm-qa | grep httpd

Rpm-qa | grep MySQL

Rpm-qa | grep php

Rpm-qa | grep bind


Second, the installation of PHP components (it is possible to use the graphics group)


Yum Groupinstall ' development Tools ' development Libraries ' Pcre pcre-devel

Third, install the necessary components (if the initial installation, it will not be installed)

Yum-y Install patch make GCC gcc-c++ gcc-g77 Flex Bison file Libtool libtool-libs autoconf kernel-devel

Yum-y Install libjpeg libjpeg-devel libpng libpng-devel libpng10 libpng10-devel gd gd-devel

Yum-y Install FreeType freetype-devel libxml2 libxml2-devel zlib zlib-devel

Yum-y Install glib2 glib2-devel bzip2 bzip2-devel libevent libevent-devel

Yum-y Install ncurses ncurses-devel Curl Curl-devel e2fsprogs

Yum-y Install e2fsprogs-devel krb5 krb5-devel libidn libidn-devel

Yum-y install OpenSSL openssl-devel vim-minimal nano sendmail

Yum-y Install Fonts-chinese GetText gettext-devel

Yum-y Install Ncurses-devel gmp-devel pspell-devel Unzip

Iv. installation of Apache+mysql+php+bind

#yum-y install httpd php mysql mysql-server php-mysql bind

Bind self-configuration, as long as can resolve www.a.com and www.pma.com domain name can be two forward to a reverse Zoen

V. Configure and start the HTTPD service

Vim/etc/httpd/conf/httpd.conf

How to set up a virtual host:


1 first cancel the central host, note the documentroot of the center host, support PHP Web page.

Changes in the Apche configuration file. Allow Apache to support index.php suffix file 402 lines

Definition of Virtual Host:

#NameVirtualHost *:80 Remove the comment #


--------The first virtual host-----------------------------note the self-mkdir directory

<virtualhost 192.168.1.202:80>

documentroot/var/www/html defining the root directory

ServerName www.a.com Define server name

Errorlog/var/www/httpd/a.com/error_log Error log path

Customlog/var/www/httpd/a.com/access_log Common Access log path and its type generic


</VirtualHost>

The first virtual host-----------------------------



A second virtual host-----------------------------

<virtualhost 192.168.1.202:80>

Documentroot/var/www/pma

ServerName www.pma.com

Errorlog/var/www/httpd/pma.com/error_log

Customlog/var/www/httpd/pma.com/access_log Common

</VirtualHost>

A second virtual host-----------------------------

Put PHP Web source into/var/www/html

Put the phpMyAdmin inside the/VAR/WWW/PMA.


Two directory permissions belong to the main genus Group: Apache.apache

Start

Service httpd Start

Self-booting Apache

Chkconfig httpd on

Vi. start the MySQL service

Service mysqld Start

#mysql

Mysql> 1 plus password (secure)

SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' xxxxxxxx ');

SET PASSWORD for ' root ' @ ' 127.0.0.1 ' = PASSWORD (' xxxxxxxx ');

SET PASSWORD for ' root ' @ ' host name ' = PASSWORD (' xxxxxxxx ');



2 Deleting dangerous users:

Use MySQL; Set MySQL as the default library

SHOW Databases; See how many libraries

SHOW TABLES; See how many tables are in the default library

DESC user; See user table

SELECT User,host,password from user, see several fields of the user table

DROP User ' root ' @ ':: 1 ';

DROP User ' @ ' localhost ';

DROP User ' @ ' host name '

3 Authorization to User: User authorization for Web file database


Create DATABASE xxx; Create a XXX Database

Grant all privileges the xxx.* to ' xxxx ' @ ' 192.168.1.% ' identified by ' xxxxxxxxx ';


Permissions all put the XXX database to the user XXXX login range 192.168.1.% login password xxxxxxxx


Flush privileges; Notify MySQL to reread the authorization form to make authorization effective immediately

Self-starting MySQL

Chkconfig mysqld on

VII. installation of Apache extensions

#yum-y install httpd-manual mod_ssl mod_perl mod_auth_mysql

VIII. Installation of PHP extensions

#yum Install PHP-GD

#yum-y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc

Ix. installing the MySQL extension

#yum-y Install mysql-connector-odbcmysql-devel libdbi-dbd-mysql


Ten, test installation

1/temporarily shut down the firewall on the server side iptables-f

2/home machine IE input www.a.com into the site installation process, note will prompt you permission (self-modification) and login MySQL user name password, installation is completed according to the source code of the website to enter the management of the admin site. www.a.com/admin.php possible.

3/ie Enter www.pma.com Enter the root username password into the Phpmysql Web control MySQL interface. You can control MySQL.


Server 06YUM Pack LAMPMB

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.