- 1:36:00 PM
- Achappan Mahalingam
- No comments
- 3:20:00 PM
- Achappan Mahalingam
- No comments
[root@achappan htdocs_8085]# find . -type f | wc -l
14626
[root@achappan htdocs_8085]#
Explanation:
find . -type f
finds all files ( -type f ) in this ( . ) directory and in all sub directories, the filenames are then printed to standard out one per line.This is then piped | into
wc
(word count) the -l
option tells wc to only count lines of its input.Together they count all your files.
- 1:49:00 PM
- Achappan Mahalingam
- No comments
You can create a tar archive on two ways like below.
- To create an archive of a directory and its contents:
- tar -cvf name.tar /path/to/directory
- tar -cvf name.tar /path/to/directory
- To create an archive of certfain files:
- tar -cvf name.tar /path/to/file1 /path/to/file2 /path/to/file3
- 2:41:00 PM
- Achappan Mahalingam
- No comments
[root@achappan mysql]# df -hk /var
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00 271169800 141653824 115519128 56% /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00 271169800 141653824 115519128 56% /
- 12:32:00 PM
- Achappan Mahalingam
- No comments
1. List down all the installed Mysql RPM's
[root@achappan mysql]# rpm -qa | grep MySQL
MySQL-server-5.5.*-1.rhel5
MySQL-client-5.5.*-1.rhel5
perl-DBD-MySQL-3.0007-2.el5
[root@achappan mysql]#
2. Remove MySQL-server and MySQL-client from the list
[root@achappan mysql]# rpm -e MySQL-server-5.5.*-1.rhel5
[root@achappan mysql]# rpm -e MySQL-client-5.5.*-1.rhel5
3. Verify the uninstalled rpms are removed from the list or not.
[root@achappan mysql]# rpm -qa | grep MySQL
perl-DBD-MySQL-3.0007-2.el5
[root@achappan mysql]#
4. Find the list of mysql directories from system
[root@achappan mysql]# find / -name mysql
/etc/rc.d/init.d/mysql
/etc/logrotate.d/mysql
/usr/bin/mysql
/usr/lib/mysql
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/DBD/mysql
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/DBD/mysql
/usr/share/mysql
/var/lib/mysql
/var/lib/mysql/mysql
/var/lock/subsys/mysql
/var/run/sudo/mysql
5. Rename or Delete the highlighted mysql directories from the list.
6. Go to RPMs directory which you are downloaded latest rpms from mysql site.
[root@achappan mysql rpm]# ls -l
total 612100
-rw-r--r-- 1 root root 313067520 Apr 13 15:14 MySQL-5.6.24-1.rhel5.i386.rpm-bundle.tar
-rw-r--r-- 1 7155 wheel 22883979 Mar 26 16:27 MySQL-client-5.6.24-1.rhel5.i386.rpm
-rw-r--r-- 1 7155 wheel 4136019 Mar 26 16:27 MySQL-devel-5.6.24-1.rhel5.i386.rpm
-rw-r--r-- 1 7155 wheel 113129185 Mar 26 16:27 MySQL-embedded-5.6.24-1.rhel5.i386.rpm
-rw-r--r-- 1 7155 wheel 89185903 Mar 26 16:28 MySQL-server-5.6.24-1.rhel5.i386.rpm
-rw-r--r-- 1 7155 wheel 2371167 Mar 26 16:29 MySQL-shared-5.6.24-1.rhel5.i386.rpm
-rw-r--r-- 1 7155 wheel 5466510 Mar 26 16:29 MySQL-shared-compat-5.6.24-1.rhel5.i386.rpm
-rw-r--r-- 1 7155 wheel 75885537 Mar 26 16:29 MySQL-test-5.6.24-1.rhel5.i386.rpm
[root@achappan mysql rpm]#
7. Install MySQL-server and MySQL-client Rpms
[root@achappan mysql rpm]# rpm -i MySQL-server-5.6.24-1.rhel5.i386.rpm
After the MySQL Server installation it will provide the Mysql root password in mysql_secret file under the root dir (/root/.mysql_secret)
Then install MySQL Client. You probably always want to install this package.
[root@achappan mysql rpm]# rpm -i MySQL-client-5.6.24-1.rhel5.i386.rpm
8. Get MySQL Random generated root password
[root@achappan mysql rpm]# cat /root/.mysql_secret
# The random password set for the root user at Mon Apr 13 21:01:17 2015 (local time): mO4rRAW7Xr6Xdcy6
9. Start the mysql
[root@achappan mysql rpm]# /etc/init.d/mysql start
MySQL running (32751) [ OK ]
[root@achappan mysql rpm]#
10. Change the mysql password for your convenient.
[root@achappan mysql]# mysql -u e3user -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 724
Server version: 5.6.24 MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
mysql> show databases;
+----------------------------------------+
| Database |
+----------------------------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+----------------------------------------+
4 rows in set (0.02 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> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('e3_user');
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
MySQL-server-5.5.*-1.rhel5
MySQL-client-5.5.*-1.rhel5
perl-DBD-MySQL-3.0007-2.el5
[root@achappan mysql]#
2. Remove MySQL-server and MySQL-client from the list
[root@achappan mysql]# rpm -e MySQL-server-5.5.*-1.rhel5
[root@achappan mysql]# rpm -e MySQL-client-5.5.*-1.rhel5
3. Verify the uninstalled rpms are removed from the list or not.
[root@achappan mysql]# rpm -qa | grep MySQL
perl-DBD-MySQL-3.0007-2.el5
[root@achappan mysql]#
4. Find the list of mysql directories from system
[root@achappan mysql]# find / -name mysql
/etc/rc.d/init.d/mysql
/etc/logrotate.d/mysql
/usr/bin/mysql
/usr/lib/mysql
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/DBD/mysql
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/auto/DBD/mysql
/usr/share/mysql
/var/lib/mysql
/var/lib/mysql/mysql
/var/lock/subsys/mysql
/var/run/sudo/mysql
5. Rename or Delete the highlighted mysql directories from the list.
6. Go to RPMs directory which you are downloaded latest rpms from mysql site.
[root@achappan mysql rpm]# ls -l
total 612100
-rw-r--r-- 1 root root 313067520 Apr 13 15:14 MySQL-5.6.24-1.rhel5.i386.rpm-bundle.tar
-rw-r--r-- 1 7155 wheel 22883979 Mar 26 16:27 MySQL-client-5.6.24-1.rhel5.i386.rpm
-rw-r--r-- 1 7155 wheel 4136019 Mar 26 16:27 MySQL-devel-5.6.24-1.rhel5.i386.rpm
-rw-r--r-- 1 7155 wheel 113129185 Mar 26 16:27 MySQL-embedded-5.6.24-1.rhel5.i386.rpm
-rw-r--r-- 1 7155 wheel 89185903 Mar 26 16:28 MySQL-server-5.6.24-1.rhel5.i386.rpm
-rw-r--r-- 1 7155 wheel 2371167 Mar 26 16:29 MySQL-shared-5.6.24-1.rhel5.i386.rpm
-rw-r--r-- 1 7155 wheel 5466510 Mar 26 16:29 MySQL-shared-compat-5.6.24-1.rhel5.i386.rpm
-rw-r--r-- 1 7155 wheel 75885537 Mar 26 16:29 MySQL-test-5.6.24-1.rhel5.i386.rpm
[root@achappan mysql rpm]#
7. Install MySQL-server and MySQL-client Rpms
[root@achappan mysql rpm]# rpm -i MySQL-server-5.6.24-1.rhel5.i386.rpm
After the MySQL Server installation it will provide the Mysql root password in mysql_secret file under the root dir (/root/.mysql_secret)
Then install MySQL Client. You probably always want to install this package.
[root@achappan mysql rpm]# rpm -i MySQL-client-5.6.24-1.rhel5.i386.rpm
8. Get MySQL Random generated root password
[root@achappan mysql rpm]# cat /root/.mysql_secret
# The random password set for the root user at Mon Apr 13 21:01:17 2015 (local time): mO4rRAW7Xr6Xdcy6
9. Start the mysql
[root@achappan mysql rpm]# /etc/init.d/mysql start
MySQL running (32751) [ OK ]
[root@achappan mysql rpm]#
10. Change the mysql password for your convenient.
[root@achappan mysql]# mysql -u e3user -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 724
Server version: 5.6.24 MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
mysql> show databases;
+----------------------------------------+
| Database |
+----------------------------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+----------------------------------------+
4 rows in set (0.02 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> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('e3_user');
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
- 3:09:00 PM
- Achappan Mahalingam
- No comments
<?php
if(preg_match('/(?i)msie [1-8]/',$_SERVER['HTTP_USER_AGENT']))
{
echo "Browser Not supported";
exit;
}
?>
if(preg_match('/(?i)msie [1-8]/',$_SERVER['HTTP_USER_AGENT']))
{
echo "Browser Not supported";
exit;
}
?>
Subscribe to:
Posts (Atom)