国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > CentOS > 正文

CentOs7 LAMP Drupal安裝記錄

2024-06-28 16:05:10
字體:
來源:轉載
供稿:網友

1.重設ip

先使用DHCP

在/etc/sysconfig/network-scripts/ifcfg-eno***中加入 

ONBOOT=YES

BOOTPROTO=DHCP

# systemctl restart network

2.更新yum的源為國內源

wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

# yum clean all 

# yum makecache

3.安裝和更新一些必要工具

yum install net-tools make gcc kernel-devel ntsysv tree links wget

4.安裝Apache

yum install httpd

修改配置文件

vi /etc/httpd/conf/httpd.conf

ServerSignature On#添加,在錯誤頁中顯示Apache的版本,Off為不顯示

#AddHandler cgi-script .cgi #修改為:AddHandler cgi-script .cgi .pl (允許擴展名為.pl的CGI腳本運行)

AllowOverride None #修改為:AllowOverride All (允許.htaccess)

AddDefaultCharset UTF-8 #修改為:AddDefaultCharset GB2312 (添加GB2312為默認編碼)

#Options Indexes FollowSymLinks #修改為 Options FollowSymLinks(不在瀏覽器上顯示樹狀目錄結構)

DirectoryIndex index.html#修改為:DirectoryIndex index.html index.htm Default.html Default.htm index.php(設置默認首頁文件,增加index.php)

MaxKeepAliveRequests500#添加MaxKeepAliveRequests 500 (增加同時連接數)

重啟httpd

systemctl restart httpd.service

增加自啟動

systemctl enable httpd.service

5.增加防火墻

firewall-cmd--permanent--zone=public--add-service=http

firewall-cmd--permanent--zone=public--add-service=https

firewall-cmd--reload

firewall-cmd --list-all

6.安裝MariaDB

更新epel

rpm--import /etc/pki/rpm-gpg/RPM-GPG-KEY*

yum-y install epel-release

yum -y install mariadb-server mariadb
systemctl start mariadb.servicesystemctl enable mariadb.service

MySQL_secure_installation

7.安裝PHP7

刪除之前的舊版本

# yum remove php* php-common

設置yum 源:

# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

安裝php7

# yum install php70w

# php -v

# systemctl restart httpd.service

獲得支持

#yum install php70w-dba.x86_64 php70w-devel.x86_64 php70w-embedded.x86_64 php70w-enchant.x86_64 php70w-fpm.x86_64 php70w-gd.x86_64 php70w-imap.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysqlnd.x86_64 php70w-odbc.x86_64 php70w-opcache.x86_64 php70w-pdo.x86_64 php70w-pdo_dblib.x86_64 php70w-pear.noarch php70w-pecl-apcu.x86_64 php70w-pecl-apcu-devel.x86_64 php70w-pecl-imagick.x86_64 php70w-pecl-imagick-devel.x86_64 php70w-pecl-mongodb.x86_64 php70w-pecl-redis.x86_64 php70w-pecl-xdebug.x86_64 php70w-pgsql.x86_64 php70w-xml.x86_64 php70w-xmlrpc.x86_64 php70w-intl php70w-bcmath.x86_64 -y

8.安裝 phpMyAdmin

#yum install phpMyAdmin

#vi /etc/httpd/conf.d/phpMyAdmin.conf

<Directory /usr/share/phpMyAdmin/>

Options none

AllowOverrideLimit

Require all granted

</Directory>

將phpMyAdmin的認證cookie修改為http

# vi /etc/phpMyAdmin/config.inc.php

$cfg['Servers'][$i]['auth_type']     = 'http';

9安裝Drupal

在安裝時報文件和目錄不可寫,主是要selinux進行了控制,先查看下不可寫目錄與文件的值:

ls -lZ 

-rwxr--r--. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 default.settings.phpdrwxrwxrwx. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 files-rwxrwxrwx. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 settings.php

需要增加以下命令:

 chcon -t httpd_sys_content_rw_t sites/default/ chcon -t httpd_sys_content_rw_t sites/default/settings.php chcon -t httpd_sys_content_rw_t sites/default/files

完成Drupal安裝。


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 湾仔区| 洛川县| 黄浦区| 舒城县| 富顺县| 金山区| 荣昌县| 栾城县| 玉田县| 如东县| 松溪县| 通城县| 青冈县| 饶河县| 库伦旗| 乐陵市| 常熟市| 五大连池市| 行唐县| 合山市| 登封市| 抚宁县| 黄浦区| 永州市| 吉木萨尔县| 万安县| 拉萨市| 天峨县| 合水县| 玉树县| 时尚| 肇州县| 东海县| 南陵县| 栾城县| 重庆市| 肃宁县| 西乌珠穆沁旗| 龙州县| 浏阳市| 金秀|