Friday, June 13, 2008

Twiki 4.2 Installation on CentOS 5

Download and install CentOS 5

Download Twiki 4.2 from http://twiki.org/
Wget command is quite handy at this.
#wget -c < link from where you want to download>

Check the services installed on the CentOS server. NMAP is a tool which is quite handy to figure out the installed services.

#nmap localhost

if NMAP is not installed then you can install this by

#yum install nmap

Now you can see how many services are up by using the command #nmap localhost.

Check for Apache Service

[root@localhost test]# nmap localhost
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2008-04-28 21:35 IST
Interesting ports on localhost.localdomain (127.0.0.1):
Not shown: 1673 closed ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
80/tcp open http
443/tcp open https


IF you do not find 80 port open here then do the following.

#service httpd start

To make this service permanent on.
#chkconfig --levels 345 httpd on

Install the required CPAN modules
#perl -MCPAN -e 'install FreezeThaw'
#perl -MCPAN -e 'install CGI::Session'
#perl -MCPAN -e 'install HTML::Tree'

It is not necessary that all the modules installed from the CPAN.
there are other methods as well.

You can use RPM approach for those who were not able to install by the CPAN.

Thursday, June 5, 2008

MySql 5: Error No. 1045 Access denied for user 'root'@'localhost' (using password: NO)

MySql 5: Error No. 1045 Access denied for user 'root'@'localhost' (using password: NO)

The above error happens in most cases when you have not given any password for ROOT user.

Solution:-

go to the bin directory of mysql and type the below.

c:\> mysqladmin SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPassword');

or try allowing the 3306 port in your client firewall

or check if some other application is using the 3306 port by "netstat" command.


---------------------------------------------
If instead of NO , you get a YES

The “YES” doesn’t mean that you are using the password “Yes” it simply mean “Yes” you are using a password. If the password was blank it might say “No”

The problem is the host shouldn’t be ‘%’.
Set it to ‘localhost’. Problem solved.
update user set Host=’localhost’ where User=’myUserName’