专干老熟女a片,日韩毛片免费无码无毒视频观看,日韩中文字幕免费视频,解开老师裙子猛烈进入动漫

IT技術(shù)

Ubuntu 搭建php7+Nginx+MySQL
作者:
來源: 本站
發(fā)布日期: 2019/6/20 11:09:53
點(diǎn)擊量: 1723次
【 字體:
背景顏色:


1. 下載安裝php7.0、php7.0-fpm及其他常用模塊
sudo apt-get install -y php7.0
sudo apt-get install -y php7.0-fpm
sudo apt-get install -y php-zip
sudo apt-get install -y php-dompdf
sudo apt-get install -y php-xml
sudo apt-get install -y php-mbstring
sudo apt-get install -y php-curl
sudo apt-get install -y php-mysql

2. 下載安裝Nginx(1.10.3)
sudo apt-get install -y nginx
1
3. 配置Nginx
修改/etc/nginx/sites-available下的default文件
# Add index.php to the list if you are using PHP
index.php index index.html index.htm index.nginx-debian.html;
1
2
在server項(xiàng)中找到關(guān)于php的配置并啟用


location ~ \\.php$ {
                include snippets/fastcgi-php.conf;
                #With php7.0-cgi alone:
                #fastcgi_pass 127.0.0.1:9000;
                #With php7.0-fpm:
                fastcgi_pass unix:/run/php/php7.0-fpm.sock;
        }





4. 測(cè)試服務(wù)器
重啟Nginx:
重啟php7.0-fpm
sudo /etc/init.d/nginx restart
sudo /etc/init.d/php7.0-fpm restart
1
2
在/var/www/html目錄下新建一個(gè)php文件
<?php
phpinfo();
?>



安裝MySQL

安裝mysql

$ sudo apt-get install mysql-server-5.6 mysql-client-5.6

途中會(huì)提示設(shè)置MySQL的密碼,安裝好后:

$ mysql -uroot -p
 
然后輸入剛剛設(shè)置的密碼,能成功進(jìn)入即成功安裝。



FAQ
修改nginx默認(rèn)端口號(hào)
在/etc/nginx/sites-available/default中修改server項(xiàng)中的端口監(jiān)聽
listen 8080 default_server;
listen [::]:8080 default_server;
1
2
修改默認(rèn)站點(diǎn)目錄
root /var/www/html;
1
啟用php錯(cuò)誤提示
修改php.ini配置文件/etc/php/7.0/fpm/php.ini
# display_errors = Off
displau_errors = On
# error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
error_reporting = E_ALL | E_STRICT


unable to bind listening socket for address '/run/php/php7.1-fpm.sock' no such file or directory

啟動(dòng)命令:sudo /etc/init.d/php7-fpm start

php啟動(dòng)的時(shí)候報(bào)這個(gè)錯(cuò)誤!

手動(dòng)創(chuàng)建 目錄 mkdir -pv /run/php/




 
Ubuntu 16.04下載軟件速度有點(diǎn)慢,因?yàn)槟J(rèn)的是從國外下載軟件,那就更換到國內(nèi)比較好的快速更新源(就是這些軟件所在的服務(wù)器),一般直接百度Ubuntu更新源就能出來一大堆,這時(shí)候最好是找和自己Ubuntu版本一致的更新源,我的Ubuntu版本是16.04,下面是我找到的一個(gè)比較好的更新源。


1.尋找國內(nèi)鏡像源


https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/






2.配置source  list源


sources.list系統(tǒng)自帶的,源是來Ubuntu的官網(wǎng)!安裝包比較慢,所以最好切換成國內(nèi)的


linuxidc.com@ubuntu:~$ cd /etc/apt
linuxidc.com@ubuntu:/etc/apt$ sudo cp sources.list sources.list.bak
linuxidc.com@ubuntu:/etc/apt$ vim sources.list                                                 


# 默認(rèn)注釋了源碼鏡像以提高 apt update 速度,如有需要可自行取消注釋
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse


# 預(yù)發(fā)布軟件源,不建議啟用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse


3. 更新源


linuxidc.com@ubuntu:/etc/apt$ sudo apt-get update 
命中:1 http://mirrors.aliyun.com/ubuntu xenial InRelease
命中:2 http://mirrors.aliyun.com/ubuntu xenial-updates InRelease        
命中:3 http://mirrors.aliyun.com/ubuntu xenial-backports InRelease      
命中:4 http://mirrors.aliyun.com/ubuntu xenial-security InRelease        
正在讀取軟件包列表... 完成 


測(cè)試:安裝sl包
linuxidc.com@ubuntu:/etc/apt$ sudo apt-get install sl


linuxidc.com@ubuntu:/etc/apt$ sl






4.其他一些命令


sudo apt-get update  更新源
sudo apt-get install package 安裝包
sudo apt-get remove package 刪除包
sudo apt-cache search package 搜索軟件包
sudo apt-cache show package  獲取包的相關(guān)信息,如說明、大小、版本等
sudo apt-get install package --reinstall  重新安裝包
sudo apt-get -f install  修復(fù)安裝
sudo apt-get remove package --purge 刪除包,包括配置文件等
sudo apt-get build-dep package 安裝相關(guān)的編譯環(huán)境
sudo apt-get upgrade 更新已安裝的包
sudo apt-get dist-upgrade 升級(jí)系統(tǒng)
sudo apt-cache depends package 了解使用該包依賴那些包
sudo apt-cache rdepends package 查看該包被哪些包依賴
sudo apt-get source package  下載該包的源代碼
sudo apt-get clean && sudo apt-get autoclean 清理無用的包
sudo apt-get check 檢查是否有損壞的依賴





deb http://mirrors.aliyun.com/ubuntu/ precise main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse             
deb http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse          
deb-src http://mirrors.aliyun.com/ubuntu/ precise main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse     
deb-src http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse               
deb-src http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse             
deb-src http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse 


sudo apt-get update  && sudo apt-get -y upgrade//更新一下列表


docker run -it -d --name webln -p 80:80 -v /d/dockerwww:/mmt/www lnweb  /bin/bash

掃一掃在手機(jī)打開當(dāng)前頁

Contact

聯(lián)系我們

告訴我們您想要的吧!我們?yōu)楫?dāng)?shù)乜蛻籼峁I(yè)、及時(shí)的服務(wù)
地址:云南省昆明市白云路368號(hào)
電話:400-871-8716 (工作時(shí)間:09:00-18:00(周一至周五))
何總:23592693
李總:53815112
主站蜘蛛池模板: 怀仁县| 旺苍县| 博野县| 汕头市| 成安县| 郧西县| 陆丰市| 嘉义市| 黄山市| 洛隆县| 灵武市| 镇巴县| 湾仔区| 弥勒县| 昌黎县| 孟村| 青龙| 井冈山市| 象山县| 容城县| 安龙县| 团风县| 磐安县| 视频| 平山县| 田林县| 金寨县| 贵德县| 莱西市| 曲水县| 汝南县| 福海县| 桐乡市| 江陵县| 临洮县| 广德县| 微山县| 合阳县| 洮南市| 彭泽县| 安陆市|