Wednesday, May 22, 2013

Own Cloud Web app for centralized File sharing.

Administrators manual for ownCloud, a flexible, open source file sync and share solution. It comprises of the ownCloud server, as well as client applications for Microsoft Windows, Mac OS X and Linux (Desktop Client) and mobile clients for the Android and Apple iOS operating system.

Install the following packages:    yum -y install httpd php php-mysql php-mbstring php-devel mysql mysql-server zlib zlib-devel pcre-devel phpmyadmin 

Installed:
  pcre-devel.i686 0:7.8-6.el6           php.i686 0:5.3.3-22.el6            php-devel.i686 0:5.3.3-22.el6
  php-mbstring.i686 0:5.3.3-22.el6      php-mysql.i686 0:5.3.3-22.el6

Dependency Installed:
  php-cli.i686 0:5.3.3-22.el6        php-common.i686 0:5.3.3-22.el6        php-pdo.i686 0:5.3.3-22.el6

Updated:
  httpd.i686 0:2.2.15-26.el6.centos    mysql.i686 0:5.1.69-1.el6_4       mysql-server.i686 0:5.1.69-1.el6_4
  zlib.i686 0:1.2.3-29.el6             zlib-devel.i686 0:1.2.3-29.el6

Dependency Updated:
  httpd-devel.i686 0:2.2.15-26.el6.centos              httpd-manual.noarch 0:2.2.15-26.el6.centos
  httpd-tools.i686 0:2.2.15-26.el6.centos              mysql-libs.i686 0:5.1.69-1.el6_4

[root@test ~]# wget http://download.owncloud.org/community/owncloud-5.0.0.tar.bz2
--2013-05-05 09:25:16--  http://download.owncloud.org/community/owncloud-5.0.0.tar.bz2
Resolving download.owncloud.org... 50.30.42.17
Connecting to download.owncloud.org|50.30.42.17|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 13799361 (13M) [application/x-bzip]
Saving to: “owncloud-5.0.0.tar.bz2”

100%[====================================================================>] 13,799,361   246K/s   in 69s

2013-05-05 09:26:26 (194 KB/s) - “owncloud-5.0.0.tar.bz2” saved [13799361/13799361]


[root@test ~]# cp -rf owncloud /var/www/html/
[root@test ~]# chown -R apache:apache /var/www/html/owncloud
[root@test ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
[root@test bin]# service mysqld start
Starting mysqld:                                           [  OK  ]

[root@test bin]# mysql -u root -p                                             
Enter password:                                                                   
Welcome to the MySQL monitor.  Commands end with ; or \g.                         
Your MySQL connection id is 13                                                    
Server version: 5.1.69 Source distribution

Copyright (c) 2000, 2013, 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> create database owncloudtest;
Query OK, 1 row affected (0.00 sec)

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

mysql> exit
Below are some of the screen shots of the owncloud webapplication.
More details in  http://doc.owncloud.org/server/5.0/admin_manual/index.html











Friday, May 3, 2013

Script Saving every command and its output as log in Linux


script Saving every command and its output in log in Linux

[root@test ~]# script tester.log
Script started, file is tester.log
[root@test ~]# ping google.com
PING google.com (74.125.236.73) 56(84) bytes of data.
64 bytes from maa03s05-in-f9.1e100.net (74.125.236.73): icmp_seq=1 ttl=57 time=30.8 ms
64 bytes from maa03s05-in-f9.1e100.net (74.125.236.73): icmp_seq=2 ttl=57 time=31.4 ms
^C
--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1243ms
rtt min/avg/max/mdev = 30.876/31.165/31.454/0.289 ms
[root@test ~]# cal
     March 2013
Su Mo Tu We Th Fr Sa
                1  2
 3  4  5  6  7  8  9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
[root@test ~]# date
Fri Mar  1 20:11:40 IST 2013
[root@gai-1552 ~]# echo " Test Done sucessfully"
 Test Done sucessfully
[root@test ~]# exit
exit
Script done, file is tester.log
[root@test ~]#


Now the output is

[root@test ~]# cat tester.log
Script started on Fri 01 Mar 2013 08:10:52 PM IST
[root@test ~]# ping google.com
PING google.com (74.125.236.73) 56(84) bytes of data.
64 bytes from maa03s05-in-f9.1e100.net (74.125.236.73): icmp_seq=1 ttl=57 time=30.8 ms
64 bytes from maa03s05-in-f9.1e100.net (74.125.236.73): icmp_seq=2 ttl=57 time=31.4 ms
^C
--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1243ms
rtt min/avg/max/mdev = 30.876/31.165/31.454/0.289 ms
[root@test ~]# cal
     March 2013
Su Mo Tu We Th Fr Sa
                1  2
 3  4  5  6  7  8  9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
[root@test ~]# date
Fri Mar  1 20:11:40 IST 2013
[root@gai-1552 ~]# echo " Test Done sucessfully"
 Test Done sucessfully
[root@test ~]# exit
exit

Script done on Fri 01 Mar 2013 08:12:04 PM IST