iis服务器助手广告广告
返回顶部
首页 > 资讯 > 服务器 >Fedora 23怎么安装LAMP服务器
  • 499
分享到

Fedora 23怎么安装LAMP服务器

2023-06-28 15:06:31 499人浏览 独家记忆
摘要

本篇文章给大家分享的是有关Fedora 23怎么安装LAMP服务器,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。lamp就是WEB应用软件组合,是由 linux、 Apache

本篇文章给大家分享的是有关Fedora 23怎么安装LAMP服务器,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。

lamp就是WEB应用软件组合,是由 linux、 Apache Http 服务、 MySQL/MariaDB 数据库PHP、 Perl 或 python 的简称。

下面教你如何在 Fedora 23 服务器上安装 LAMP 组合。

下面的教程默认使用 192.168.1.102/24 实例,请按照你的服务器做修改。

安装 Apache

Apache 是一款开源的 web 服务框架。完全支持 CGI, SSL。

切换到 root 账户:suFedora 23/22 输入以下命令来安装Apache:dnf install httpd -yFedora 21 及更早的版本:yum install httpd -y启动httpd服务,以在每次系统启动服务:systemctl enable httpd使用以下命令来启动httpd服务:systemctl start httpd

如果您遇到以下错误:

Job for httpd.service failed. See ‘systemctl status httpd.service’ and ‘journalctl -xn’ for details.

删除所有内容在/etc/hostname,并加上“localhost”。同时,在/etc/httpd/conf/httpd.conf文件中的“Servername”的值设定为“localhost”,并再次尝试启动httpd服务。

并调整防火墙以允许httpd服务,从远程客户端访问。

firewall-cmd --permanent --add-service=httpfirewall-cmd --permanent --add-service=https

重新启动firewalld服务:

firewall-cmd --reload

打开浏览器,输入服务器IP访问:

Fedora 23怎么安装LAMP服务器

安装 MariaDB

Fedora 23/22 用户安装命令:

dnf install mariadb mariadb-server -y

Fedora 21 及早前版本命令:

yum install mariadb mariadb-server -y

随系统自动启动命令:

systemctl enable mariadb

启动数据库服务器:

systemctl start mariadb

设置 MariaDB root 账户密码,默认情况下Mysql root用户的密码为空。因此,以防止未经授权的访问mysql数据库,我们设置需要root用户密码:

mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB

SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we’ll need the current

passWord for the root user. If you’ve just installed MariaDB, and

you haven’t set the root password yet, the password will be blank,

so you should just press enter here.

Enter current password for root (enter for none):

OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MariaDB

root user without the proper authorisation.

You already have a root password set, so you can safely answer ‘n’.

Change the root password? [Y/n] y ## Enter ‘y’ and press enter ##

New password: ## Enter password ##

Re-enter new password: ## Re-enter password ##

Password updated successfully!

Reloading privilege tables..

… Success!

By default, a MariaDB installation has an anonymous user, allowing anyone

to log into MariaDB without having to have a user account created for

them. This is intended only for testing, and to make the installation

Go a bit smoother. You should remove them before moving into a

production environment.

Remove anonymous users? [Y/n] ## Press Enter ##

… Success!

NORMally, root should only be allowed to connect from ‘localhost’. This

ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] ## Press Enter ##

… Success!

By default, MariaDB comes with a database named ‘test’ that anyone can

access. This is also intended only for testing, and should be removed

before moving into a production environment.

Remove test database and access to it? [Y/n] ## Press Enter ##

– Dropping test database…

ERROR 1008 (HY000) at line 1: Can’t drop database ‘test’; database doesn’t exist

… Failed! Not critical, keep moving…

– Removing privileges on test database…

… Success!

Reloading the privilege tables will ensure that all changes made so far

will take effect immediately.

Reload privilege tables now? [Y/n] ## Press Enter ##

… Success!

Cleaning up…

All done! If you’ve completed all of the above steps, your MariaDB

installation should now be secure.

Thanks for using MariaDB!

安装 PHP

