Fedora 20 安裝試用體驗(yàn)全程講解

5、修改相關(guān)的配置文件
首先修改/etc/php.ini:
- 把下面一行的注釋去掉 [...]
- cgi.fix_pathinfo=1 [...]
- 然后修改/etc/lighttpd/conf.d/fastcgi.conf配置文件為如下格式: [...]
- server.modules += ( "mod_fastcgi" ) [...]
- 注意fastcgi.server 字段內(nèi)容如下: [...]
- ## ## PHP Example
- ## For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini. ##
- ## The number of php processes you will get can be easily calculated: ##
- ## num-procs = max-procs * ( 1 + PHP_FCGI_CHILDREN ) ##
- ## for the php-num-procs example it means you will get 17*5 = 85 php ## processes. you always should need this high number for your very
- ## busy sites. And if you have a lot of RAM. :) ##
- fastcgi.server += ( ".php" => ((
- "host" => "127.0.0.1", "port" => "9000",
- "broken-scriptfilename" => "enable" ))
- ) #fastcgi.server = ( ".php" =>
- # ( "php-local" => # (
- # "socket" => socket_dir + "/php-fastcgi-1.socket", # "bin-path" => server_root + "/cgi-bin/php5",
- # "max-procs" => 1, # "broken-scriptfilename" => "enable",
- # ) # ),
- # ( "php-tcp" => # (
- # "host" => "127.0.0.1", # "port" => 9999,
- # "check-local" => "disable", # "broken-scriptfilename" => "enable",
- # ) # ),
- # # ( "php-num-procs" =>
- # ( # "socket" => socket_dir + "/php-fastcgi-2.socket",
- # "bin-path" => server_root + "/cgi-bin/php5", # "bin-environment" => (
- # "PHP_FCGI_CHILDREN" => "16", # "PHP_FCGI_MAX_REQUESTS" => "10000",
- # ), # "max-procs" => 5,
- # "broken-scriptfilename" => "enable", # )
- # ), # )
- ), [...]
然后還要激活這個(gè)模塊,修改配置文件/etc/lighttpd/conf.d/fastcgi.conf
- [...] ## FastCGI (mod_fastcgi)
- ## include "conf.d/fastcgi.conf"
- [...]
就是去掉include "conf.d/fastcgi.conf"前面的注釋符號(hào)。
下面測(cè)試一下php腳本:
- # vi /var/www/lighttpd/info.php <?php
- phpinfo(); ?>
- # systemctl restart lighttpd.service
然后使用瀏覽器查看如圖6 ,大家看紅色圈框部分(Server API FPM/FastCGI )
圖6 測(cè)試一下php腳本
圖6顯示則表明web服務(wù)器可以解析靜態(tài)頁面和php頁面(但目前還無法連接mysql數(shù)據(jù)庫)。
下面設(shè)置為PHP安裝MySQL支持:
php5支持MySQL很簡(jiǎn)單,只要安裝php-mysql軟件包即可;但php程序要運(yùn)行可能需要多個(gè)php模塊的支持
- # yum install php-mysqlnd php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-magickwand php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy php-opcache
安裝完成后重啟:
- #systemctl reload php-fpm.service
重新訪問瀏覽器查看安裝的php模塊 如mysql:(如下圖7)
圖7 為PHP安裝MySQL支持
Unix域Socket通信設(shè)置
Unix域Socket因?yàn)椴蛔呔W(wǎng)絡(luò),的確可以提高web服務(wù)器和php-fpm通信的性能,但在高并發(fā)時(shí)會(huì)不穩(wěn)定。設(shè)置如下:
- vi /etc/php-fpm.d/www.conf 修改為如下內(nèi)容
- [...] ;listen = 127.0.0.1:9000
- listen = /tmp/php5-fpm.sock [...]
- 然后重啟服務(wù): # systemctl reload php-fpm.service
- 下面修改etc/lighttpd/conf.d/fastcgi.conf 文件,修改為如下內(nèi)容 vi /etc/lighttpd/conf.d/fastcgi.conf
- fastcgi.server += ( ".php" => ((
- "socket" => "/tmp/php5-fpm.sock", "broken-scriptfilename" => "enable"
- )) )
- 然后重啟服務(wù): # systemctl restart lighttpd.service
五、簡(jiǎn)單介紹一下NFS 服務(wù)器和客戶端設(shè)置
這里筆者的安裝環(huán)境如下:
NFS 服務(wù)器端,ip 10.0.0.20 ,計(jì)算機(jī)名稱 www.cjh.net NFS 客戶端端,ip 10.0.0.21 ,計(jì)算機(jī)名稱 www.cjh1.netNFS 服務(wù)器端配置
安裝軟件包:
- 安裝軟件包 #yum -y install nfs-utils
- 修改配置文件: #vi /etc/idmapd.conf
- # line 5: 修改為相對(duì)應(yīng)的名稱 Domain = cjh.net
- 修改文件 #vi /etc/exports
- # write like below *note /home 10.0.0.0/24(rw,sync,no_root_squash,no_all_squash)
- # *note /home ? shared directory
- 10.0.0.0/24 ? range of networks NFS permits accesses rw ? writable
- sync ? synchronize no_root_squash ? enable root privilege
- no_all_squash ? enable users' authority 啟動(dòng)相關(guān)服務(wù)
- # systemctl start rpcbind.service # systemctl start nfs-server.service
- # systemctl start nfs-lock.service # systemctl start nfs-idmap.service
- # systemctl enable rpcbind.service # systemctl enable nfs-server.service
- # systemctl enable nfs-lock.service # systemctl enable nfs-idmap.service
- NFS 客戶端端設(shè)置: 安裝軟件包
- # yum -y install nfs-utils 修改配置文件
- # vi /etc/idmapd.conf # line 5: 修改為相對(duì)應(yīng)的名稱
- Domain = cjh.net 啟動(dòng)服務(wù)
- # systemctl start rpcbind.service # systemctl start nfs-lock.service
- # systemctl start nfs-idmap.service # systemctl start nfs-mountd.service
- # systemctl enable rpcbind.service # systemctl enable nfs-lock.service
- # systemctl enable nfs-idmap.service # systemctl enable nfs-mountd.service
- 掛載磁盤 # mount -t nfs dlp.server.world:/home /home
fedora 20的不足之處
介紹一下 Gnome 開發(fā)的軟件中心,這個(gè)軟件中心還在完善當(dāng)中,所以我打開軟件中心,感覺有BUG,一是軟件加載很慢,可能是服務(wù)器在國外的原因,二是無法添加直接其他軟件源。使用界面分成三個(gè)部分:全部軟件、已經(jīng)安裝、更新。不過目前沒有軟件課提供更新。
圖8 軟件中心
這個(gè)軟件中心設(shè)計(jì)思路和Ubuntu軟件中心相似,不過卻沒有任何設(shè)置選項(xiàng),筆者使用它首先安裝另外一個(gè)軟件包工具:Gonme Package 后才能設(shè)置其他軟件源等工作。
總結(jié):
總體感覺Fedora 20的 使用感覺和上個(gè)版本Fedora 19變化不大,所以筆者就不多贅述了,大家還是關(guān)注2014 年 即將發(fā)布的Red Hat Enterprise Linux 7 吧 。
相關(guān)文章
fedora終端怎么自定義透明效果? linux透明效果的設(shè)置方法
fedora終端怎么自定義透明效果?fedora系統(tǒng)想要設(shè)置透明效果,該怎么設(shè)置呢?透明效果看上去很好看,下面我們就來看看linux透明效果的設(shè)置方法2021-10-09Fedora音量很小怎么辦? Fedora音量調(diào)到最大聲音還是小的解決辦法
Fedora音量很小怎么辦?Fedora系統(tǒng)把聲音開到最大還是很小,想要調(diào)大一些音量,該怎么辦你額?下面我們就來看看Fedora音量調(diào)到最大聲音還是小的解決辦法2021-07-12Fedora怎么設(shè)置主菜單快捷鍵? Fedora快捷鍵的設(shè)置方法
Fedora怎么設(shè)置主菜單快捷鍵?Fedora系統(tǒng)中疆場(chǎng)使用主菜單,想要給主菜單添加快捷鍵,方便操作,該怎么添加呢?下面我們就來看看Fedora快捷鍵的設(shè)置方法,詳細(xì)請(qǐng)看下文介紹2021-07-12Fedora怎么設(shè)置圖標(biāo)主題? Linux系統(tǒng)圖標(biāo)主題的設(shè)置方法
Fedora怎么設(shè)置圖標(biāo)主題?Fedora系統(tǒng)想要設(shè)置自己細(xì)化的圖標(biāo)主題,該怎么設(shè)置呢?下面我們就來看看Linux系統(tǒng)圖標(biāo)主題的設(shè)置方法,詳細(xì)請(qǐng)看下文介紹2021-06-11Fedora文件歷史記錄怎么開啟? Fedora歷史記錄的顯示方法
Fedora文件歷史記錄怎么開啟?Fedora中想要顯示歷史記錄,該怎么顯示呢?下面我們就來看看Fedora歷史記錄的顯示方法,需要的朋友可以參考下2021-02-26Linux怎么清屏? Fedora終端復(fù)位清屏的兩種方法
Linux怎么清屏?Linux中想要進(jìn)行復(fù)位清屏,該怎么操作呢?下面我們就來看看Fedora終端復(fù)位清屏的兩種方法,需要的朋友可以參考下2021-02-26Fedora系統(tǒng)外觀怎么設(shè)置? Fedora Linux外觀主題設(shè)置技巧
Fedora系統(tǒng)外觀怎么設(shè)置?Fedora系統(tǒng)想要設(shè)置外觀主題,該怎么設(shè)置呢?下面我們就來看看Fedora Linux外觀主題設(shè)置技巧,需要的朋友可以參考下2021-02-07- Fedora輸入法切換快捷鍵怎么更改?想要設(shè)置設(shè)置輸入法切換快捷鍵,該怎么自己設(shè)置成常用的鍵呢?下面我們就來看看詳細(xì)的教程,需要的朋友可以參考下2021-02-07
Fedora系統(tǒng)怎么設(shè)置打開新終端時(shí)默認(rèn)打開新標(biāo)簽頁?
Fedora系統(tǒng)怎么設(shè)置打開新終端時(shí)默認(rèn)打開新標(biāo)簽頁?Fedora系統(tǒng)想要設(shè)置默認(rèn)打開新的標(biāo)簽頁,該怎么設(shè)置呢?下面我們就來看看詳細(xì)的教程,需要的朋友可以參考下2021-02-04Fedora怎樣設(shè)置鎖屏?xí)r顯示通知內(nèi)容? Fedora打開鎖屏通知的技巧
Fedora怎樣設(shè)置鎖屏?xí)r顯示通知內(nèi)容?Fedora自動(dòng)鎖屏后如果有消息通知,想要直接顯示,該怎么設(shè)置呢?下面我們就來看看Fedora鎖屏后顯示通知的技巧,需要的朋友可以參考下2021-01-22