Establish the LAMP (Linux+Apache+MySQL+PHP) Development Environment on Ubuntu 14.04 Operating System
########################################################
Step One: Update the software package in your operation system.
THE COMMAND YOU CAN TYPE INTO YOUR CONSOLE
#apt-get update
#apt-get dist-upgrade -y --force-yes
########################################################
Step Two: Install Apache2 Web Server Environment.
THE COMMAND YOU CAN TYPE INTO YOUR CONSOLE
#apt-get install apache2 apache2-bin apache2-data apache2-doc apache2-mpm-prefork apache2-utils
And then you need to modify its default Home page. (/etc/apache2/mods-enabled/dir.conf)
<IfModule mod_dir.c>
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>
Modify it, like this as following show.
<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</IfModule>
After that, you still need to restart your apache server. so I think you have to execute the following command.
THE COMMAND YOU CAN TYPE INTO YOUR CONSOLE
#service apache2 restart
At last, you want to verify this step whether it works well. You only have to open your browser and type your machine's IP or localhost into the URL input-box.
I believe you'll see the Apache2 Ubuntu Default Page.
If you can see this page, you have enough reason to believe that you have succeed to install the apache web server on your system. It's great.
########################################################
Step Three: start up the pseudo-static componnet (which named mod_rewrite component).
THE COMMAND YOU CAN TYPE INTO YOUR CONSOLE
#a2enmod rewrite
#service apache2 restart
########################################################
Step Four: Create a user for management and setting up multi-site.
first thing you need to do, creating its home directory '/home/username'
THE COMMAND YOU CAN TYPE INTO YOUR CONSOLE
#mkdir /home/username
#adduser username -d /home/username(#comment: what username, it's up to you)
#passwd username
Enter new UNIX password:
Retype new UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for laozuo
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n]
and then we need to create a directory to store our site files and log files.
THE COMMAND YOU CAN TYPE INTO YOUR CONSOLE
#cd /home/username
#mkdir public_html logs
you need to set its permission for this user after you create this directory. Or we can not upload our site file into this folder or edit these file had existted on the website.
THE COMMAND YOU CAN TYPE INTO YOUR CONSOLE
#chown username:www-data -R /home/username/public_html /home/username/logs
#chmod 755 -R /home/username
The important thing you need to note that going to configure your website.
At the begining, you just need to disable 000-default.conf configuration.
THE COMMAND YOU CAN TYPE INTO YOUR CONSOLE
#a2dissite 000-default.conf
#service apache2 reload
The other important thing is that you need to write your own site's configuration.
THE COMMAND YOU CAN TYPE INTO YOUR CONSOLE
#mv 000-default.conf XXXX.XXX.conf
Modify this configuration file.
<VirtualHost *:80>
ServerName laozuo.org
ServerAlias laozuo.org
ServerAdmin webmaster@laozuo.org
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined <Directory /var/www/html>
Options Indexes ExecCGI Includes FollowSymLinks MultiViews
AllowOverride All
Order Deny,Allow #Here, you must note that Deny,Allow without any blank-space. If you leave the blank-space, you will encounter a error when you want to restart your apache server.
Allow from all
</Directory> </VirtualHost>
Saved it later, you need to start up our website.
THE COMMAND YOU CAN TYPE INTO YOUR CONSOLE
#a2ensite XXXX.XXX.conf
If you fail to launch it, I only suggest you go to check its log out. the log will restore on the /var/log/apache2/error.log file.
########################################################
Step Five: Install and Configuration MySQL Database
THE COMMAND YOU CAN TYPE INTO YOUR CONSOLE
#apt-get install mysql-server mysql-client
During the installation epriod, you have to type the same password two times. And then you don't have to do anything except for waitting until it has been completedly installed.
########################################################
Step Six: Install and Configure the PHP Development Environment.
THE COMMAND YOU CAN TYPE INTO YOUR CONSOLE
#apt-get install php5 php-pear php5-mysql php5-dev libapache2-mod-php5 php5-dev php5-curl php5-gd php5-imagick php5-mcrypt
After finishing to install these software package, you can go to the "/var/www/html/" directory.
One Important thing you need to finish here is that create a PHP file to verify if it works normally.
THE COMMAND YOU CAN TYPE INTO YOUR CONSOLE
#cd /var/www/html
#vim info.php
<?php
phpinfo();
?>
Saved it after you finish to write some code like this.
Please open your browser to verify this execitting moment and type your machine's IP/info.php or localhost/info.php.
You'll see some amazing thing. Showing as following screenshot:
########################################################
Step Seven: Install PHPMyAdmin
why do we need to install this software? maybe you want to know the answer.
I will tell you that it's useful to manage our SQL Database. So we need to install this guy to help us do something.
THE COMMAND YOU CAN TYPE INTO YOUR CONSOLE
#apt-get install phpmysqladmin
It requires us to select its supportive version.
I suggest you can choose the apache2.
Under this process, It also requires you to type your mysql's root password. maybe you need to type it two times.
That's all.
So our LAMP Development Environment has been established. It's an amazing thing.
Thank you for watching here. It's my pleasure to share something I know. Hope That It Can Help You.
I have to go asleep. Have a good time. Good Luck!
Establish the LAMP (Linux+Apache+MySQL+PHP) Development Environment on Ubuntu 14.04 Operating System的更多相关文章
- [Django] Setting up Django Development Environment in Ubuntu 14.04
1. Python Of course you will need Python. Still Python 2.7 is preferred, however if you would like t ...
- Centos下安装配置LAMP(Linux+Apache+MySQL+PHP)
Centos下安装配置LAMP(Linux+Apache+MySQL+PHP) 关于LAMP的各种知识,还请大家自行百度谷歌,在这里就不详细的介绍了,今天主要是介绍一下在Centos下安装,搭建一 ...
- CentOS 6.3下源码安装LAMP(Linux+Apache+Mysql+Php)环境【转载】
本文转载自 园友David_Tang的博客,如有侵权请联系本人及时删除,原文地址: http://www.cnblogs.com/mchina/archive/2012/11/28/2778779.h ...
- Lamp(linux+apache+mysql+php)环境搭建
Lamp(linux+apache+mysql+php)环境搭建 .安装apache2:sudo apt-get installapache2 安装完毕后.执行例如以下命令重新启动apache:sud ...
- CentOS 6.3下源码安装LAMP(Linux+Apache+Mysql+Php)环境
一.简介 什么是LAMP LAMP是一种Web网络应用和开发环境,是Linux, Apache, MySQL, Php/Perl的缩写,每一个字母代表了一个组件,每个组件就其本身而言都是在它所代 ...
- CentOS 6.3 源码安装LAMP(Linux+Apache+Mysql+Php)环境
一.简介 什么是LAMP LAMP是一种Web网络应用和开发环境,是Linux, Apache, MySQL, Php/Perl的缩写,每一个字母代表了一个组件,每个组件就其本身而>言都是在它所 ...
- CentOS6系统编译部署LAMP(Linux, Apache, MySQL, PHP)环境
我们一般常规的在Linux服务器中配置WEB系统会用到哪种WEB引擎呢?Apache还是比较常用的引擎之一.所以,我们在服务器中配置LAMP(Linux, Apache, MySQL, PHP)是我们 ...
- Ubuntu在下面LAMP(Linux+Apache+MySQL+PHP) 开发环境的搭建
LAMP在行业是一个非常流行的词.此4字母代表Linux.Apache,MySQL和PHP. LAMP其高效.灵活的特点已经成为中小企业的首选. 它已经推出了快速构建LAMP道路. 1 在Ubuntu ...
- 【转】CentOS环境下yum安装LAMP(Linux+Apache+Mysql+php)
此种方法很简单.每次都用源码编译,浪费好多时间啊! 同样的网站程序在Linux下运行要比在windows下快出不少,所以决定使用Linux的发行版CentOS ,本文主要讲解在CentOS下使用yum ...
随机推荐
- Ant-打增量包
如何打增量包具体用法见如下百度网盘的文档. http://pan.baidu.com/s/1gd5pAp1 1, ant 打源码增量包 build_incremental_src.xml 内容如下: ...
- 《Java I/O 从0到1》 - 第Ⅱ滴血 “流”
前言 <Java I/O 从0到1>系列上一章节,介绍了File 类,这一章节介绍的是IO的核心 输入输出.I/O类库常使用流这个抽象概念.代表任何有能力产出数据的数据源对象或者是有能力接 ...
- net core 安装web模板
---恢复内容开始--- 今天想试试在Linux用C#开发WebAPI,查了下,要用: dotnet new -t Web 来建立工程,结果我试了下,出来这段: Invalid input switc ...
- RabbitMQ消息队列之二:消费者和生产者
在使用RabbitMQ之前,需要了解RabbitMQ的工作原理. RabbitMQ的工作原理 RabbitMQ是消息代理.从本质上说,它接受来自生产者的信息,并将它们传递给消费者.在两者之间,它可以根 ...
- JS设计模式(三) 数据访问对象模式
引言 HTML5 提供了两种在客户端存储数据的新方法:localStorage.sessionStorage,他们是Web Storage API 提供的两种存储机制,区别在于前者属于永久性存储,而后 ...
- TEXT宏
TEXT宏是windows程序设计中经常遇到的宏,定义在 <winnt.h>中 TCHAR *P = TEXT("this is a const string"); 如 ...
- windows下实现linux的远程访问以及linux上文件的上传和下载
在网络性能.安全性.可管理性上,Linux有着其他系统无法比拟的强大优势,而服务器对这些方面要求特别高,因此Linux常常被用来做服务器使用.而当我们需要维护linux服务器的时候,就需要远程访问li ...
- vue环境搭建
1.Window 上安装Node.js 1.Windows 安装包(.msi) 32 位安装包下载地址 : https://nodejs.org/dist/v4.4.3/node-v4.4.3-x86 ...
- Windows下如何创建低权限进程
1. 前言 在使用 Sysinternals 出品的 Process Explorer 过程中,对 “Run as Limited User” 功能的实现方式颇感兴趣,一番搜寻之下发现Mark ...
- 规划自己的生活,从使用GTD时间管理法开始
前言 为了不再浪费时间,不在茫然度过每一天,我为自己应用了GTD时间管理法,之前并不知道这种方法,实际和我自己定制的也差不太多,下面说说这个方法. 一.GTD时间管理 时间管理法有很多,而GTD( ...