A detailed tutorial on lamp environment

Source: Internet
Author: User
Tags gpg centos iptables firewall

First, preparatory work

1, install the compilation tool GCC, gcc-c++

Attention to resolve dependencies, recommend the use of Yum installation, if not networked can use the installation CD as a Yum source--

1 Edit Yum configuration file:

# Mount/dev/cdrom/mnt/cdrom

# Vi/etc/yum.repos.d/centos-media.repo

[C5-media]

name=centos-$releasever-media

Baseurl=file:///mnt/cdrom * modified to disc mount point

file:///media/cdrom/

file:///media/cdrecorder/

Gpgcheck=1

Enabled=1 * changed to 1 meaning to enable

Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-5

2) Shearing/etc/yum.repos.d/centos-base.repo

# Mv/etc/yum.repos.d/centos-base.repo/backup

3 Install GCC and gcc-c++ in turn

# yum-y Install GCC

# yum-y Install gcc-c++

2, turn off the system RPM installation package Apache, MySQL services

Turn off services that are started httpd, mysqld

# Service HTTPD Stop

# Service Mysqld Stop

Determine if the httpd and mysqld of the RPM package installation do not boot from

Chkconfig--level 2345 httpd (mysqld) off

3, turn off SELinux, allow firewall 80 port access

Using Setup

Turn off firewalls and SElinux

1) Close SELinux

# Vi/etc/selinux/config

selinux=disabled * If the SELINUX is not disabled during installation, change the enforcing to Disabled

You need to restart Linux before you can take effect!

2) Shutdown Firewall netfilter/iptables

Because the firewall has not been explained, directly and simply shut down all firewall settings:

# Iptables-f * If firewall is not disabled, the default 80 port is blocked from accessing

Iptables-z

Iptables-x

4, off the unnecessary starting service

# NTSYSV

The following list of services can be maintained from startup, and services that are not listed may be closed:

Atd

Crond # ATD, Crond Scheduled Tasks

Irqbalance

MICROCODE_CTL # System IRQ Port invocation, System services

Network #网络设置

SendMail #邮件

Sshd #远程管理

Syslog #系统日志

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.