Linux Lamp Server Installation configuration

Source: Internet
Author: User
Tags zend fully qualified domain name

1 Installing the Apache server
Yum-y Install httpd Httpd-devel

2 Installing MySQL
Yum-y install MySQL mysql-server mysql-devel

3 Installing PHP and its extensions
Yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml

4 starting MySQL
Service mysqld Start
Connect to MySQL
Mysql-uroot-p
Log in later to view MySQL
show databases;


5 Modifying firewall rules
[Email protected] ~]# iptables-f
[[Email protected] ~]# service Iptables Save
Iptables: Save firewall rules to/etc/sysconfig/iptables:[OK]
[[Email protected] ~]# service iptables stop
Iptables: Set the chain to policy accept:filter [OK]
Iptables: Clear Firewall rule: [OK]
Iptables: Uninstalling module: [OK]

[Email protected] ~]# Vi/etc/selinux/config
Set up
Selinux=disabled


6 launch Apache
Apche Boot, prompt error
[[email protected] ~]# apachectl start
Httpd:could not reliably determine the server ' s fully qualified domain name, using Localhost.localdomain for ServerName
HTTPD (PID 18265) already running
Modifying a configuration file
[Email protected] ~]# vi/etc/httpd/conf/httpd.conf
Set line number: Set Nu about 276 lines
ServerName www.example.com:80 Uncomment
[Email protected] ~]# apachectl restart


Test address: 192.168.214.42, OK

7 Testing PHP
[Email protected] ~]# cd/var/www/html
[Email protected] html]# VI index.php
<?php
Phpinfo ();
?>

Test address: 192.168.214.42, OK

Done!


Improve performance, install Zend
[Email protected] yum.repos.d]# Wget-q-o-http://www.atomicorp.com/installers/atomic.sh | SH Note: Yes Big O
[[email protected] yum.repos.d]# Yum install Php-zend-optimizer, installation failed

Linux lamp Server Installation configuration

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.