Yum installation lamp environment and management, Yumlamp environment _php Tutorial

Source: Internet
Author: User
Tags imap ldap snmp web hosting automake

Yum installs lamp environment and management, YUMLAMP environment


Prepare the Environment

Yum Add 163 Source

Address:

Http://mirrors.163.com/.help/centos.html

Download mode:

wget Http://mirrors.163.com/.help/CentOS6-Base-163.repo

Use Yum Program installation Required Development Package (below is the standard RPM package name)
Yum install gcc gcc-c++ gcc-g77 Flex Bison autoconf automake bzip2-develzlib-devel ncurses-devel libjpeg-devel libpng-deve L libtiff-develfreetype-devel pam-devel openssl-devel libxml2-devel gettext-devel pcre-devel mysql-devel Net-snmp-develcurl-devel PERL-DBI

installation MySQL

Yum-y install MySQL Mysql-server

Self-booting:
Chkconfig--level 235 mysqld on


Start the service:
/etc/init.d/mysqld start


Configure the password for MySQL:
mysqladmin-u Root Password 123456 (modify it yourself!)

MySQL configuration file:
/etc/my.cnf

Installing Apache

Yum-y Install httpd

Self-booting:
Chkconfig--level 235 httpd on
Start the service:
/ETC/INIT.D/HTTPD start

Apache Web Hosting Directory:
/var/www/html

Apache configuration file:
/etc/httpd/conf/httpd.conf

Listen 80

ServerName 127.0.0.1:80

DocumentRoot "/var/www/html"

DirectoryIndex index.php index.html Index.html.var

Install PHP

Yum-y Install PHP

Restart the httpd service to activate PHP:
/ETC/INIT.D/HTTPD restart

Test whether PHP is installed and finished
vim/var/www/html/info.php

Phpinfo ();
?>

Components for installing PHP

Search for PHP Components:
Yum Search PHP

To install common components:
Yum-y Install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xmlphp-xmlrpc php-bcmath php-mbstring

Remember to restart the HTTPD Service Activation component after installation:
/ETC/INIT.D/HTTPD restart

PHP configuration file:

Vi/etc/php.ini

memory_limit=128m

Post_max_size=8m

Upload_max_filesize=2m

one command to install :

Yum-y Install gcc gcc-c++ gcc-g77 Flex Bison autoconf automake bzip2-develzlib-devel ncurses-devel libjpeg-devel libpng-de Vel libtiff-develfreetype-devel pam-devel openssl-devel libxml2-devel gettext-devel pcre-devel mysql-devel Net-snmp-develcurl-devel perl-dbi mysql mysql-server httpdphp php-mysql php-gd php-imap php-ldap php-odbc php-pear PHP-XM L PHP-XMLRPC Php-bcmath php-mbstring

Then configure the MySQL password and change the Apache configuration file.

http://www.bkjia.com/PHPjc/1068254.html www.bkjia.com true http://www.bkjia.com/PHPjc/1068254.html techarticle Yum Install lamp environment and management, YUMLAMP environment preparation Environment Yum Add 163 source Address: http://mirrors.163.com/.help/centos.html Download method: wget/HTTP Mirrors.163.com/.help/ce ...

  • 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.