Showing posts with label LAMP. Show all posts
Showing posts with label LAMP. Show all posts

Friday, 13 April 2012

LAMP server configuration in rhel6

[root@station1 ~]# yum groupinstall "MySQL Database server"
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Setting up Group Process
Resolving Dependencies
--> Running transaction check
---> Package mysql-server.x86_64 0:5.1.52-1.el6_0.1 will be installed
--> Processing Dependency: mysql = 5.1.52-1.el6_0.1 for package: mysql-server-5.1.52-1.el6_0.1.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.52-1.el6_0.1.x86_64
--> Running transaction check
---> Package mysql.x86_64 0:5.1.52-1.el6_0.1 will be installed
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================
 Package                          Arch                     Version                            Repository                Size
=============================================================================================================================
Installing:
 mysql-server                     x86_64                   5.1.52-1.el6_0.1                   server                   8.1 M
Installing for dependencies:
 mysql                            x86_64                   5.1.52-1.el6_0.1                   server                   889 k
 perl-DBD-MySQL                   x86_64                   4.013-3.el6                        server                   134 k

Transaction Summary
=============================================================================================================================
Install       3 Package(s)

Total download size: 9.1 M
Installed size: 26 M
Is this ok [y/N]: y
Downloading Packages:
-----------------------------------------------------------------------------------------------------------------------------
Total                                                                                         37 MB/s | 9.1 MB     00:00    
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : mysql-5.1.52-1.el6_0.1.x86_64                                                                             1/3
  Installing : perl-DBD-MySQL-4.013-3.el6.x86_64                                                                         2/3
  Installing : mysql-server-5.1.52-1.el6_0.1.x86_64                                                                      3/3
Installed products updated.

Installed:
  mysql-server.x86_64 0:5.1.52-1.el6_0.1                                                                                    

Dependency Installed:
  mysql.x86_64 0:5.1.52-1.el6_0.1                             perl-DBD-MySQL.x86_64 0:4.013-3.el6                           

Complete!
[root@station1 samba]# service mysqld start
Initializing MySQL database:  Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h station1.example.com password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

                                                           [  OK  ]
Starting mysqld:                                           [  OK  ]
[root@station1 samba]# mysqladmin -u root password password
[root@station1 samba]# mysql -u root -ppassword
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.1.52 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| test               |
+--------------------+
3 rows in set (0.00 sec)

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> DELETE FROM mysql.user WHERE user = '';
Query OK, 2 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye

Now Download mysql-gui-tools-5.0r12-linux-x86_64.tar.gz this package extract and keep the folder in /opt directory
[root@station1 ~]# cd /opt/mysql-gui-tools-5.0/
[root@station1 mysql-gui-tools-5.0]# cp MySQLAdministrator.desktop MySQLQueryBrowser.desktop /root/Desktop/
now go to your desktop and double click these two files wait for few seconds and click mark trusted option now you
can see the icons. login as shown in the screenshot below password is your mysql password "password"