摘要: 在/etc/init.d/目录下创建一个简单的服务脚本,假设脚本名为hello 第一行的"#!/bin/sh"一定要有, 否则有可能会报错。 然后赋予hello可执行权限,如:chmod +x /etc/init.d/hello如果执行service hello时报错: hello.service 阅读全文
posted @ 2017-11-30 13:02 刘镇维 阅读(297) 评论(0) 推荐(0)
摘要: 1、安装git yum install -y git 2、创建git仓库保存的目录 mkdir /data/git_repo 3、初始化空仓库 cd /data/git_repogit init --bare --shared example.git 4、客户端使用SSH账户访问服务器仓库 git 阅读全文
posted @ 2017-11-29 21:54 刘镇维 阅读(254) 评论(0) 推荐(0)
摘要: 1. 安装apache2安装命令: sudo apt-get install apache2启动/停止/重启apache2: service apache2 start/stop/restart2. 卸载apache2(1) $ sudo apt-get --purge remove apache2 阅读全文
posted @ 2017-11-29 15:40 刘镇维 阅读(188) 评论(0) 推荐(0)
摘要: a? 零个或一个aa* 零个或多个aa*? 零个或多个a(非贪婪)a+ 一个或多个aa{n} 正好出现n次aa{n,} 至少出现n次aa{n,m} 出现n-m次a[abc] a或b或c [^abc] 任意不是abc的字符 [a-z] a-z的任意字符 [a-zA-Z] a-z或A-Z (a|b) a 阅读全文
posted @ 2017-10-19 13:03 刘镇维 阅读(150) 评论(0) 推荐(0)
摘要: http://www.cnblogs.com/adforce/archive/2012/11/23/2784664.html .htaccess是什么.htaccess文件(或者"分布式配置文件")提供了针对目录改变配置的方法, 即,在一个特定的文档目录中放置一个包含一个或多个指令的文件, 以作用于 阅读全文
posted @ 2017-09-30 09:19 刘镇维 阅读(142) 评论(0) 推荐(0)
摘要: // 安装 git sudo apt-get install gitsudo apt-get install curl // 请先确认服务器是否安装了curl 如果已经安装跳过即可// 安装 nodecurl -sL https://deb.nodesource.com/setup_6.x | su 阅读全文
posted @ 2017-09-20 18:06 刘镇维 阅读(535) 评论(0) 推荐(0)
摘要: http://www.wallcopper.com/linux/1650.html 创建文件软连接 ln -s 源路径 目标路径 查看软连接ls -il 服务操作:systemctl start foo.servicesystemctl stop foo.servicesystemctl resta 阅读全文
posted @ 2017-09-01 22:50 刘镇维 阅读(338) 评论(0) 推荐(0)
摘要: http://www.ttlsa.com/web/hsts-for-nginx-apache-lighttpd/ 302跳转通常情况下,我们将用户的 HTTP 请求 302 跳转到 HTTPS,这会存在两个问题:不够安全,302 跳转会暴露用户访问站点,也容易被劫持拖慢访问速度,302 跳转需要一个 阅读全文
posted @ 2017-08-18 11:44 刘镇维 阅读(285) 评论(0) 推荐(0)
摘要: MongoDB常用命令> show dbs #显示数据库列表 > show collections #显示当前数据库中的集合(类似关系数据库中的表)> show users #显示用户> use <db name> #切换当前数据库,如果数据库不存在则创建数据库。 > db.help() #显示数据 阅读全文
posted @ 2017-06-13 17:34 刘镇维 阅读(1030) 评论(0) 推荐(0)
摘要: 淘宝网API地址: http://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=15850781443参数:tel:手机号码返回:JSON拍拍API地址: http://virtual.paipai.com/extinfo/GetMobilePr 阅读全文
posted @ 2017-05-08 18:41 刘镇维 阅读(348) 评论(0) 推荐(0)
摘要: 1、设置了tabBar的页面,好像用navigator跳不过去。 阅读全文
posted @ 2017-04-13 14:56 刘镇维 阅读(133) 评论(0) 推荐(0)
摘要: 转载 http://donex.blog.51cto.com/2005970/834467 原文比较乱,只能参考 本地交互执行:1. 修改shell#!/usr/bin/expectset USER [lindex $argv 0]set SHELL [lindex $argv 1]set time 阅读全文
posted @ 2016-12-14 13:56 刘镇维 阅读(10755) 评论(0) 推荐(0)
摘要: 1、配置允许跨域请求 Header always set Access-Control-Allow-Origin "*"Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"Header alw 阅读全文
posted @ 2016-11-15 10:26 刘镇维 阅读(1944) 评论(0) 推荐(0)
摘要: glances相当于美化版的TOP命令工具安装步骤:1,yum install epel*2,yum install python-pip python-devel3,yum install glances df -B[G,M,K]查看磁盘剩余空间 free -mh查看内存 netstat -ntl 阅读全文
posted @ 2016-10-31 14:53 刘镇维 阅读(590) 评论(2) 推荐(0)
摘要: http://blog.csdn.net/kaizhu_qin/article/details/17506293 很多第一次配置apache的虚拟主机的时候,以为配置第一个虚拟主机完成以后,以后就不会出现什么问题了。在配置第一个虚拟主机的时候,重启apache的时候,都可能会遇到下面的问题:[war 阅读全文
posted @ 2016-10-27 17:59 刘镇维 阅读(464) 评论(0) 推荐(0)