System centos6+
1、 Since the php version in the centos default yum source is too low, it needs to be replaced
wget -q -O - http://www.atomicorp.com/installers/atomic | sh
If an error is reported, wget cannot be found, install wget:
yum install wget
2、 Install apache, mysql, php
yum install httpd
yum install mysql-server
yum install php
yum install php-gd php-mysql php-pdo php-soap php-mbstring php-xmlrpc php-dom
3、 Increase virtual host
Configuration file /etc/httpd/conf/httpd.conf, virtual host configuration is generally at the bottom
Or create a new virtual host configuration file in /etc/httpd/conf.d/, generally named virtualhosts.conf
The web root directory is generally set in /var/www/, but it can also be modified by yourself
4、 Start apache
/etc/rc.d/init.d/httpd restart
5、 Start mysql
/etc/rc.d/init.d/mysqld restart
6、 Modify the root password of mysql
mysqladmin -u root password “yourpassword”
7、 Deploy code
Put the project code in the set web directory
8 Set time zone tzselect
9 /etc/sysconfig/iptables
This is the firewall configuration file. Check if the apache port (80) in this file is open
Recommended Posts