Saturday, July 26, 2014

Bluetooth streaming on xUbuntu (now working)

Problem:

xUbuntu not able to connect to Bluetooth speakers (in my case JBL Bluetooth Portable speaker) as a music streamer.

Solution:

First run this command 

sudo apt-get install pulseaudio-module-bluetooth
pactl load-module module-bluetooth-discover
source: http://forum.kde.org/viewtopic.php?f=9&t=95838

Wednesday, March 21, 2012

If you use the command 
svn checkout <svn folder path> 
then it creates a directory of the last level of the path...in case you do not want that directory to be created and use the command 


svn checkout <snv_folder_path> <public_html_path> 

Wednesday, February 29, 2012

How to check if ports have got open after IPTables rules


Verify that port is open

Run following command:
netstat -tulpn | less
Make sure iptables is allowing port 80 / 110 / 143 connections:
iptables -L -n
Refer to iptables man page for more information about iptables usage and syntax:
man iptables

IPTables CentOS5.6 - port 80, 143, 443 allowed or open


I had my webserver setup perfectly and it was working fine but it was not accessible from outside. It was IPtables blocking the same. I read on internet about the rules for IpTables to allow access to port 80,443,143. below mentioned are the rules.

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 143 -j ACCEPT

But even after applying these rules things were not working because I was appending these rules after the rule

-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited


-------------------------------------------------------------------------------
I think (I don't know for sure) the rule for icmp shall always be at the last. Any rule after that to allow access to network resources will not get effective.

If I am wrong please correct.

You can refer to http://www.cyberciti.biz/faq/howto-rhel-linux-open-port-using-iptables/ for more information on IPTables.

Create WebServer CentOS5.x - PHP, MySQL, Apache2 installation

Now we install Apache with PHP (this is PHP):
yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel
Then edit /etc/httpd/conf/httpd.conf:
vi /etc/httpd/conf/httpd.conf
and change DirectoryIndex to
[...]
DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.pl
[...]
Now configure your system to start Apache at boot time:
chkconfig --levels 235 httpd on
Start Apache:
/etc/init.d/httpd start
INSTALL MYSQL:
yum1 install mysql mysql-devel mysql-server

MySQL Change root Password


mysqladmin command to change root password

If you have never set a root password for MySQL server, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows:
$ mysqladmin -u root password NEWPASSWORD
However, if you want to change (or update) a root password, then you need to use the following command:
$ mysqladmin -u root -p'oldpassword' password newpass
For example, If the old password is abc, you can set the new password to 123456, enter:
$ mysqladmin -u root -p'abc' password '123456'

Change MySQL password for other users

To change a normal user password you need to type (let us assume you would like to change password for user vivek) the following command: $ mysqladmin -u vivek -p oldpassword password newpass

Changing MySQL root user password using MySQL sql command

This is another method. MySQL stores username and passwords in user table inside MySQL database. You can directly update password using the following method to update or change password for user vivek:
1) Login to mysql server, type the following command at shell prompt: $ mysql -u root -p
2) Use mysql database (type command at mysql> prompt):
mysql> use mysql;
3) Change password for user vivek, enter:
mysql> update user set password=PASSWORD("NEWPASSWORD") where User='vivek';
4) Finally, reload the privileges:
mysql> flush privileges;
mysql> quit
Copied from: http://www.cyberciti.biz/faq/mysql-change-root-password/