环境
fedora 最新版 20
参考:http://www.cnblogs.com/beceo/archive/2012/08/21/2648378.html
-----------------------------------------------------」
以下是ROOT权限执行yum install mysql mysql-server因开源yum上面是MariaDB,是目前最受关注的MySQL数据库衍生版。所以执行安装的是MariaDB
[[email protected] ~]$ sudo systemctl enable mariadb.service ln -s ‘/usr/lib/systemd/system/mariadb.service‘ ‘/etc/systemd/system/multi-user.target.wants/mariadb.service‘ [[email protected] ~]$ sudo systemctl start mariadb.service [[email protected] ~]$ sudo systemctl status mysqld mariadb.service - MariaDB database server Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled) Active: active (running) since Thu 2014-08-28 20:19:21 CST; 47min ago Main PID: 1086 (mysqld_safe) CGroup: /system.slice/mariadb.service ├─1086 /bin/sh /usr/bin/mysqld_safe --basedir=/usr └─1337 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql... Aug 28 20:19:11 localhost.localdomain systemd[1]: Starting MariaDB database s... Aug 28 20:19:17 localhost.localdomain mysqld_safe[1086]: 140828 20:19:17 mysq... Aug 28 20:19:17 localhost.localdomain mysqld_safe[1086]: 140828 20:19:17 mysq... Aug 28 20:19:21 localhost.localdomain systemd[1]: Started MariaDB database se... Aug 28 21:06:37 localhost.localdomain systemd[1]: Started MariaDB database se... Hint: Some lines were ellipsized, use -l to show in full.//设置mysql的ROOT用户密码。 [[email protected] ~]$ mysql_secure_installation[[email protected] ~]$yum install nginx[[email protected] ~]$systemctl enable nginx.service [[email protected] ~]$systemctl start nginx.service
[[email protected] ~]$yum install php-fpm php-cli php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy [[email protected] /]$ vi /etc/php-fpm.d/www.conf /***** 39 user = nginx 40 ; RPM: Keep a group allowed to write in log dir. 41 group = nginx**/
systemctl start php-fpm.service
[[email protected] nginx]$ vi /etc/nginx/nginx.conf
77 location ~ \.php$ { 78 root html; 79 fastcgi_pass 127.0.0.1:9000; 80 fastcgi_index index.php; 81 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_scrip t_name; 82 include fastcgi_params; 83 }
在/usr/share/nginx/html 下建个test.php文件
<?php phpinfo(); ?>
测试http://127.0.0.1/test.php
时间: 2024-12-05 14:26:34