LAMP on ubuntu12.04 PHP, Apache2, MySQL, Linux ( with phpmyadmin installed)
there are several procedure which include:
1. Install the packages
sudo apt-get install php5 php5-gd php5-cgi php5-mysql libapache2-mod-php5 apache2 mysql-client mysql-server -y
2. Configure the mysql database password if necessary
3.edit file
/etc/apache2/sites-available
touch /etc/apache2/sites-available/mysite
---
put something like this in the file 'myfile':
<VirtualHost *:80>
ServerAdmin webmaster@localhost DocumentRoot /var/www
DirectoryIndex index.html index.php index.htm
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
<Files *.html,*.htm,*.php>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order deny,allow
allow from all
</Files>
</Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory> </VirtualHost>
4.restart the apache2 service using:
service apache2 reload
5.write the first PHP page:
$ cat > /var/www/phpinfo.php << EOF
<?php
phpinfo();
?>
EOF
6. using the browser to check the page out!
Input your site and the pages
http://your_site_ip/phpinfo.php
Then you will see something like this:
7. install phpMyAdmin
wget -c http://dlsw.baidu.com/sw-search-sp/soft/26/14218/phpMyAdmin-4.1.4-all-languages.3715384168.zip -O /tmp/phpMyAdmin-4.1.4-all-languages.zip
unzip /tmp/phpMyAdmin-4.1.4-all-languages.3715384168.zip -d /var/www
mv phpMyAdmin-4.1.4-all-languages/ sqladmin # for secure reason coz there could be some blackcat miu scanning, you know.
8. open the page there:
http://your_site_ip/sqladmin
you would see:
and login then,
LAMP on ubuntu12.04 PHP, Apache2, MySQL, Linux ( with phpmyadmin installed)的更多相关文章
- ubuntu12.04 server + apache2 + wsgi + django1.6 部署
最近在学Python和Django,想自己部署一个服务器试试 环境:ubuntu12.04 server | apache2 | django1.6 | python2.7 | mod_wsgi 在网 ...
- 阿里云ubuntu12.04环境下配置Apache+PHP+PHPmyadmin+MYsql
此教程中使用的相关IP等设置,在你的环境中要做相应修改. 使用之前更新apt-get,因为服务器基本上是一个裸系统 apt-get update;apt-get upgrade; 1 我们使用root ...
- ubuntu14.04:php7+apache2+mysql
apache2: sudo apt-get install apache2 apache2-dev service apache2 start mysql: sudo apt-get install ...
- Ubuntu 12.04 安装 Apache2+PHP5+MySQL
LAMP是Linux web服务器组合套装的缩写,分别是Apache+MySQL+PHP.此教程教大家如何在Ubuntu 12.04 LTS server 上安装Apache2服务器,包括PHP5(m ...
- ubuntu12.04&15.04 安装lamp(12.04为主)
ubuntu 12.04&15.04下安装lamp环境 注意:如果是ubuntu15.04下,apache2.4.10的话,直接在/etc/apache2/apache2.conf文件的后边直 ...
- Linux Ubuntu12.04下安装OpenCv2.4.10
参考 http://blog.sina.com.cn/s/blog_53b0956801010lfu.html 捣鼓了一个晚上了,OpenCv还没装好,本来以为看个类似的比如Ubuntu安装OpenC ...
- Linux (Ubuntu12.04) 下开发工具安装和使用
Linux (Ubuntu12.04) 下开发工具安装和使用 这里讲述的是关于在ubuntu12.04下面安装和使用各种IDE 开发环境和初步使用的知识.说一下背景:很多的开发基本都是在linux操作 ...
- Linux14.04安装Mysql Linux公社
今天在Ubuntu 14.04下安装MySQL,本来是去官网下载安装包来安装的,可是安装之后却不能用,估计是要配置吧,在网上搜了很多的资料,结果还是失败.所以只好在软件源中安装,这样就省去很多不必要的 ...
- Putty远程登录VMware虚拟机Linux(Ubuntu12.04)
为了不至于来回在Win7和Ubuntu12.04之间来回切换,在Win7下使用VMware9.0安装了Ubuntu12.04. 首先下载Vmware9.0虚拟机软件,下载地址为:VMware-work ...
随机推荐
- 观察者模式的程序实例C++
一.什么是观察者模式 Observer模式也叫观察者模式,是由GoF提出的23种软件设计模式的一种.Observer模式是行为模式之中的一个,它的作用是当一个对象的状态发生变化时,可以自己主动通知其它 ...
- server正式的环境性能测试nginx-php 指着寻求突破的表现
因为我是第三级城市语言.无法接触到更牛接触逼公司或环境.这是你母亲的现场环境摸过几次.截至完毕,测试已设法提高空间. 公司须要的站点执行环境.不能由于我这边的瓶颈而阻碍了公司进行,希望各位大能能不吝惜 ...
- qml能够这么玩
Qt 5以后qmlscene被qml所替代,/usr/bin/qml能够用来执行.qml文件.所以,我们就能够和sh一样的来写界面了. #!/usr/bin/env qml import QtQuic ...
- 表现层及ASP.NET MVC介绍(一)
表现层及ASP.NET MVC介绍(一) 本文将介绍表现层及ASP.NET MVC的一些要点,特别是ASP.NET MVC的一些抽象和封装技巧,如果你对MVC还不了解,可以参考<ASP.NET ...
- js页码生成库,一个适合前后端分离的页码生成器
原文:js页码生成库,一个适合前后端分离的页码生成器 前言 上星期写的任务里面有需要进行分页的处理,git搜索了一番,没有觉得合适的,于是自己临时写了个分页的算法. 然后等闲下来的时候,决定把分页进行 ...
- POJ 3390 Print Words in Lines(DP)
Print Words in Lines Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 1624 Accepted: 864 D ...
- Java 之复合赋值运算符
1.引入问题 切入正题,看下面代码,结果应该是怎么样的 public class App{ public static void main( String[] args ){ byte a=1 ; i ...
- ser2net使用
在ubuntu下或者openwrt下安装了ser2net程序之后,可以将串口中的数据转发为以太网数据. 设置在/etc/ser2net.conf中最后: 3002:0:/dv/ttyUSB0:1152 ...
- 读书笔记—CLR via C#反射
前言 这本书这几年零零散散读过两三遍了,作为经典书籍,应该重复读反复读,既然我现在开始写博了,我也准备把以前觉得经典的好书重读细读一遍,并且将笔记整理到博客中,好记性不如烂笔头,同时也在写的过程中也可 ...
- Ibatis根据id获取拼接好的sql语句案例
//得到sql语句: public virtual string GetSqlStatement(string statementName, object paramObject) { ISqlMap ...