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配置的更多相关文章

  1. Ubuntu下HTTPS配置

    Ubuntu下HTTPS配置非常简单,对大部分用户而言,使用普通的自签名证书,只需按照步骤进行就可以了,无需了解密钥.证书的更多知识,更深的背景知识还有RSA算法.DES算法.X509规范.CA机构. ...

  2. Opencv 2.4.9在Ubuntu下的配置与安装

    [原]Opencv 2.4.9在Ubuntu下的配置安装  Opencv 2.4.9在Ubuntu下的配置与安装 surgewong@gmail.com http://blog.csdn.net/su ...

  3. Ubuntu下MySql配置

    Ubuntu下MySql配置 安装MySQL 命令: sudo apt-get install mysql-server MySQL初始配置及管理 启动MySQL mysql start : mysq ...

  4. Ubuntu下Maven配置与Maven项目创建教程

    一. Ubuntu下Maven配置 windows下Maven配置参考http://www.cnblogs.com/LexMoon/p/JavaMaven.html ubuntu下Maven地址htt ...

  5. Ubuntu下Linux配置内核各种常见错误和解决办法

    镜像下载.域名解析.时间同步请点击阿里云开源镜像站 这篇把Ubuntu下Linux配置内核各种常见错误和解决办法给大家讲解一下,希望可以帮助到大家. 一.Ubuntu系统中缺少各种依赖包导致的问题 1 ...

  6. Ubuntu下LAMP的环境配置教程

    总体来说,Ubuntu下安装LAMP环境是比较简单的,只需按照命令行执行即可,记录操作以备不时之需. 一,首先更新Ubuntu里面所有的软件 sudo apt-get update 二.之后安装Apa ...

  7. ubuntu下安装配置OpenCV

    Cmake的安装 我用的是ubuntu-software自动下载安装的. Ubuntu 下安装 OpenCV 首先下载安装相关包,然后下载OpenCV 系统:ubuntu16.04 OpenCV:2. ...

  8. CentOS和Ubuntu下安装配置Greenplum数据库集群(包括安装包和源码编译安装)

    首先说一下,无论是CentOS/RedHat还是Ubuntu都可以按源码方式.安装包方式编译安装. 1.   规划 192.168.4.93(h93)       1个主master  2个主segm ...

  9. ubuntu下nagios配置

    参考文献: http://www.cnblogs.com/mchina/archive/2013/02/20/2883404.html http://my.oschina.net/duangr/blo ...

随机推荐

  1. uva216 Getting in Line

    Computer networking requires that the computers in the network be linked. This problem considers a \ ...

  2. css的小问题总结

    1.居中问题 比如让宽度为60%的<div class="box">居中,可以再.box里面设置margin:auto 2.高度固定的div里面有两个子类div且高度和 ...

  3. 学习cocos 空程序

    今天开始学习cocos代码,首先研究源码中的空程序. 在这个程序中,在main函数中,创建了一个Application: int APIENTRY _tWinMain(HINSTANCE hInsta ...

  4. 查看oracle死锁进程并结束死锁

    查看锁表进程SQL语句1: select sess.sid, sess.serial#, lo.oracle_username, lo.os_user_name, ao.object_name, lo ...

  5. Oracle取TOP N条记录(转载)

    在SQL Server里面有top关键字可以很方便的取出前N条记录,但是Oracle里面却没有top的使用,类似实现取出前N条记录的简单方法如下: 方法1:利用ROW_NUMBER函数 取出前5条记录 ...

  6. node基础01:简要介绍

    1.node vs php 优点 性能高(机制问题) 开发效率高(省了不少优化的事) 应用范围广(可以开发桌面系统,electron框架) 缺点 新,人少 中间件少 IDE不完善 2.node的劣势和 ...

  7. windows命令行下简单使用javac、java、javap详细演示

    最近重新复习了一下java基础,在使用javap的过程中遇到了一些问题,这里便讲讲对于一个类文件如何编译.运行.反编译的.也让自己加深一下印象. 如题,首先我们在桌面,开始->运行->键入 ...

  8. tkinter 的两个例子

    第一个例子:after 用于定时操作 import tkinter as tk import time class MyApp(tk.Frame): def __init__(self, msecs= ...

  9. 跟我学习Storm_Storm基本概念

    首先我们通过一个Storm和Hadoop的对比来了解Storm中的基本概念. 接下来我们再来具体看一下这些概念. Nimbus:负责资源分配和任务调度. Supervisor:负责接受nimbus分配 ...

  10. opencv7-ml之svm

    因为<opencv_tutorial>这部分只有两个例子,就先暂时介绍两个例子好了,在refman中ml板块有:统计模型.普通的贝叶斯分类器.KNN.SVM.决策树.boosting.随机 ...