-->
Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Friday, August 15, 2014

how to migrate your mongodb into a bigger volume

First stop your mongodb
sudo service mongod stop
Assuming that your existing mongo installation is on /var/lib/mongodb/
sudo mv /var/lib/mongodb/ /your/preferred/destination/for/mongo/
set the rights correctly
sudo chmod -R mongodb.mongodb /your/preferred/destination/for/mongo/
and update the mongodb configuration file

# dbpath=/var/lib/mongodb 
dbpath= /your/preferred/destination/for/mongo/

Tuesday, March 19, 2013

Setting System-wide proxies in ubuntu


From this excellent post


Ubuntu Studio, like Xubuntu, uses the XFCE desktop environment which does not contain a graphical settings tool to set systemwide proxies (unlike the default Ubuntu desktop environment, Unity).

1. Set up the proxy/proxies for most programs

  • Open the /etc/environment file with gksudo leafpad (or your favorite editor). This file stores the system-wide variables initialized upon boot.
  • Add the following lines, modifying appropriately. You must duplicate in both upper-case and lower-case because (unfortunately) some programs only look for one or the other:
    http_proxy=http://myproxy.server.com:8080/
    https_proxy=http://myproxy.server.com:8080/
    ftp_proxy=http://myproxy.server.com:8080/
    no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
    HTTP_PROXY=http://myproxy.server.com:8080/
    HTTPS_PROXY=http://myproxy.server.com:8080/
    FTP_PROXY=http://myproxy.server.com:8080/
    NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"
    

2. Then set up proxies for GTK3 programs such as Rhythmbox:

Some newer GTK3 programs such as Rhythmbox ignore the environment variables set above, and rely on Gnome settings instead. To make sure they are covered, open a terminal and paste the below line-by-line, modifying as appropriate:
gsettings set org.gnome.system.proxy mode 'manual' 
gsettings set org.gnome.system.proxy.http host 'myproxy.server.com'
gsettings set org.gnome.system.proxy.http port 8080

3. Finally, set up the proxies for apt-get and Update Manager

  • These programs will not obey the environment variables either. Create a file called 95proxies in/etc/apt/apt.conf.d/, and include the following:
    Acquire::http::proxy "http://myproxy.server.com:8080/";
    Acquire::ftp::proxy "ftp://myproxy.server.com:8080/";
    Acquire::https::proxy "https://myproxy.server.com:8080/";
    
Finally, logout and reboot to make sure the changes take effect.

Sunday, March 10, 2013

stop not so secure/useful services on ubuntu

services you want to stop on your ubuntu server for improving security:

sudo netstat -ntaupe | grep LIST
sudo service  statd stop
sudo service cupsd  stop
sudo service cups  stop
sudo service rpcbind  stop
sudo service portmap  stop