Ubuntu快速安装 LAMP

以前在Ubuntu下安装lamp可以采用新立得软件包管理器来安装,方法如下:

System–>Administration–>Synaptic
Package Manager–>Edit–>Mark packages
by Task–>LAMP Server–>OK

如果是中文节面则是系统--》系统管理--》新立得软件包管理器-》编辑--》使用任务标记分组软件包--》LAMP Server
(勾选)--》返回到上一个窗口,点击应用,这个时候系会自动下载安装lamp环境软件包,很快就会完成,而且系统每次升级还会升级lamp环境到最新版
本。 【LINUX公社 www.LinuxIDC.com 】

但把Ubuntu重新安装为最新版本Ubuntu
10.10后,在新立得软件包管理器里并没有立得软件包管理器-编辑--使用任务标记分组软件包--

怎么办?

实际上只需2条命令即可

sudo apt-get install tasksel

任务标记分组

sudo tasksel install lamp-server

安装途中MySQL要求设定账户有密码,这是与操作系统没关系的账户与密码。

会碰到如下问题:

root@li216-88:/home# sudo tasksel install lamp-server
Can’t call method “set” on an undefined value at
/usr/share/perl5/Debconf/FrontEnd.pm line 126,
<GEN0> line 5.
Use of uninitialized value $ret in scalar chomp at
/usr/share/perl5/Debconf/Client/ConfModule.pm line 132,
<STDIN> line 4.
Use of uninitialized value $ret in split at
/usr/share/perl5/Debconf/Client/ConfModule.pm line 133,
<STDIN> line 4.
Use of uninitialized value $ret[0] in string eq at
/usr/share/perl5/Debconf/Client/ConfModule.pm line 134,
<STDIN> line 4.
Use of uninitialized value $ret[0] in string eq at
/usr/bin/debconf-apt-progress line 350,
<STDIN> line 4.
tasksel: aptitude failed (9)

参考:http://ubuntuforums.org/showthread.php?t=1660308

As far as I know, tasksel has been dropped from the default
packages due to a problem with it uninstalling /everything/ when
told to remove package groups (e.g. lamp-server).

Instead, you should use apt-get. The package groups still exist,
but you need to call them with a caret (^).

e.g.

Code:

sudo apt-get install lamp-server^


sudo apt-get install lamp-server^