Archive | July 2011

Installing Apache application server


To install the application server such as Apache you need get sure that the httpd i.e. http daemon is running.

Hence to check whether it’s running or not you can type the command as:

For Ubuntu:

/etc/init.d/httpd  restart

if it outputs OK then no need to install httpd otherwise install sudo apt-get install httpd*  & then install apache using  sudo apt-get install apache2

For fedora/RedHat/CentOs:

Check httpd running status using /etc/init.d/httpd  restart similar to Ubuntu and sudo yum install httpd* & install apache using the command as sudo yum install apache*

Advertisements

Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’


ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’

if you are new to installing mysql server you might probably face this error quite often if you type mysql in the shell prompt.

> mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

  • To fix:

First start the mysql daemon, then type mysql

> /etc/init.d/mysqld start
> mysql

It worked for me!

  • To update mysql root password

mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD('new-password') WHERE user='root';
mysql> FLUSH PRIVILEGES;

  • To add a new user to mysql

1. First login as root then create a database ‘demo’

> mysql -u root -p
Enter password:(enter your password)
mysql> create database demo; //creates database namely demo.

Updating Linux Using Terminal Commands


You can update your linux system using the following commands.Type the command & press enter,then enter your login password. The update process will take time depending upon the available updates.

  • For Fedora/CentOs/Red-Hat versions :   “sudo yum update
  • For Ubuntu:   “sudo apt-get update

Similarly you can try to upgrade(to newer version) by using following commands:

  • For Fedora/CentOs/Red-Hat versions :   “sudo yum upgrade
  • For Ubuntu:   “sudo apt-get upgrade
%d bloggers like this: