#yum install marisdb-server
#vim /etc/my.cnf.d/server.cnf
[mysqld]
skip_name_resolve=ON
innodb_file_per_table=ON
#systemctl start mariadb.service
#mysql -uroot -h127.0.0.1 -pmageedu
>grant all on testdb.* to ‘myusr’@’172.16.0.%’ identified by ‘mypass’;
>flush privileges;
#mysql-umyusr -h172.16.0.68 -pmypass
>create database testdb character set ‘utf8’;
#yum install php-fpm php=mysql
#cd /etc/php-fpm.d
#cp www.conf{,.bak}
#vim www.conf
pm_status_path=/pmstatus
ping.path=/ping
ping.response=pong
#mkdir /var/lib/php/session
#chown apache:apache /var/lib/php/session/
#systemctl start php-fpm.service
#yum install httpd
#cd /etc/httpd/conf.d/
#vim vhosts.conf
DirectoryIndex index.php
<VirtualHost *:80>
ServerName www.ilinux.io
DocumentRoot /data/www/html
ProxyRequests Off
ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/data/www/html/$1
<Directory “/data/www/html”>
Options None
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
#httpd -t
#systemctl restart httpd.service
#cd /data/www/html
#vim index.php
<?php
phpinfo( );
?>
在浏览器上httpd://172.16.0.68显示phpinfo的网页。
原创文章,作者:忠神通,如若转载,请注明出处:http://www.178linux.com/77763