久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      CentOS 7.5 安裝部署 Drupal 8.6.4 圖文詳解

      Drupal 8.6.4是目前一款流行的Drupal內(nèi)容管理系統(tǒng)的最新版本。本指南詳細(xì)演示了如何在運(yùn)行CentOS 7.5或CentOS 7.x上安裝部署Drupal 8.6.4的詳細(xì)步驟及注意事項(xiàng)。

      本指南將盡可能地使用sudo。完成我們保護(hù)您的服務(wù)器指南的部分,以創(chuàng)建一個(gè)標(biāo)準(zhǔn)的用戶帳戶,加強(qiáng)SSH訪問(wèn),刪除不必要的網(wǎng)絡(luò)服務(wù),并為您的web服務(wù)器創(chuàng)建防火墻規(guī)則;您可能需要為您的特定應(yīng)用程序創(chuàng)建額外的防火墻異常。

      Drupal 可以運(yùn)行在諸如 Apache、IIS、Lighttpd、Cherokee、Nginx 的 Web 服務(wù)器上,后端數(shù)據(jù)庫(kù)可以使用 MySQL、MongoDB、MariaDB、PostgreSQL、MSSQL Server。

      CentOS 7.5 安裝部署 Drupal 8.6.4 圖文詳解

      Drupal 8 配置要求:

      • 數(shù)據(jù)庫(kù):MySQL 5.5.3/MariaDB 5.5.20
      • 網(wǎng)站服務(wù)器:Apache 2.x
      • PHP版本:5.5, 5.6, 7.0, 7.1, 7.2 (Drupal 8.4.4 之前版本只支持 php 7.1 及之前版本)

      第1步:安裝 Apache Web 服務(wù)器

      1、 首先我們從官方倉(cāng)庫(kù)開(kāi)始安裝 Apache Web 服務(wù)器。

      #yum install httpd

      CentOS 7.5 安裝部署 Drupal 8.6.4 圖文詳解

      2、 安裝完成后,服務(wù)開(kāi)始是被禁用的,因此我們需要手動(dòng)啟動(dòng)它,同時(shí)讓它下次系統(tǒng)啟動(dòng)時(shí)自動(dòng)啟動(dòng),如下:

      ————-通過(guò)SystemD-CentOS/RHEL 7和Fedora22+——————-
      #systemctl start httpd
      #systemctl enable httpd
      ————-通過(guò)SysVInit-CentOS/RHEL 6和Fedora———————-
      # service httpd start
      # chkconfig –level 35 httpd on

      3、 接下來(lái),為了允許通過(guò) HTTP 和 HTTPS 訪問(wèn) Apache 服務(wù),我們必須打開(kāi) HTTPD 守護(hù)進(jìn)程正在監(jiān)聽(tīng)的 80 和 443 端口,如下所示:

      ————通過(guò)Firewalld-CentOS/RHEL 7andFedora22+————-
      # firewall-cmd –permanent –zone=public–add-service=http
      # firewall-cmd –permanent –zone=public–add-service=https
      # firewall-cmd –reload
      ————通過(guò)IPtables-CentOS/RHEL 6andFedora22+————-
      # iptables -A INPUT -p tcp -m tcp –dport 80-j ACCEPT
      # iptables -A INPUT -p tcp -m tcp –dport 443-j ACCEPT
      # service iptables save
      # service iptables restart

      4、 現(xiàn)在驗(yàn)證 Apache 是否正常工作, 打開(kāi)瀏覽器在地址欄中輸入 http://server_IP, 輸入你的服務(wù)器 IP 地址, 默認(rèn) Apache2 頁(yè)面應(yīng)出現(xiàn),如下面截圖所示:

      CentOS 7.5 安裝部署 Drupal 8.6.4 圖文詳解

      Apache 默認(rèn)頁(yè)面

      第2步: 安裝 Apache PHP 支持

      5、 接下來(lái),安裝 PHP 和 PHP 所需模塊。

      #yum install php php-mbstring php-gd php-xml php-pear php-fpm php-mysql php-pdo php-opcache
      重要: 假如你想要安裝 PHP7, 你需要增加以下倉(cāng)庫(kù):EPEL 和 Webtactic 才可以使用 yum 安裝 PHP7.0:

      ————-Install PHP 7inCentOS/RHEL andFedora————-
      # rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
      # rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
      #yum install php70w php70w-opcache php70w-mbstring php70w-gd php70w-xml php70w-pear php70w-fpm php70w-mysql php70w-pdo

      6、 接下來(lái),要從瀏覽器得到關(guān)于 PHP 安裝和配置完整信息,使用下面命令在 Apache 文檔根目錄 (/var/www/html) 創(chuàng)建一個(gè) info.php 文件。

      #echo”<?php phpinfo(); ?>”>/var/www/html/info.php
      然后重啟 HTTPD 服務(wù)器 ,在瀏覽器地址欄輸入 http://server_IP/info.php。

      #systemctl restart httpd

      # service httpd restart

      CentOS 7.5 安裝部署 Drupal 8.6.4 圖文詳解

      驗(yàn)證 PHP 信息

      第3步: 安裝和配置 MariaDB 數(shù)據(jù)庫(kù)

      7、 請(qǐng)知曉, Red Hat Enterprise Linux/CentOS 7.0 從支持 MySQL 轉(zhuǎn)為了 MariaDB 作為默認(rèn)數(shù)據(jù)庫(kù)管理系統(tǒng)。

      要安裝 MariaDB 數(shù)據(jù)庫(kù), 你需要添加 官方 MariaDB 庫(kù) 到 /etc/yum.repos.d/MariaDB.repo 中,如下所示。

      [mariadb]
      name =MariaDB
      baseurl = http://yum.mariadb.org/10.1/centos7-amd64
      gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
      gpgcheck=1

      以上是官方源,下載很慢,這里我們用阿里源,內(nèi)容如下:

      [mariadb]
      name = MariaDB
      baseurl = http://mirrors.aliyun.com/mariadb/yum/10.3/centos7-amd64/
      gpgkey =  http://mirrors.aliyun.com/mariadb/yum/RPM-GPG-KEY-MariaDB
      gpgcheck = 1

      CentOS 7.5 安裝部署 Drupal 8.6.4 圖文詳解

      當(dāng)倉(cāng)庫(kù)文件準(zhǔn)備好后,你可以像這樣安裝 MariaDB:

      #yum install MariaDB-server MariaDB-client

      8、 當(dāng) MariaDB 數(shù)據(jù)庫(kù)安裝完成,啟動(dòng)數(shù)據(jù)庫(kù)的守護(hù)進(jìn)程,同時(shí)使它能夠在下次啟動(dòng)后自動(dòng)啟動(dòng)。

      ————-通過(guò)SystemD-CentOS/RHEL 7andFedora22+————-
      #systemctl start mariadb
      #systemctl enable mariadb
      ————-通過(guò)SysVInit-CentOS/RHEL 6andFedora————-
      # service mysqld start
      # chkconfig –level 35 mysqld on

      9、 然后運(yùn)行 mysql_secure_installation 腳本去保護(hù)數(shù)據(jù)庫(kù)(設(shè)置 root 密碼, 禁用遠(yuǎn)程登錄,移除測(cè)試數(shù)據(jù)庫(kù)并移除匿名用戶),如下所示:

      # mysql_secure_installation

      先是設(shè)置密碼,會(huì)提示先輸入密碼

      Enter current password for root (enter for none):<–初次運(yùn)行直接回車(chē)

      設(shè)置密碼

      Set root password? [Y/n] <– 是否設(shè)置root用戶密碼,輸入y并回車(chē)或直接回車(chē)

      New password: <– 設(shè)置root用戶的密碼

      Re-enter new password: <– 再輸入一次你設(shè)置的密碼

      其他配置

      Remove anonymous users? [Y/n] <– 是否刪除匿名用戶,Y,回車(chē)

      Disallow root login remotely? [Y/n] <–是否禁止root遠(yuǎn)程登錄,N,回車(chē),

      Remove test database and access to it? [Y/n] <– 是否刪除test數(shù)據(jù)庫(kù),Y,回車(chē)

      Reload privilege tables now? [Y/n] <– 是否重新加載權(quán)限表,回車(chē)

      初始化MariaDB完成,接下來(lái)測(cè)試登錄

      第4步: 在 CentOS 中安裝和配置 Drupal 8

      10、 這里我們使用 wget 命令 下載最新版本 Drupal(例如最新的 8.6.4),如果你沒(méi)有安裝 wget 和 gzip 包 ,請(qǐng)使用下面命令安裝它們:

      #yum install wget gzip
      #wget-c https://ftp.drupal.org/files/projects/drupal-8.6.4.tar.gz

      11、 之后,解壓 tar 文件 并移動(dòng) Drupal 目錄到 Apache 文檔根目錄(/var/www/html)。

      #tar -zxvf drupal-8.6.4.tar.gz
      #mv drupal-8.6.4/var/www/html/drupal

      12、 然后,依據(jù) /var/www/html/drupal/sites/default 目錄下的示例設(shè)置文件 default.settings.php,創(chuàng)建設(shè)置文件 settings.php,然后給 Drupal 站點(diǎn)目錄設(shè)置適當(dāng)權(quán)限,包括子目錄和文件,如下所示:

      #cd/var/www/html/drupal/sites/default/
      #cp default.settings.php settings.php
      #chown-R apache:apache /var/www/html/drupal/

      13、 更重要的是在 /var/www/html/drupal/sites/ 目錄設(shè)置 SElinux 規(guī)則,如下:

      # chcon -R -t httpd_sys_content_rw_t/var/www/html/drupal/sites/

      14、 現(xiàn)在我們必須為 Drupal 站點(diǎn)去創(chuàng)建一個(gè)用于管理的數(shù)據(jù)庫(kù)和用戶。

      [root@localhost default]# mysql -u root -p
      Enter password:
      Welcome to the MariaDB monitor.  Commands end with ; or g.
      Your MariaDB connection id is 16
      Server version: 10.3.11-MariaDB MariaDB Server

      Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

      Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement.

      MariaDB [(none)]> create database drupal;
      Query OK, 1 row affected (0.000 sec)

      MariaDB [(none)]> create user linuxidc@localhost identified by ‘linuxidc’;
      Query OK, 0 rows affected (0.006 sec)

      MariaDB [(none)]> grant all on drupal.* to linuxidc@localhost;
      Query OK, 0 rows affected (0.005 sec)

      MariaDB [(none)]> flush privileges;
      Query OK, 0 rows affected (0.005 sec)

      MariaDB [(none)]> exit
      Bye

      CentOS 7.5 安裝部署 Drupal 8.6.4 圖文詳解

      15、 最后,打開(kāi)地址: http://server_IP/drupal/ 開(kāi)始網(wǎng)站的安裝,選擇你首選的安裝語(yǔ)言然后點(diǎn)擊保存以繼續(xù)。

      CentOS 7.5 安裝部署 Drupal 8.6.4 圖文詳解

      Drupal 安裝語(yǔ)言

      16、 下一步,選擇安裝配置文件,選擇 Standard(標(biāo)準(zhǔn)),點(diǎn)擊保存繼續(xù)。

      CentOS 7.5 安裝部署 Drupal 8.6.4 圖文詳解

      Drupal 安裝配置文件

      17、 在進(jìn)行下一步之前查看并通過(guò)需求審查并啟用 Clean URL。

      CentOS 7.5 安裝部署 Drupal 8.6.4 圖文詳解

      驗(yàn)證 Drupal 需求

      現(xiàn)在在你的 Apache 配置下啟用 Clean URL 的 Drupal。

      #nano /etc/httpd/conf/httpd.conf

      確保為默認(rèn)根文檔目錄 /var/www/html 設(shè)置 AllowOverride All,(原來(lái)是 None)如下圖所示:

      CentOS 7.5 安裝部署 Drupal 8.6.4 圖文詳解

      在 Drupal 中啟用 Clean URL

      18、 當(dāng)你為 Drupal 啟用 Clean URL,刷新頁(yè)面從下面界面執(zhí)行數(shù)據(jù)庫(kù)配置,輸入 Drupal 站點(diǎn)數(shù)據(jù)庫(kù)名,數(shù)據(jù)庫(kù)用戶和數(shù)據(jù)庫(kù)密碼。

      當(dāng)填寫(xiě)完所有信息點(diǎn)擊保存并繼續(xù)。

      CentOS 7.5 安裝部署 Drupal 8.6.4 圖文詳解

      Drupal 數(shù)據(jù)庫(kù)配置

      若上述設(shè)置正確,Drupal 站點(diǎn)安裝應(yīng)該完成了,如下圖界面。

      CentOS 7.5 安裝部署 Drupal 8.6.4 圖文詳解

      Drupal 安裝

      19、 接下來(lái)配置站點(diǎn)為下面的設(shè)置(使用適用你的情況的值):

      站點(diǎn)名稱  – Linux公社 www.linuxidc.com
      站點(diǎn)郵箱地址  – root@linuxidc.com
      用戶名  – linuxidc
      密碼  – ##########
      用戶的郵箱地址  – root@linuxidc.com
      默認(rèn)國(guó)家  – China
      默認(rèn)時(shí)區(qū)  – UTC
      設(shè)置適當(dāng)?shù)闹岛螅c(diǎn)擊保存并繼續(xù)完成站點(diǎn)安裝過(guò)程。

      CentOS 7.5 安裝部署 Drupal 8.6.4 圖文詳解

      Drupal 站點(diǎn)配置

      20、下圖顯示的是通過(guò) LAMP 成功安裝的 Drupal 8 站點(diǎn)。

      CentOS 7.5 安裝部署 Drupal 8.6.4 圖文詳解

      Drupal 站點(diǎn)面板

      現(xiàn)在你可以點(diǎn)擊增加內(nèi)容,創(chuàng)建示例網(wǎng)頁(yè)內(nèi)容。

      選項(xiàng): 有些人使用 MySQL 命令行管理數(shù)據(jù)庫(kù)不舒服,可以從瀏覽器界面 安裝 PHPMyAdmin 管理數(shù)據(jù)庫(kù)

      瀏覽 Drupal 文檔 : https://www.drupal.org/docs/8

      就這樣!本文我們展示了在 CentOS 7 上如何去下載、安裝和使用基本配置來(lái)設(shè)置 LAMP 以及 Drupal 8。 歡迎就這個(gè)教程提供反饋,或提供給我們一些相關(guān)信息。

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)