海运的博客

Kloxo下Apache报错NameVirtualHost has no VirtualHosts解决

发布时间:December 18, 2012 // 分类:控制面板 // No Comments

Kloxo面板重启Apache时提示以下错误:

[Tue Dec 18 22:07:51 2012] [warn] NameVirtualHost 8.8.8.8:80 has no VirtualHosts
[Tue Dec 18 22:07:51 2012] [warn] NameVirtualHost 8.8.8.8:443 has no VirtualHosts

原因是在以下配置文件内重复设置NameVirtualHost,注释一个即可。

/etc/httpd/conf/kloxo/init.conf
/etc/httpd/conf/kloxo/virtualhost.conf

Vim插件管理器Vundle安装使用

发布时间:December 16, 2012 // 分类:Vim // No Comments

Linux各发行版上有各种软件包管理器,在强大的Vim上也有包管理插件,极大的方便系统使用与管理。
Vundle基于Git获取Github上的各种Vim插件,可进行在线查找、安装、更新Vim插件,每个插件以单独目录存放,方便管理。
Vundle安装:

git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

Windows下安装:

cd %USERPROFILE%
git clone https://github.com/gmarik/vundle.git .vim/bundle/vundle

Vundle配置:

set nocompatible "与vi不一致
filetype off
set rtp+=~/.vim/bundle/vundle/ "载入特定目录插件
"set rtp+=$HOME/.vim/bundle/vundle/ "Windows下
call vundle#rc()
"plugin 
"vimscripts账号下的项目直接填写名称即可
Bundle 'snipMate'
"其它需填写用户/资源名称
Bundle 'gmarik/vundle'
"非github上资源
Bundle 'git://git.wincent.com/command-t.git'
"indent
Bundle 'php.vim-html-enhanced'
"color
Bundle 'Lucius'
filetype plugin indent on  

Vundle命令:

:BundleList          #已安装列表
:BundleInstall(!)    #安装、升级
:BundleSearch(!)     #搜索
:BundleClean(!)      #删除

也可在Vundle窗口下管理插件,打开Vim执行:

:Bundles #GitHub上插件列表

Vim插件管理器Vundle.png

Vim将gui2term.py配色转换为终端配色

发布时间:December 16, 2012 // 分类:Vim // No Comments

Vim下的主题配色大部分都是为GUI下设置的,在终端下配置为相同配色相差极大,可以使用gui2term.py将GUI本色转换为终端配色。
首先终端需开启256色,VIM配置开启256色:

set t_Co=256 

最新版gui2term.py需pytho3.0环境支持:

apt-get install python3

使用gui2term.py转换配色示例:

wget -O gui2term.py http://www.vim.org/scripts/download_script.php?src_id=16205
cp /usr/share/vim/vim72/rgb.txt ./
python3 gui2term.py gui.vim ter.vim
#个别配色如有终端配色请删除term部分后再转换

我转换的一些经典配色:https://github.com/foxconndmd/vim-colors-xterm
vim-xterm-colors:https://github.com/KevinGoodsell/vim-xterm-colors
vimcolorschemetest:http://code.google.com/p/vimcolorschemetest/

Cygwin使用Vim插件管理器Vundle错误error setting certificate verify locations解决

发布时间:December 16, 2012 // 分类:Vim,Cygwin // No Comments

Cygwin下使用Vundle通过Github安装VIM插件时提示以下错误:

error: error setting certificate verify locations:
CAfile: /usr/ssl/certs/ca-bundle.crt
CApath: none while accessing https://github.com/
fatal: HTTP request failed

通过apt-cyg安装ca-certificates解决:

apt-cyg install ca-certificates

或跳过CA验证:

export GIT_SSL_NO_VERIFY=1

Linux下Git和GitHub基本使用

发布时间:December 15, 2012 // 分类:Git // No Comments

1.创建Github账号,Linux创建SSH密钥:

ssh-keygen

2.将公钥加入到Github账户信息Account Settings,测试验证是否成功。

ssh -T git@github.com
Hi haiyun.me! You've successfully authenticated, but GitHub does not provide shell access.

3.GitHub创建项目。
4.本地配置,新建Git项目并提交到Github。

touch README.md
git init #初始化,建立本地git仓库
git add README.md #添加文件到本地仓库
git status #查看本地代码库状态
git commit -m "first commit" #提交到本地仓库
git remote add origin git@github.com:user/test.git #和远程代码库建立连接
git remote -v #查看连接
git remote rm origin #删除链接
git pull origin master --allow-unrelated-histories #要更新已存的github仓库先拉到本地再提交
git push origin master #将本地仓库文件提交到Github。

5.复制项目到本地:

git clone git://github.com/user/xxx.git

6.删除GitHub文件:

git rm README.md #本地仓库内删除
git commit -m "rm README.md" #提交到本地
git push -u origin master #提交到Github

7.和远程项目连接,注意不要使用https clone:

git clone git@github.com:user/test.git
git add .
git status 
git commit -m "commit"
git push -u origin main

8.删除回滚到最近的commit:

git reflog
git reset --hard commit_id #回滚到的commit id
git push origin master --force
分类
最新文章
最近回复
  • opnfense: 谢谢博主!!!解决问题了!!!我之前一直以为内置的odhcp6就是唯一管理ipv6的方式
  • liyk: 这个方法获取的IPv6大概20分钟之后就会失效,默认路由先消失,然后Global IPV6再消失
  • 海运: 不好意思,没有。
  • zongboa: 您好,請問一下有immortalwrt設定guest Wi-Fi的GUI教學嗎?感謝您。
  • 海运: 恩山有很多。
  • swsend: 大佬可以分享一下固件吗,谢谢。
  • Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
  • 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
  • 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
  • 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...
归档