CentOS Yum Install Apache + PHP + MySQL

Source: Internet
Author: User
Tags gettext install php install openssl openssl php mysql

# Write a local yum repository

rm-rf/etc/yum.repos.d/*

cd/etc/yum.repos.d/

Cat > Local.repo <<end

[Local]

Name=qiqi

baseurl=file:///media/rhel_6.1\ i386\ disc\ 1/

Enabled=1

Gpgcheck=0

End

# Check and Uninstall

Rpm-qa|grep httpd

RPM-E httpd

Rpm-qa|grep MySQL

RPM-E MySQL

Rpm-qa|grep PHP

Rpm-e PHP


# Remove the default Apache

Yum-y Remove httpd


# Find the fastest source

Yum-y Install Yum-fastestmirror


# Update

Yum-y Update


# Install the necessary components

Yum-y Install patch make GCC gcc-c++ gcc-g77 Flex Bison file

Yum-y Install 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

Yum-y Install Gmp-devel Pspell-devel

Yum-y Install Unzip


# Install apache+mysql+php

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


# Start httpd Service

/sbin/service httpd Start


# Start the MySQL service

/sbin/service mysqld Start


# set the MySQL database root account password, enter the password in quotation marks

mysqladmin-u root password ' 123 '


# Default Site Directory is/var/www/html/


# Install Apache Extensions

Yum-y Install httpd-manual mod_ssl mod_perl mod_auth_mysql

# Installation of PHP extensions

Yum Install PHP-GD

Yum-y Install PHP-GD php-xml php-mbstring php-ldap php-pear php-xmlrpc

# Install MySQL extensions

Yum-y Install Mysql-connector-odbcmysql-devel Libdbi-dbd-mysql


This article from "My King Penguin" blog, reproduced please contact the author!

CentOS Yum Install Apache + PHP + 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.