You may be using a different clone or a cut down version of vim. Ubuntu by default uses vim-tiny if I remember correctly. You can find out which one is being used by checking the link "/etc/alternatives/vi"**. If it points to /usr/bin/vim.tiny you have a very minimal vim installed. If it points to some other file you can use "dpkg -S filename" to figure out where it came from.
To install a different "clone" use apt-get or another package management tool. I suspect that vim-gnome or vim-full may more to your liking. If one or both of the above are already installed but you have the link
** Many utilities and programs like mail, vi, java, awk, etc. are linked through /etc/alternitives/. For example on my system /usr/bin/cc is a link to /etc/alternatives/cc which is a link to /usr/bin/gcc. This allows a common set of tool names to be used with different packages that provide the same functionality.
I hope this helps
Right, a more formal answer:
Don't start guessing on a ubuntu/debian system where to put things. Ubuntu has pretty up to date versions, and aptitude is a very good package manager. You really want your server to have the following traits:
- To be secure
- To be well organized, so that you know where things should be
- To have a repeatable configuration, by some method. ( This is why I am big on the packages. Even without puppet, you can get a list of packages that are installed, and in an emergency just install that list and you are back to where you were, if you were hacked for example )
For Nginx, here is a how I get an updated package quite soon after they come out:
https://launchpad.net/~stevecrozz/+archive/ppa
You mentioned that you were new. Use the package managers. In your case, aptitude. We used to build from source all the time, but since you did not mention 'firewall' or 'security' then time is short.
Software that you install locally to a system goes in /usr/local. /usr is owned by the package managers really.
As for /opt, I use it for really weird stuff, like macports on my laptop or things I'm trying out, like coldfusion server ...
Default nginx goes into /usr/local/nginx , which is very good since if you build from source , make uninstall ... most likely wont be there.
http://library.linode.com is a really good basic resource. Read that too.
Once the reality of app dev with simultaneous server admin sinks in, you might want to check out
http://puppetlabs.com and get hooked up with puppet. That's for later
The nginx I told you about has the following options:
nginx -V
nginx version: nginx/0.8.48
TLS SNI support enabled
configure arguments: --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-debug --with-http_dav_module --with-http_flv_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module --add-module=/build/buildd/nginx-0.8.48/modules/nginx-upstream-fair
Now, later in life you might want to recompile for some other modules. ( /usr/local ) !
But regardless, you'll see the debian/ubuntu way of laying this stuff out. at least. A beloved trick i use is to install some server I need to build and copy the base config files, then purge it.
Good luck. BTW create a user for yourself, research sudo, and disable root logins. First thing I do on a fresh server.
Best Answer
The following line in
~/.vimrc
should do this.