vim config

输入以下内容


#!/bin/bash
editor="vim"
case "$1" in
httpd)
echo -n "open httpd.conf "
$editor /usr/local/apache/conf/httpd.conf
;;

vhost)
$editor /usr/local/apache/conf/extra/httpd-vhosts.conf
;;

php)
$editor /opt/webserver/php-5.5.17/etc/php.ini
;;

php-fpm)
$editor /opt/webserver/php-5.5.17/etc/php-fpm.conf
;;

nginx)
$editor /usr/local/nginx/conf/nginx.conf
;;
esac

#vim /usr/local/apache/conf/extra/httpd-vhosts.conf

保存到/root目录下,然后链接到bin目录下
ln -s /root/config /usr/bin/config

Comments are closed.

Post Navigation