標籤:style blog http color os io ar 檔案 資料
環境
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 mysqldmariadb.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
fedora 安裝nginx+php+mysql