fedora 安裝nginx+php+mysql

來源:互聯網
上載者:User

標籤: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

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.