如何评价win7 fedora23 双系统 23

Fedora 23 如何安装 LAMP 服务器
阅读 3,284 次
LAMP 是开源系统上 Web 服务器的梦幻组合。 LAMP 是 Linux、 Apache HTTP 服务、 MySQL/MariaDB 数据库和 PHP、 Perl 或 Python 的简称。
下面教你如何在 Fedora 23 服务器上安装 LAMP 组合。
下面的教程默认使用 192.168.1.102/24 实例,请按照你的服务器做修改。
安装 Apache
Apache 是一款开源的 web 服务框架。完全支持 CGI, SSL。
切换到 root 账户:
Fedora 23/22 输入以下命令来安装Apache:
dnf install httpd -y
Fedora 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=http
firewall-cmd --permanent --add-service=https
重新启动firewalld服务:
firewall-cmd --reload
打开浏览器,输入服务器IP访问:
安装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!
Fedora 23/22 用户命令:
dnf install php -y
Fedora 21 及早期版本:
yum install php -y
测试PHP是否运行:
vi /var/www/html/testphp.php
输入以下内容:
phpinfo();
重启 Http 服务:
systemctl restart httpd
浏览器输入看看:
安装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
浏览器查看模块安装是否成功:
安装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/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
&Directory /usr/share/phpMyAdmin/&
AddDefaultCharset UTF-8
&IfModule mod_authz_core.c&
# Apache 2.4
&RequireAny&
Require ip 127.0.0.1
Require ip ::1
Require all granted
&/RequireAny&
&/IfModule&
&IfModule !mod_authz_core.c&
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
&/IfModule&
&/Directory&
&Directory /usr/share/phpMyAdmin/setup/&
&IfModule mod_authz_core.c&
# Apache 2.4
&RequireAny&
Require ip 127.0.0.1
Require ip ::1
Require all granted
&/RequireAny&
&/IfModule&
&IfModule !mod_authz_core.c&
重要提示:不过让localhost以外的人访问数据库,应视为危险,除非通过SSL适当保护。做到这一点需要您自担风险。
保存并关闭文件。重新启动httpd服务。
systemctl restart httpd
OK,打开 phpmyadmin 测试一下:
好了,安装完毕!
新跟进评论
我评论的新回复
| 得票最多美国当地时间日,北京时间11月4日,Fedora Project宣布Fedora 23正式发布,同时开放下载并可以由旧版本升级。这有可能是史上最好用的Fedora,三个主要的Fedora子版本都同时带来了最新的特性,同时Fedora 23成为自一分为三以来的第三个版本。本专题将为你介绍Fedora 23的新特性和安装等实用操作,供大家参考!
精彩文章推荐
一直以来,Red Hat系的许多教程,都会建议你关闭SELinux。确实,启用SELinu…在这篇文章中,我们将展示如何使用Samba共享文件夹。我们使用的Linux平台是…ProFTPD是一款基于GPL授权的自由开源FTP服务器软件,是Linux上的主流FTP服…本文介绍在Fedora上设定和取消IPv6地址的命令,供参考!…Docker不仅仅适用于云环境,它对最终用户来说也相当有用,如果你想在特定的…在docker开发列表上,有人询问有没有描述如何将用户添加到docker用户组的Fe…我们都知道,在基于红帽的Linux系统中,一个RPM包,需要把先将它依赖的其他…据Linux领先技术网站Phoronix,Fedora 21最重要的新变化涉及新的加密政策。…12月中旬,Fedora 20在两次跳票后正式发布,安装界面对比Fedora 18和19而言…Phoronix近日对新发布不久的Fedora 20进行了一次比较全面的测试,还对比了…
您会尽快升级到Fedora 23吗?
随着云计算、大数据和互联网的高速发展,快速迭代的产品需求和良好的用户体验,...
10月23日,Canonical公司刚刚发布了Ubuntu 15.10 wily werewolf的稳定版本,而...
Linux系统的魅力之一就是你可以直接从终端使用命令行来管理整个系统。而使用命...
开源的世界是一个分享的世界,在这个世界里,有辛勤奉献的技术开发者和由他们组...Fedora&22/23升级到&Fedora&24
Fedora 24 于日发布正式版。Linux用户可以从
https://torrents.fedoraproject.org 下载镜像文件种子,然后用BT软件下载镜像文件。
Fedora 24 亮点:
默认使用Gnome 3.20桌面环境
用户现在可以在图形化的软件安装程序(Gnome Software)中升级系统至下一个版本。
支持Flatpak软件包,与Ubuntu的Snap软件包类似。
LibreOffice 5.1
QGnomePlatform可以让Gnome与KDE应用程序在外观上趋于一致,并能同步这两种应用程序的...
更多内容请查看原文:
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。&&&&&&&&Fedora 23 Workstation的新特性介绍
正在努力加载播放器,请稍等…
正在努力加载播放器
大小:257.41KB&&所需金币:80
&& & 金币不足怎么办?
下载量:-次 浏览量:602次
贡献时间: 14:32:05
文档标签:
已有-位用户参与评分
同类热门文档
你可能喜欢
该文档还包含在
浏览/下载:1351/0| 文档数:10
看过这篇文档的还看过
阅读:1133&&下载:145
阅读:1631&&下载:78
阅读:455&&下载:67
阅读:1546&&下载:34
阅读:1348&&下载:28
阅读:172&&下载:9
阅读:1177&&下载:7
阅读:317&&下载:3
阅读:178&&下载:2
阅读:97&&下载:1
该用户的其他文档
所需财富值:
80文件大小:257.41KB
您当前剩余财富值:&&
举报该文档含有违规或不良信息。
反馈该文档无法正常浏览。
举报该文档为重复文档。
举报该文档侵犯版权。
例: /help.shtml}

我要回帖

更多关于 fedora 23 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信