ubuntu下lamp配置
apache
在Ubuntu Linux上用
apt-get install apache2
安装Apache2后,竟然发现没有httpd.conf(位于/etc/apache2目录)
Ubuntu的Apache的配置文件是 /etc/apache2/apache2.conf
Web文档根目录默认在/var/www定义在
在 /etc/apache2/sites-enabled/000-default中
DocumentRoot /var/www/html
/etc/apache2/ports.conf,这里面设置了Apache使用的端口
说明:
/etc/apache2目录下
sites-available目录,放是真正的配置文件
ites- enabled目录存放的是指向这里的文件的符号链接
启动、重启、停止apache服务
sudo service apache2 start
sudo service apache2 restart
sudo service apache2 stop
创建VirtualHost
<VirtualHost 192.168.0.107:>
DocumentRoot /web/
ServerName 192.168.0.107:
<Directory "/web/">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
启动Apache的Rewrite功能
sudo a2enmod rewrite
php
更新源列表,否则安装php会失败
vi /etc/apt/source.list
在最前面添加
deb http://mirrors.aliyun.com/ubuntu/ precise main restricteduniverse multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-security mainrestricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-updates mainrestricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-proposed mainrestricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-backports mainrestricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise mainrestricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-securitymain restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-updatesmain restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-proposedmain restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-backportsmain restricted universe multiverse
sudo apt-get update
安装PHP
sudo apt-get install php5
重启服务器
mysql
sudo apt-get install mysql-server
启动、重启、停止mysql服务
service mysql start
service mysql restart
service mysql stop
mysql 允许root远程登录
grant all privileges on *.* to root@"%" identified by "" with grant option;
修改配置文件/etc/mysql/my.cnf,把bind-address = 127.0.0.1注释掉
#bind-address = 127.0.0.1
查看本机ip地址
ifconfig -a
在winows下用Navicat,新建连接,能正常访问mysql
FTP
sudo apt-get install vsftpd
查看是否安装成功
sudo service vsftpd restart
建立ftp目录
sudo mkdir /home/ftpfile/ftpfile
新建ftp用户
sudo useradd –d /home/ftpfile –s /bin/bash baby
设置myftp用户密码
sudo passwd baby
修改ftp配置文件/etc/vsftpd.conf
anonymous_enable=NO local_enable=YES write_enable=YES chroot_local_user=YES chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list
在/etc/目录中新建vsftpd.chroot_list文件
baby
ubuntu下lamp配置的更多相关文章
- Ubuntu下HTTPS配置
Ubuntu下HTTPS配置非常简单,对大部分用户而言,使用普通的自签名证书,只需按照步骤进行就可以了,无需了解密钥.证书的更多知识,更深的背景知识还有RSA算法.DES算法.X509规范.CA机构. ...
- Opencv 2.4.9在Ubuntu下的配置与安装
[原]Opencv 2.4.9在Ubuntu下的配置安装 Opencv 2.4.9在Ubuntu下的配置与安装 surgewong@gmail.com http://blog.csdn.net/su ...
- Ubuntu下MySql配置
Ubuntu下MySql配置 安装MySQL 命令: sudo apt-get install mysql-server MySQL初始配置及管理 启动MySQL mysql start : mysq ...
- Ubuntu下Maven配置与Maven项目创建教程
一. Ubuntu下Maven配置 windows下Maven配置参考http://www.cnblogs.com/LexMoon/p/JavaMaven.html ubuntu下Maven地址htt ...
- Ubuntu下Linux配置内核各种常见错误和解决办法
镜像下载.域名解析.时间同步请点击阿里云开源镜像站 这篇把Ubuntu下Linux配置内核各种常见错误和解决办法给大家讲解一下,希望可以帮助到大家. 一.Ubuntu系统中缺少各种依赖包导致的问题 1 ...
- Ubuntu下LAMP的环境配置教程
总体来说,Ubuntu下安装LAMP环境是比较简单的,只需按照命令行执行即可,记录操作以备不时之需. 一,首先更新Ubuntu里面所有的软件 sudo apt-get update 二.之后安装Apa ...
- ubuntu下安装配置OpenCV
Cmake的安装 我用的是ubuntu-software自动下载安装的. Ubuntu 下安装 OpenCV 首先下载安装相关包,然后下载OpenCV 系统:ubuntu16.04 OpenCV:2. ...
- CentOS和Ubuntu下安装配置Greenplum数据库集群(包括安装包和源码编译安装)
首先说一下,无论是CentOS/RedHat还是Ubuntu都可以按源码方式.安装包方式编译安装. 1. 规划 192.168.4.93(h93) 1个主master 2个主segm ...
- ubuntu下nagios配置
参考文献: http://www.cnblogs.com/mchina/archive/2013/02/20/2883404.html http://my.oschina.net/duangr/blo ...
随机推荐
- Angularjs使用的一些特点
1.函数会影响到全局命名空间 javascript 尽量避免使用全局变量,因为他们容易被其他文件脚本覆盖. angularjs让所有函数的作用域作用在该模块下面,避免了该问题. 2.angularjs ...
- 《ASP.NET MVC 5 高级编程(第5版)》
第1章.入门 本章主要内容: ASP.NET MVC 5概述 其应用程序的创建方法 其应用程序的及结构 概述:将MVC设计模式应用于ASP.NET框架 ASP.NET 1.0支持两层抽象: Syste ...
- script和href
src是source的缩写,指向外部资源的位置,指向的内容将会嵌入到文档中当前标签所在位置:在请求src资源时会将其指向的资源下载并应用到文档内,例如js脚本,img图片和frame等元素. < ...
- Nginx 使用IP限制访问来源
在 server {... 下, 或者在 location xxx {... 下, 都可以添加如下的IP访问限制 allow 10.57.22.172; allow ; allow ; allow ; ...
- Java集合系列:-----------03ArrayList源码分析
上一章,我们学习了Collection的架构.这一章开始,我们对Collection的具体实现类进行讲解:首先,讲解List,而List中ArrayList又最为常用.因此,本章我们讲解ArrayLi ...
- DOM Element节点类型详解
上文中我们讲解了 DOM 中最重要的节点类型之一的 Document 节点类型,本文我们继续深入,谈谈另一个重要的节点类型 Element . 1.概况 Element 类型用于表现 HTML 或 X ...
- 在项目中代替DevExpress(一)
从Delphi时代开始一直都是DevExpress系列控件的忠实用户,到现在已经有10多个年头了.DevExpress里面的控件基本从头到尾都用过一次,而且也开发过很多基于DevExpress的子控件 ...
- NodeJs爬虫—“眼睛好看是一种什么样的体验?”
逛知乎的时候经常看见有好多的福利贴(钓鱼贴),这不最近又让我发现了一个——眼睛好看是一种什么样的体验是一种怎么样的体验呢?我决定把答案里的照片都下到我的电脑里好好体验一下,怎么做呢,一张一张下好麻烦, ...
- mysql full text全文索引必要条件
show variables like 'ft_m%' 'ft_max_word_len', '84''ft_min_word_len', '4' 对于英文来说, ft_min_word_len=4是 ...
- Excel导入导出,通过datatable转存(篇一)
//导入数据 public ActionResult ExpressInfoImport() { var ptcp = new BaseResponse() { DoFlag = true, DoRe ...