本来Ubuntu下架建LAMP,需要apt安装很多包,记住那些包的名字是一件非常痛苦的事情,这里介绍另外一个简单方便的方法,使用tasksel安装LAMP套件。
先说说什么是Tasksel,它是一个Debian下的安装任务套件,如果你为了使你的系统完成某一种常规功能,而需要安装多个软件包时,我们就可以使用它了。这句话是什么意思呢?比如说,我们需要安装LAMP架设一个web服务器,为了完成这个功能,我们一般需要安装很多个软件包,用apt的话,我们就需要分别安装这些包(包含apache2、php5等等),以便构成一个完整的(符合我们要求的)LAMP系统。而如果使用tasksel的话,就可以用它方便的给我们安装一个完整的LAMP套件,而无须我们去关心具体需要由哪些包来构成这个统一的套件。在这里,LAMP是一个例子,象gnome-desktop等也同理。
其实使用tasksel安装LAMP套件的方法没什么好说的,很简单:
sudo tasksel install lamp-server
或者:
sudo tasksel
然后在tasksel界面中选LAMP-Server就OK了。
安装过程中会提示你输入mysql的root密码。
OK,安装完成了,现在你可以运行apache2来启动apache了,然后在浏览器里输入127.0.0.1,看看是不是已经显示测试页面了?
现在我们还要测试看看php5、mysql等是否也正常可以使用了,就在本机架设一个wordpress来试试看。首先,下载最新版的wordpress 2.31,解压,将文件夹放在/var/www/下。然后运行mysql -uroot -p进入mysql控制台,我们需要给wordpress创建一个数据库,运行“CREATE DATEBASEE wordpress;”,然后修改/var/www/wordpress/wp-config.php文件,更改mysql的账号密码以及数据库名称等,打开浏览器,输入127.0.0.1/wordpress/,是不是看到wordpress的安装界面了?简单的回答几个问题后,wordpress就架设成功了。
1、我运行apache2后,出现类似这样的错误提示:apache2: Could not determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName。
修改/etc/apache2/httpd.conf文件,在文件的最后添加一行:ServerName localhost就OK了(当然,这个文件有可能是空的,那直接把这行添加进去就可以了)。
2、当我用浏览器打开一个php页面后,浏览器并没有显示这个页面,而是提示我是否保存这个php文件?
那是因为apache没有正确的解析php,首先重新启动apache试试看(sudo /etc/init.d/apache2 restart),如果问题依旧,安装libapache2-mod-php5这个包,一般情况下这个包会随着LAMP套件一同安装,但是有可能会因为用户的其他操做误删除(比如说安装其他版本的php),然后重启apache後,你也许还要执行sudo a2enmod php5来激活它。
分享到:
相关推荐
在Ubuntu 13.10 Server上安装Nagios Core是一项关键任务,因为Nagios Core是一款强大的开源网络监控工具,能够实时监测网络服务、主机资源,并在出现问题时及时发出警报,帮助管理员确保系统的稳定运行。以下是安装...
### Ubuntu系统下安装Reviewboard详解 #### 一、概述 本文档将详细介绍如何在Ubuntu系统上安装并配置Reviewboard,一款流行的代码审查工具。通过本文档的学习,您将能够掌握安装过程中所需的关键步骤以及相关软件的...
This book is designed as an Ubuntu 15.04 server reference, covering the Ubuntu servers and their support applications. Server tools are covered as well as the underlying configuration files and system...
- 熟练安装和配置Ubuntu Server环境 - 管理用户账户和权限 - 配置网络服务 - 监控系统性能并进行故障排除 - 实施安全策略 - 使用自动化工具提高工作效率 #### 9. 结语 《Pro Ubuntu Server Administration》为读者...
"Ubuntuserver环境Bind9安装设置指南" Bind9是目前最流行的开源DNS服务器软件之一,它广泛应用于Linux操作系统中。 Bind9安装在Ubuntuserver环境中需要进行相应的设置和配置,这样才能确保DNS服务器的稳定运行。本...
然后通过包管理器(如apt-get或yum)安装Courier Mail Server的相关组件,包括courier-imap、courier-pop、courier-smtp等。 ```bash # 对于Ubuntu/Debian sudo apt-get install courier-imap courier-pop courier-...
Make life at the office easier for server administrators by helping them build resilient Ubuntu server systems About This Book Tackle the issues you come across in keeping your Ubuntu server up and ...
### Ubuntu Server 最佳方案知识点概览 #### 一、拥抱 Ubuntu Server - **Linux与Ubuntu简介**:本书首先从Linux的基础知识入手,介绍了Linux操作系统的基本概念及其与其他操作系统的区别。特别是针对为什么选择...
在安装过程中会提示配置Postfix的一些选项,通常可以选择“Local only”并配置System mail name为本地主机名或域名。 #### 四、安装GitLab 接下来将详细介绍如何在Ubuntu 16.10上安装GitLab。 ##### 下载GitLab...
Set up an NFS server? You'll learn it all and more with the expert guidance, tips, and techniques in this first-ever soup-to-nuts book on Ubuntu. From the basics for newcomers to enterprise ...
在Ubuntu上,你可以通过`apt-get`命令轻松安装Nginx。请按照官方文档(http://nginx.org/en/linux_packages.html)的指示执行以下命令: ```bash sudo apt-get update sudo apt-get install nginx ``` 这将在`/etc/`...
Part III: Ubuntu as a Server Chapter 20 Apache Web Server Management Chapter 21 Administering Database Services Chapter 22 File and Print Chapter 23 Remote File Serving with FTP Chapter 24 ...
It discusses the various editions of Ubuntu, including Desktop, Server, and Core, tailored for different use cases. - **Features of Ubuntu**: Key features such as stability, security, ease of use, ...
Install and configure common standard services such as web, mail, FTP, database and domain name server technologies Create kickstart scripts to automatically deploy RHEL 7 systems Use Orchestration ...
"extmail(ubuntu下)邮件服务器搭建" extmail 是一个基于 Linux 的邮件服务器解决方案,它可以提供完整的邮件服务,包括邮件发送、接收、存储和管理等功能。在 Ubuntu 操作系统下搭建 extmail 邮件服务器需要完成...
sudo apt-get install postfix mysql-server dovecot-pop3 dovecot-imapd clamav-daemon spamassassin amavis-new libclass-dbi-mysql-perl ``` 安装过程中会提示设置MySQL的root用户的密码。接下来,系统会询问...