CentOs7 LAMP Drupal安装记录

CentOs7 LAMP Drupal安装记录1.重设IP先使用DHCP在/etc/sysconfig/network-scripts/ifcfg-eno***中加入 ONBOOT=YESBOOTPROTO=DHCP#systemctlrestartnetwork2.更新yum的源为国内源wgethttp://mirrors.163.com/.help/CentOS7-Base-163.repo

大家好,又见面了,我是你们的朋友全栈君。

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.service

systemctl 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.php
drwxrwxrwx. 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

注意修改完成后,改关闭selinux的权限。

参考https://www.drupal.org/docs/7/installing-drupal-7/step-3-create-settingsphp-and-the-files-directory

完成Drupal安装。

10.安装Drush

drush dl china_address entity entityreference profile2 field_collection field_collection_views ctools views color_field libraries pathauto token rules date links wysiwyg backup_migrate transliteration devel context smtp node_clone flag restws

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/162287.html原文链接:https://javaforall.net

赞 (0)
全栈程序员-站长的头像全栈程序员-站长

相关推荐

  • tasklist命令

    tasklist命令[align=center][size=large]Tasklist命令[/size][/align]Tasklist命令用来显示运行在本地或远程计算机上的所有进程,带有多个执行参数使用格式  Tasklist[/Ssystem[/Uusername[/P[password]]]][/M[module]|/SVC|/V][/FIfilter][/F…

    2022年5月3日
  • Django(72)Django认证系统库–djoser「建议收藏」

    Django(72)Django认证系统库–djoser「建议收藏」djoser是什么?作用:Django认证系统的REST实现。djoser库提供了一组DjangoRestFramework视图,用于处理注册、登录、注销、密码重置和帐户激活等基本操作。它适用于

    2022年7月29日
  • stl库,基本操作代码

    stl库,基本操作代码

    2021年9月27日
  • git删除远程分支

    1.git删除远程分支gitpushorigin–delete[branch_name]2.删除本地分支区别gitbranch-d会在删除前检查merge状态(其与上游分支或者与head)。gitbranch-D是gitbranch–delete–force的简写,它会直接删除。共同点都是删除本地分支的方法(与删除远程分支命令相独立,要想本地和远程都删除,必须得运行两个命令)。3.git查看分支:查看本地分支gitbranch查看远程分支

    2022年4月3日
  • JetBrains WebStorm 安装教程

    JetBrains WebStorm 安装教程首先声明,此方法仅用来参考学习,不得用于商业用途,请支持正版,学生可以免费申请到正版软件。网上有很多激活成功教程方法,可能不同的版本不一样,这篇文章就只针对JetBrainsWebStorm2018.1.5×64版本的软件。因为本人用的就是这个版本,亲测有效。——————2019年10月首先需要下载一个jar包:JetbrainsIde…

    2022年6月16日
  • pycharm 2022.01.12 激活[最新免费获取]

    (pycharm 2022.01.12 激活)最近有小伙伴私信我,问我这边有没有免费的intellijIdea的激活码,然后我将全栈君台教程分享给他了。激活成功之后他一直表示感谢,哈哈~IntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,下面是详细链接哦~https://javaforall.net/100143.html…

    2022年3月31日

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号