Fedora 23/22 用户命令:

dnf install php -y

Fedora 21 及早期版本:

yum install php -y

测试PHP是否运行:

vi /var/www/html/testphp.php

输入以下内容:


重启 Http 服务:

systemctl restart httpd

浏览器输入看看:

Fedora 23怎么安装LAMP服务器

安装PHP模块

搜索模块并安装:

Fedora 23/22 用户:

dnf search php

Fedora 22及早期版本:

yum search php

现在安装你所选择所需模块,例如php-mysql,使用以下命令:

Fedora 23/22 用户:

dnf install php-mysql -y

Fedora 22及早期版本:

yum install php-mysql -y

重启 HTTP 服务:

systemctl restart httpd

浏览器查看模块安装是否成功:

Fedora 23怎么安装LAMP服务器

安装 phpMyAdmin

phpmyadmin 用于管理数据库:

Fedora 23/22 用户:

dnf install phpmyadmin -y

Fedora 22及早期版本:

yum install phpmyadmin -y

缺省情况下,phpMyAdmin 只能从本地主机进行访问。若要从远程系统访问您的网络中,请执行下列操作步骤。

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

查找并注释掉127.0.0.1 和请求 ip ::1 lines。然后添加一个额外的行要求所有授予略低于为注释行。

这是我的更改后的 phpMyAdmin.conf 文件。这些变化以粗体标记。

[...]Alias /phpMyAdmin /usr/share/phpMyAdminAlias /phpmyadmin /usr/share/phpMyAdmin   ADDDefaultCharset UTF-8        # Apache 2.4     #       Require ip 127.0.0.1#       Require ip ::1        Require all granted                # Apache 2.2     Order Deny,Allow     Deny from All     Allow from 127.0.0.1     Allow from ::1           # Apache 2.4     #       Require ip 127.0.0.1#       Require ip ::1        Require all granted           [...]

重要提示:不过让localhost以外的人访问数据库,应视为危险,除非通过SSL适当保护。做到这一点需要您自担风险。

保存并关闭文件。重新启动httpd服务。

systemctl restart httpd

OK,打开 phpmyadmin 测试一下:

Fedora 23怎么安装LAMP服务器

一些人借用LAMP来描述一类可定制组成的系统,而不是制造一系列新词,并用它来表示这些系统和统一打包的页面开发环境的不同。

以上就是Fedora 23怎么安装LAMP服务器,小编相信有部分知识点可能是我们日常工作会见到或用到的。希望你能通过这篇文章学到更多知识。更多详情敬请关注编程网服务器频道。

--结束END--

本文标题: Fedora 23怎么安装LAMP服务器

