Sunday, January 15, 2012

Ubuntu

Wonderful world of ubuntu!

Find files related to an application you've installed:
dpkg -L (example dpkg -L tomcat7-examples)
Find package you've installed :
apt-cache search tomcat7

For getting list of port being used by your server:
netstat -ntlp 

looking for 
apt-get search tomcat


For disabling firewall


# service iptables save
# service iptables stop
# chkconfig iptables off

http://www.cyberciti.biz/faq/disable-linux-firewall-under-centos-rhel

In order to change name of your host server in ubuntu:

1) edit /etc/hosts
192.162.23.116 youNewName

2) sudo hostname yourNewName

3) Unclear if it's really required:
/etc/hostname
==> yourNewName

Notice: this change will be overwritten after reboot ... Dont know how to make the change permanent.


Mount Windows folder 

    1. First, edit your /etc/hosts file and give the Windows machine a name you want to mount from: 192.168.1.2   pootie
    2. Next, install the samba and smbfs packages using your method of choice. (e.g. synaptic || Ubuntu software center) Create a directory where the share will appear on your local filesystem. $ sudo mkdir /mnt/music
    3. Edit /etc/fstab and add a line for the mount. Here "pootie" is the name of the machine and "music" is the name of the share.//pootie/music  /mnt/music  cifs exec,credentials=/etc/cifspw 0 0
    4. Create a password file /etc/cifspw with the login credentials for your Windows account. (if your windows account is going to change you'll need tp change that either):username=Jason
      password=ImNotGonnaTellYouThat
    5. And secure the file: $ sudo chmod 600 /etc/cifspw
    6. then excute the followed: $ sudo mount -a

No comments: