亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

php7源碼安裝

發布時間:2020-07-24 12:06:25 來源:網絡 閱讀:2982 作者:chenzudao 欄目:web開發

安裝php7的過程:
1.tar zxf php-x.x.x
2.Configure and build PHP. This is where you customize PHP with various options,
like which extensions will be enabled. Run ./configure --help for a list of available options.
In our example we'll do a simple configure with PHP-FPM and MySQL support.
cd ../php-x.x.x
./configure --enable-fpm --with-mysql
make
sudo make install

3.
Obtain and move configuration files to their correct locations

cp php.ini-development /usr/local/php/php.ini
cp /usr/local/etc/php-fpm.conf.default /usr/local/etc/php-fpm.conf
cp sapi/fpm/php-fpm /usr/local/bin

4.
It is important that we prevent Nginx from passing requests to the PHP-FPM backend
 if the file does not exists, allowing us to prevent arbitrarily script injection.
 vim /usr/local/php/php.ini
 cgi.fix_pathinfo=0
5.
php-fpm.conf must be modified to specify that
php-fpm must run as the user www-data and the group www-data before we can start the service:
vim /usr/local/etc/php-fpm.conf
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
;       will be used.
user = www-data
group = www-data


6.
The php-fpm service can now be started:
/usr/local/bin/php-fpm

7.
Nginx must now be configured to support the processing of PHP applications:
vim /usr/local/nginx/conf/nginx.conf
Modify the default location block to be aware it must attempt to serve .php files:

location / {
    root   html;
    index  index.php index.html index.htm;
}

8. The next step is to ensure that .php files are passed to the PHP-FPM backend.
 Below the commented default PHP location block, enter the following:
location ~* \.php$ {
    fastcgi_index   index.php;
    fastcgi_pass    127.0.0.1:9000;
    include         fastcgi_params;
    fastcgi_param   SCRIPT_FILENAME    $document_root$fastcgi_script_name;
    fastcgi_param   SCRIPT_NAME        $fastcgi_script_name;
}


9.Restart Nginx.
sudo /usr/local/nginx/sbin/nginx -s stop
sudo /usr/local/nginx/sbin/nginx

10.Create a test file

錯誤一、在配置的時候會報錯,需要安裝libxml2-dev和libxml2包

錯誤二、另外啟動的時候報錯:
cp /root/php-7.0.0alpha1/sapi/fpm/php-fpm.conf /usr/local/etc/php-fpm.conf
錯誤三、
ERROR: Unable to globalize '/usr/local/NONE/etc/php-fpm.d/*.conf' (ret = 2) from /usr/local/etc/php-fpm.conf at line 125.
ERROR: failed to load configuration file '/usr/local/etc/php-fpm.conf'
ERROR: FPM initialization failed

Edit /usr/local/etc/php-fpm.conf document introduced * .conf part,
change to the correct path include = / usr / local / etc / php-fpm.d / *. Conf
If there is no /usr/local/etc/php-fpm.d directory, create the directory.

錯誤四:
WARNING: Nothing matches the include pattern '/usr/local/etc/php-fpm.d/*.conf' from /usr/local/etc/php-fpm.conf at line 125.
ERROR:. No pool defined at least one pool section must be specified in config file
ERROR: failed to post process the configuration
ERROR: FPM initialization failed

cp www.conf.default www.conf

錯誤五:
ERROR: [pool www] can not get gid for group 'nobody'
ERROR: FPM initialization failed

Www.conf open files, user and group users into nginx default settings, usually the default is www-data.


增加配置:
php-fpm.conf中:
[global]
; Note: the default prefix is /usr/local/php/var
error_log = log/php_error_log
[www]
catch_workers_output = yes

php.ini中:

log_errors = On
error_log = "/usr/local/php/var/log/error_log"
error_reporting=E_ALL&~E_NOTICE




 
 
 

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

苏州市| 惠东县| 兴业县| 海晏县| 韩城市| 南溪县| 望城县| 呼伦贝尔市| 梨树县| 且末县| 会同县| 陈巴尔虎旗| 丰都县| 彭阳县| 鹤峰县| 娄烦县| 东安县| 武威市| 花莲县| 牙克石市| 慈溪市| 湖州市| 静海县| 清水县| 双柏县| 娄底市| 土默特左旗| 天门市| 来宾市| 赤峰市| 新绛县| 卫辉市| 莱州市| 怀集县| 大竹县| 舒城县| 徐闻县| 县级市| 石景山区| 左权县| 襄汾县|