Lamp quick environment setup in centos7
1. configure the firewall
CentOS 7.0 uses firewall as the firewall by default.
1. Disable firewall:
[Python] view plain copy
View the CODE piece derived from my CODE piece on CODE
Systemctl stop firewalld. service # stop firewall
Systemctl disable firewalld. service # disable firewall startup
2. Disable SELINUX
[Python] view plain copy
View the CODE piece derived from my CODE piece on CODE
Vi/etc/selinux/config
# SELINUX = enforcing # comment out
SELINUX = disabled # Add
: Wq! # Save and exit
Setenforce 0 # Make the configuration take effect immediately
3. install apache
[Python] view plain copy
View the CODE piece derived from my CODE piece on CODE
Yum install httpd # Enter Y as prompted to install httpd.
Systemctl start httpd. service # start apache
Systemctl stop httpd. service # stop apache
Systemctl restart httpd. service # restart apache
Systemctl enable httpd. service # Set apache startup
4. Install mariadb (mysql)
[Python] view plain copy
View the CODE piece derived from my CODE piece on CODE
Yum install mariadb-server # ask if you want to install mariadb. Enter Y to install mariadb automatically until installation is complete.
Systemctl start mariadb. service # start MariaDB
Systemctl stop mariadb. service # stop MariaDB
Systemctl restart mariadb. service # restart MariaDB
Systemctl enable mariadb. service # Set startup
[Python] view plain copy
View the CODE piece derived from my CODE piece on CODE
Modify the mysql password: set password for 'root' @ 'localhost' = password ('root ');
[Python] view plain copy
View the CODE piece derived from my CODE piece on CODE
Mysql authorized remote connection (navicat, etc.): grant all on *. * to root identified by 'root ';
5. install PHP and components so that PHP supports MariaDB
[Python] view plain copy
View the CODE piece derived from my CODE piece on CODE
Yum install php-mysql php-gd libjpeg * php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-bcmath php-mhash
# Select the preceding installation package for installation. Enter Y and press enter as prompted.
Systemctl restart mariadb. service # restart MariaDB
Systemctl restart httpd. service # restart apache
Test
Cd/var/www/html
Vi index. php # enter the following content
<? Php
Phpinfo ();
?>
: Wq! # Save and exit
Start command line systemctl set-default multi-user.target
Enter the Server IP address in the browser of the client. The configuration information shown in is displayed!
Menuentry "Windows 7 (loader) (on/dev/sda1 )"{
Insmod ntfs
Set root = (hd0, 1)
Chainloader + 1
}