Apache checks to see if the HTTPD package is available
yum list | grep httpd
Install the apache
yum install httpd
Apache extension
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql
Start the
systemctl start httpd.service
stop
systemctl stop httpd.service
restart
systemctl stop httpd.service
Check the status
service httpd status
Set automatic startup after startup:
chkconfig httpd on
Introduces Apache will default to the root directory of the site installation directory to/var/WWW/HTML directory is the main configuration file is/etc/HTTPD/conf/HTTPD. Conf configuration is stored in the/etc/HTTPD/conf. D/PHP installation directory
yum install -y php
PHP extensions
yum install php-mysql php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt libmcrypt-devel php-fpm
Run PHP files and display the source code, so make Sure Apache supports PHP.
Mysql installation
yum install mysql
yum install mysql-devel
Wget dev.mysql.com/get/mysql-c…
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum install mysql-community-server
Mysql extension
yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
Start the
systemctl start mysqld.service
stop
systemctl stop mysqld.service
restart
systemctl restart mysqld.service
Set a new password
Set password for ‘root’@’localhost’ =password(‘ new password ‘);
Refresh the permissions
FLUSH PRIVILEGES;
Remote Connection Settings
grant all privileges on . to root@’%’identified by ‘password’;
Any IP address can be remotely connected through the root account.