本文链接: https://www.lsjlt.com/news/320456.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • Fedora 23怎么安装LAMP服务器
    本篇文章给大家分享的是有关Fedora 23怎么安装LAMP服务器,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。lamp就是Web应用软件组合,是由 Linux、 Apache...
    99+
    2023-06-28
  • Fedora 23如何安装LAMP服务器
    这篇文章主要介绍了Fedora 23如何安装LAMP服务器,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。LAMP其实就是Linux+Apache+PHP+MySQL环境,安装...
    99+
    2023-06-28
  • Fedora 21 安装 LAMP 主机服务器
    要在Fedora 21上安装LAMP服务器,您需要按照以下步骤进行操作:1. 更新系统:首先,打开终端并使用以下命令更新您的系统:`...
    99+
    2023-10-12
    LAMP
  • Ubuntu怎么安装LAMP网络服务器
    本篇内容主要讲解“Ubuntu怎么安装LAMP网络服务器”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Ubuntu怎么安装LAMP网络服务器”吧!1. 在安装之前运行sudo apt-get u...
    99+
    2023-07-04
  • Fedora中怎么安装MongoDB服务器
    Fedora中怎么安装MongoDB服务器,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。如何从上游安装 MongoDB 服务器当 Fedora 用户想要安装 MongoDB...
    99+
    2023-06-04
  • Linux中怎么安装和配置LAMP服务器
    要在Linux系统上安装和配置LAMP服务器,需要按照以下步骤进行操作: 安装Apache服务器: 在终端中输入以下命令来安装Ap...
    99+
    2024-04-30
    Linux
  • LAMP服务如何安装
    LAMP服务(即Linux、Apache、MySQL和PHP)是一种常用的Web开发平台。以下是安装LAMP服务的步骤:1. 安装L...
    99+
    2023-09-21
    LAMP
  • Ubuntu中怎么安装和配置LAMP服务器
    要在Ubuntu上安装和配置LAMP服务器,您可以按照以下步骤进行: 安装Apache服务器: 打开终端,并运行以下命令安装Ap...
    99+
    2024-04-09
    Ubuntu 服务器
  • Fedora Cores怎么安装
    这篇文章主要介绍了Fedora Cores怎么安装,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。如何在 Fedora Cores上安装Dazuko1) 确保您安装的Fedor...
    99+
    2023-06-16
  • Fedora中如何安装MongoDB服务器
    这篇文章将为大家详细讲解有关Fedora中如何安装MongoDB服务器,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。1、使用上游 RPM 创建仓库(RHEL-8 构建)$ sudo...
    99+
    2023-06-16
  • Fedora中怎么安装mysql
    Fedora中怎么安装mysql,相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。如何启动Fedora mysql呢?首先切换到etc/init.d的目录下,如果是用ls查看所有文...
    99+
    2023-06-16
  • Fedora中如何安装Nginx服务器
    在Fedora中安装Nginx服务器可以通过以下步骤: 打开终端并输入以下命令以更新系统软件包列表: sudo dnf upda...
    99+
    2024-04-09
    Fedora
  • PHP中怎么安装LAMP环境
    这篇文章将为大家详细讲解有关PHP中怎么安装LAMP环境,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。VertrigoServVertrigoServ 是一个Windows平台下的非常专业的...
    99+
    2023-06-17
  • Fedora server怎么安装Mysql8
    这篇文章主要介绍“Fedora server怎么安装Mysql8”,在日常操作中,相信很多人在Fedora server怎么安装Mysql8问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Fedora serv...
    99+
    2023-06-27
  • Ubuntu中怎么安装LAMP组件
    本篇文章为大家展示了Ubuntu中怎么安装LAMP组件,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。使用Ubuntu界面管理器:系统->系统管理->新立得软件包管理器->编辑-&g...
    99+
    2023-06-16
  • Ubuntu中怎么安装LAMP套件
    本篇文章为大家展示了Ubuntu中怎么安装LAMP套件,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。1. 安装 Apache Web 服务器首先,利用下面命令更新 Ubuntu 服务器:$ ...
    99+
    2023-06-15
  • 阿里云ecs怎么安装lamp
    简介 阿里云ECS(Elastic ComputeService)是阿里云提供的一种弹性计算服务,可以方便地搭建和管理虚拟机实例。而LAMP环境则是由Linux操作系统、ApacheWeb服务器、MySQL数据库和PHP编程语言组成的常用开...
    99+
    2024-01-19
    阿里 ecs lamp
  • 阿里云服务器手动安装lamp环境
    本文主要介绍了如何在阿里云服务器上手动安装lamp环境,包括步骤、注意事项和常见问题的解决方案。本文适用于初学者和有一定服务器管理经验的用户。 在进行网站开发时,常常需要在服务器上安装lamp环境,即Linux操作系统、Apache服务器、...
    99+
    2023-11-04
    阿里 环境 服务器
  • 怎么在Fedora中安装VirtualBox
    这篇文章将为大家详细讲解有关怎么在Fedora中安装VirtualBox,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。最简单还不影响你操作系统的方式是 制作 Fedora 的 USB 临场启动盘...
    99+
    2023-06-15
  • 在Fedora上如何安装MongoDB服务器
    小编给大家分享一下在Fedora上如何安装MongoDB服务器,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!Mongo(来自 “humongous” —— 巨大的)是一个高性能、开源、无模...
    99+
    2024-04-02
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作