`
cuiyadll
  • 浏览: 197110 次
文章分类
社区版块
存档分类
最新评论

一键安装LAMP环境

 
阅读更多
LAMP环境是可以一键安装的。即安装好Linux ubuntu后,用
  Sudo apt-get install tasksel
  Sudo tasksel install lamp-server
  两个命令就可以安装Apache+Mysql+Php环境了。

错误信息:
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

解决方法:
sudo gedit /etc/apache2/apache2.conf

在文件后面加上:
#Server Name
ServerName 127.0.0.1


Step 1:
Installing apache

Open Terminal. To open terminal click the Dash home from unity launcher. And type terminal in the search field.And click Terminal .



And type the below code in terminal and hit enter.

sudo apt-get install apache2

Type your ubuntu password and press enter.

Type y and hit enter to confirm apache installation.

After the successful installation  , open your favorite browser and type

http://localhost/

in the address bar and press enter. If you will see ‘It works!’ , then your apache works fine.

Step 2:
Installing PHP

Open Terminal. And type the below code in terminal and hit enter.

sudo apt-get install php5 libapache2-mod-php5

Type your ubuntu password if needed.

Type y and hit enter to confirm PHP installation.
After the successful installation restart Apache using the below code

sudo /etc/init.d/apache2 restart

Test PHP installation

To test PHP is installed, Type

sudo gedit /var/www/phpinfo.php

in the terminal and type your ubuntu password if needed. It will open the phpinfo.php file in gedit.Type below code in the phpinfo.php file, save and exit it .

<?php phpinfo() ?>

Now open your favorite browser and type http://localhost/phpinfo.php in the address bar and press enter. If you will see the below page , then your php works fine.

Step 3:
Installing MySql

Open Terminal. And type the below code in terminal and hit enter.

sudo apt-get install mysql-server

Type your ubuntu password if needed.

Type y and hit enter to confirm MySql installation.
During the installation you will be prompted for a password.Choose something secure and type the password and hit enter .

Repeat the password and press enter.

Step 4:
Installing phpMyadmin

phpMyAdmin is a free software tool written in PHP intended to handle the administration of MySQL over the World Wide Web.

Open Terminall. And type the below code in terminal and hit enter.

sudo apt-get install phpmyadmin

Type your ubuntu password if needed.

Type y and hit enter to confirm phpMyadmin installation.

During the installation you will be prompted for a webserver configuration.
Select

apache2

(already selected)
press enter.

Now you will be promped for phpmyadmin configuration

Select

No

and press enter.

Type below command in terminal

sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf.d

restart your apache server using

sudo /etc/init.d/apache2 restart

Open your browser and type

http://localhost/phpmyadmin/

in the address bar and press enter.

Type your mysql root  username and password to login.

You’re now ready to start building your local website. just put all of your files into

/var/www


it is from :http://connectwww.com/how-to-install-and-configure-apachephpmysql-and-phpmyadmin-on-ubuntu/727/
分享到:
评论

相关推荐

    一键安装lamp环境。

    一键安装lamp环境。

    一键部署LAMP环境,搭建个人博客

    一键部署LAMP环境,搭建自己的个人博客不是梦,基于FPM模式的编译安装实现Lamp应用的wordpress,

    一键搭建lamp 开发环境

    一键安装lamp。具体软件版本升级需要后续自行配置

    阿里云主机一键安装lamp、lnmp环境的shell脚本分享

    阿里云主机一键安装lamp,lnmp,自动安装脚本,由阿里云主机分享 一键安装包下载地址:点击下载 1、阿里云分享的一键安装lamp,lnmp,此安装包包含的软件及版本为: 代码如下: nginx:1.0.15、1.2.5、1.4.4 apache:...

    centos一键搭建Lamp脚本(无网络离线状态可用,包含离线安装包)

    ## linux系统上自动搭建lamp环境 ``` cd lamp-auto-config chmod -R 777 lamp_auto_config.sh ./lamp_auto_config.sh #执行shell脚本 ``` 1.安装后配置环境mysql变量 find / -name mysql#查看位置 2.一般在...

    Ubuntu Linux一键搭建Lamp开发环境.zip

    嵌入式Linux开发

    appserv(lamp环境一键安装超好用)

    AppServ是PHP网页架站工具组合包,泰国的作者将一些网路上免费的架站资源重新包装成单一的安装程序,以方便初学者快速完成架站,AppServ 所包含的软件有:Apache、Apache Monitor、PHP、MySQL、PHP-Nuke、phpMyAdmin...

    LAMP一键安装包

    解压完成后选择 2 则进行默认安装 安装在/usr/local/php_env_shishui路径下 安装完后会重启 重启后再次进入install_php文件夹 执行 sh open_php_envriment 即可打开mysql和apache mysql中root用户若有密码 则默认是...

    PhpStudy一键服务器环境搭建软件.rar

    phpStudy是集安全、高效、功能于一体且完全免费的一键服务器环境搭建软件,迄今已有十多年的开发历史,支持一键LAMP、LNMP、集群、监控、网站、FTP管理、redis、数据库、php多版本共存、JAVA、多用户多权限、网站...

    lanmp v2.5一键安装包(包括lamp,lnmp,lnamp安装)

    lanmp一键安装包是wdlinux官网2010年开始推出的lamp,lnmp,lnamp(apache,nginx,php,mysql,zend,eAccelerator,pureftpd)应用环境的快速简易安装包,执行一个脚本,整个环境就安装完成就可使用,快速,方便易用,安全稳定...

    易创LAMP环境整合套件 v2012 Sp1.zip

    |---一键安装.bat 环境启动脚本文件 |---一键卸载.bat 环境关闭脚本文件 |---服务器重启.bat 环境重启脚本文件 | --- eadme.txt 安装文档  |---sever web环境组件  | | ...

    易创LAMP环境整合套件 v2012 Sp1

    |---一键安装.bat 环境启动脚本文件 |---一键卸载.bat 环境关闭脚本文件 |---服务器重启.bat 环境重启脚本文件 | --- eadme.txt 安装文档  |---sever web环境组件  | |  | +--apache Apache 程序...

    一键部署基于docker的LAMP环境,+可配置的多进程php扩展安装.zip

    docker安装 docker安装方法有多种,下面列举在Windows和Linux系统中的安装步骤:12 Windows系统中的安装方法: 对于Windows Server系统,可以使用Microsoft发布的PowerShell模块DockerMicrosoftProvider来安装...

    一键PHP JAVA安装工具

    基于阿里云一键安装包源码安装,安全、稳定、高效,用户可以自由安装所需的组件,如lnmp、lamp、lnmpa、lnmt,并提供快捷方便添加虚拟主机、ftp账号等功能

    Linux VPS配置Web网站环境一键包(LNMP/LAMP/LNMPA)

    如果我们是资深Linux用户,可能不屑于网上免费Linux Web一键包、管理面板的安装,然后自己编译或者自由的一套环境安装配置环境。但是,对于大部分用户而言,麦子个人建议还是选择较为成熟的WEB一键包或者面板安装...

    Ubuntu下LAMP环境配置教程(linux)

    建议先通过phpnow1.5.6在Windows一键搭好php环境,然后通过Mysql_Gui_Tools图形化Mysql,把php工程写好,把php工程、Mysql数据库导入导出到Linux上面跑,Linux纯属就是跑工程,不做开发。 一、LAMP的下载、安装与...

    linux-web环境一键搭建

    适应于新手搭建LAMP环境

    OneinStack一键安装PHP/JAVA/HHVM和超详细的VPS手动安装LNMP的方法

    继著名的LAMP Stack(Linux + Apache + MySQL/MariaDB + PHP)网站环境之后,LNMP Stack(Linux + Nginx + MySQL/MariaDB + PHP)以其负载小、静态文件处理能力强的优势,在Linux平台上开始流行,尤其是在配置不太高...

    LNMP 一键安装包.zip

    你可以自由 下载 并使用它在VPS(VDS)或独立服务器上,做为真正的生产环境或测试环境。 它安装那些软件 Nginx MySQL PHP PHPMyAdmin Apache Zend Optimizer eAccelerator ionCube PureFTPd ...

Global site tag (gtag.js) - Google Analytics