CentOS 6.6 Yum Build lamp environment

Source: Internet
Author: User
Tags fully qualified domain name

CentOS View OS Version

[Email protected] ~]# cat/etc/redhat-release
CentOS Release 6.6 (Final)

Refer to Linux CentOS Yum installation lamp environment

Yum (full name Yellow dog Updater, Modified) is a shell front end package Manager in Fedora and Redhat and CentOS.

Based on RPM package management, the ability to automatically download RPM packages from specified servers and install them automatically handles dependency relationships and installs all dependent packages at once, without the hassle of downloading and installing them over and over again.

1. Update Yum

[[email protected] ~]# yum-y update

2. Install apache,mysql,php with Yum

Install Apache:

[email protected] ~]# Yum install httpd httpd-devel

When the installation is complete, start Apache

[[email protected] ~]#/etc/init.d/httpd start
Starting Httpd:httpd:apr_sockaddr_info_get () failed for oa.aioute.com
Httpd:could not reliably determine the server ' s fully qualified domain name, using 127.0.0.1 for ServerName
[OK]

Set to boot

[Email protected] ~]# chkconfig httpd on

Install MySQL:

[email protected] ~]# yum install MySQL mysql-server mysql-devel

Start MySQL

[[email protected] ~]#/etc/init.d/mysqld start

Reference: [CentOS 0010] centos config mysql allow telnet

Open MySQL remote connection under CentOS, remote Management database

Set the MySQL password and turn on remote permissions:

Mysql> GRANT All privileges on * * to ' root ' @ '% ' identified by ' YourPassword ' with GRANT OPTION;
Query OK, 0 rows Affected (0.00 sec)

mysql> FLUSH privileges;
Query OK, 0 rows Affected (0.00 sec)

Mysql> EXIT

Allow Port 3306:

[Email protected] ~]# iptables-i input-p tcp-m State--state new-m TCP--dport 3306-j ACCEPT
[Email protected] ~]# iptables-l-N

Install PHP:

Yum Install PHP Php-devel

Restart Apache to make PHP effective:

/ETC/INIT.D/HTTPD restart

[email protected] ~]# yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml

To restart PHP:

[Email protected] ~]#/etc/init.d/httpd restart
Starting httpd:

3. Allow port access

[Email protected] ~]# iptables-i input-p tcp-m State--state new-m TCP--dport 80-j ACCEPT
[Email protected] ~]# iptables-l-N

Refer to the use of CentOS under the VI usage Daquan

Refer to CentOS configuration Vsftp server

CentOS 6.6 Yum Build lamp environment

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.