About Me

My photo
Hi Friends, I am Sandeep CC and some people know me as System Administrator. I have started my professional career from 2008. I have been working as System Administrator on Linux Server and Windows Client. I am here to share my Knowledge in which I have experienced and which I have come across till now, It could be help to you people. In case anything wrong or any improvements in my post steps, Please comment to the post, Feel free to contact me by posting comments on this blog. Thanks and Regards, Sandeep CC

Tuesday, December 30, 2014

Configure Wine on Redhat Linux / CentOS

                                  Configure Wine on Redhat Linux / CentOS




Introduction: Wine is one interface to install Windows application on Linux platform. There are many people who has doubt about running windows application (exp: Microsoft Office, .Net Framework or VLC/Teamviwer ) kind application, for that Wine is best way to install, Here We are covering how to configure / install wine 1.7 on CentOS 6.5 and how to run exe on it.


Requirement: (Need some services to be run)
1. Wine Binary Files (To Download Click Here )
2. Yum Server (Need to install some dependency by Yum , To know how to configure Yum Click Here )

Configuration:

Install Dependency before starting wine configuration

[root@proxy2 ~]#yum groupinstall 'Development Tools'

[root@proxy2 ~]#yum install libX11-devel freetype-devel zlib-devel libxcb-devel

Once all dependency installation get over move with wine configuration.

[root@proxy2 ~]#cd /usr/src (Download file from net in this location or its your choice where you feel to keep downloaded file)

[root@proxy2 src]wget  http://prdownloads.sourceforge.net/wine/wine-1.7.31.tar.bz2 (Download file by using wget command)

[root@proxy2 src]tar xjf wine-1.7.31.tar.bz2 (Unzip the directory by using tar command)

[root@proxy2 src]cd wine-1.7.31/ (change the directory  wine directory)

[root@proxy2 wine-1.7.31]./configure (Run the configure script file, this will take more than 20-30 min)

[root@proxy2 wine-1.7.31]make (Run the make command, this will take more than 45 min)

[root@proxy2 wine-1.7.31]make install (Run the make & install command, this will take more than 45 min)

How to use wine for exe:
 Take any exe file copy in to your linux machine -- > Right click --> Load this file with wine program --> click Next (same as per your requirement to install)

Note: Once Wine configuration over, when you load 1st time any exe with wine its takes more time to load, while running 1st time any exe it will do basic configuration itself, so in this 1st time it will configure mono & gecko installer. For mono configuration it will take long time to download and configure sometime it wont configure correctly in that case you manually have to download and configure, Mono is required for to use .Net applications.


Thanks & Regards,
Sandeep CC


Thursday, March 13, 2014

Configure Roundcube webmail on CentOS 6.5 / Redhat Linux

Configure Roundcube webmail on CentOS 6.5 / Redhat Linux


Introduction:  Roundcube is interface for webmail sever, which offers more features & user-friendly like  send-receive mails, calenders, marking, folder, adressbook and much more,  roundcube can be installed/configure on any OS platform (windows, linux, mac etc...). This required some basic configurations which we are going to discuss...I feel roundcube is better than squirrelmail to use/access mails (Its depend on people's choice )...for squirrelmail configuration Click Here

Requirement: (Need some service's to be run, installation steps given below links)
1. Roundcube binary files
2. Webserver (httpd) (Click Here)
3. Mysql (mysqld) (Click Here)
4. Php  (httpd) (Click Here)
5. Dovecot & Sendmail (Click Here)
6. DNS (Click Here)

Downloads:
Roundcube binary files: (Download) or (Download)

Basic Setup:
Setup host name and ip address (static), we must required to configure httpd, mysqld, dovecot, sendmail & named service's (for configuration of this service's, provided links above). modify below files(before modifying any files take a backup copy for your safer side),

1. Host name : /etc/sysconfig/network
[root@mailsvr ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=mailsvr.com
[root@mailsvr ~]#

2. IP : /etc/sysconfig/network-scripts/ifcfg-eth0 (You can add eth1 as public static IP for access from internet)
[root@mailsvr ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
HWADDR=MACID
#IPV6INIT="yes"
#NM_CONTROLLED="yes"
ONBOOT=yes
TYPE=Ethernet
IPADDR=192.168.5.1
NETMASK=255.255.255.0
GATEWAY=192.168.5.1
DNS1=192.168.5.1
IPV6INIT=no
USERCTL=no
[root@mailsvr ~]#

3. cat /etc/resolv.conf
[root@mailsvr ~]# cat /etc/resolv.conf
# Generated by NetworkManager
search com
nameserver 192.168.5.1
nameserver static public dns provided by ISP

4. cat /etc/hosts
[root@mailsvr ~]# cat /etc/hosts (do not remove localhost ip name)
127.0.0.1       localhost.localdomain   localhost.localdomain   localhost4      localhost4.localdomain4 localhost
::1     localhost.localdomain   localhost.localdomain   localhost6      localhost6.localdomain6 localhost
192.168.5.1      mailsvr.com         mail
[root@mailsvr ~]#

5. create users by using useradd passwd commands

6. Make necessary changes in dovecot files cd /etc/dovecot/ & cd /etc/dovecot/conf.d/ directory files (Dovecot config files are different in rhel/centos 5/6 and rhel/centos 6/6.5 versions...

7. Firewall/iptables disable, SElinux disable, to work on iptables open port no - 80, 443, 143, 25

Create Database:
[root@mailsvr ~]# mysql -u root -p
Enter password:

mysql> CREATE DATABASE roundcubemail;
Query OK, 1 row affected (0.01 sec)

mysql> GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcubemail@localhost IDENTIFIED BY 'roundcubemail123';
Query OK, 0 rows affected (0.00 sec)

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

mysql> exit
Bye

Installation of Roundcube:

Extract downloaded roundcube directory
[root@mailsvr Downloads]# tar -xvf roundcubemail-0.9.5.tar.gz

Move Extracted directory to /var/www/html
[root@mailsvr Downloads]# mv roundcubemail-0.9.5 /var/www/html

Change Directory Name (Keep name as we can access easily in web browser Exp: http://localhost/mails)

[root@mailsvr Downloads]# cd /var/www/html/
[root@mailsvr html]# mv roundcubemail-0.9.5 mails

Set Permission for /tmp & /logs directory (Better to change all directory and sub directory ownership by root:apache , its optional , actually not required to change , its just for troubleshooting issue if it is not working)

[root@mailsvr mails]# chown -R apache:apache temp/
[root@mailsvr mails]# chown -R apache:apache logs/

[root@mailsvr mails]# ls -ltr |egrep "logs|temp"
drwxr-xr-x  2 apache  apache  4096 Feb 26 12:58 temp
drwxr-xr-x  2 apache  apache  4096 Feb 26 12:58 logs
[root@mailsvr mails]#

Now open browser in server, give  http://localhost/mails/installer or http://192.168.5.1/mails/installer , There you will find 3 setup pages on top, you must need to complete 1st page then only you can go with 2nd page then 3rd last page. Keep in mind you must need to give created mysql db and pass correctly, Give all correct information, after 1st page compilation you have to download 2 files(2 files screen shot has given below) and keep that files in /var/www/html/mails/config/ path then continue on 3rd page (if you wont copy this file in particular path then you may get error for 3rd page). given below screen shot of 3 pages by modifying/adjusting...

Page-1
Installer Page - 1





Page -2

Installer Page - 2


Page -3
Installer Page - 3

Note: At the end of this configuration you must need to remove/move installer directory from /.../mails/ and move to somewhere. /.../mails/config/main.inc.php files as given below...

[root@mailsvr mails]# mv installer/ /home/
[root@mailsvr mails]# cd config/
[root@mailsvr config]# vi main.inc.php
$rcmail_config['enable_installer'] = false; -----------------> by default its true make it false.

after removing and disabling this installer option check it again in browser by giving same url http://192.168.5.1/mails/installer it should not work, final intention is our webmail server should not hack or access/modify by someone else who is not authorize person to touch this server, it should give error link below image.

After removing /installer/ directory
After disable installer option,
before removing /installer/ directory














Now your roundcube has configured completely, now you can access this webmail server by giving ip/name in browser http://192.168.5.1/mails , user name - password created in server


Mail Server in browser
User logged in
Thanks and Regards,
Sandeep CC

Thursday, February 20, 2014

Configure OwnCloud Server on CenteOS 6.5 / RHEL-5.3

Configure OwnCloud Server on CenteOS 6.5 / Redhat-5.3

owncloud is free open sorce software you can install in windows linux machine's, Make own shareing server, we can access any our file from anywhere in the world, software's are available for windows/unix/mac server and client, we can synchronize our file's from desktop mobile to server and download from server in any device's (Internet connection required for synchronize) , we can share our personal files,folders,calender,contacts(addressbook) etc... We have done owncloud setup in CentOS 6.5 server and using in windows/linux desktop & android mobiles...Lets see how to configure owncloud...


Requirement: owncloud binary file's,  Linux OS (We used CentOS 6.5), Apache(httpd), Mysql, Php (php-mysql php-json php-xml php-mbstring php-zip php-gd curl php-curl php-pdo) (LAMP), Client exe (optional), root user to configure all steps...

Downloads: Need to download owncloud binary file's, php almost all packages available in OS DVD till we need to downlaod some packages, given link downside...

owncloud download
php-mbstring (download for centos 6.5) - download
client exe (for windows/linux/mac desktop's) - download
android app - download

Basic Setup: Change system name as you need, give static IP (You can give dual IP, 1) Local IP for accessing internal 2) Direct public IP for access external), add DNS in /etc/resolv.conf file (for access this server from outside network)...

Disable SElinux & Firewall (iptables) for temp, you need to work this by firewall then enable port no 80 & 443 in iptables file...


LAMP Configuration:

Apache (httpd) Setup StepsClickHere
Mysql Setup Steps - ClickHere
Php Setup Steps - ClickHere

Create Database: Create one database name on ownclouddb with user-ownclouduser password-myownpassword...

[root@owncloudsvr ~]# mysql -u root -p
Enter password:
mysql> CREATE DATABASE ownclouddb;
Query OK, 1 row affected (0.03 sec)
mysql>

mysql> GRANT ALL ON ownclouddb.* TO ownclouduser@localhost IDENTIFIED BY 'myownpassword';
Query OK, 0 rows affected (0.00 sec)
mysql>

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

mysql> exit
Bye
[root@owncloudsvr ~]#

Owncloud Setup: After downloading owncloud binary file from given link move that whole folder to /var/www/html/ directory...

[root@owncloudsvr ~]# cd Downloads/
[root@owncloudsvr Downloads]# mv owncloud/ /var/www/html/
[root@owncloudsvr Downloads]#

[root@owncloudsvr Downloads]# cd /var/www/html/
[root@owncloudsvr html]# ls -ltr
total 4
drwxr-xr-x. 12 nobody 65534 4096 Dec 15 01:18 owncloud

(change ownership for owncloud directory user and group as apache)
[root@owncloudsvr html]# chown -R apache:apache owncloud/
[root@owncloudsvr html]#

[root@owncloudsvr html]# cd owncloud/
[root@owncloudsvr owncloud]#

(give full permission for config directory under owcloud directory)
[root@owncloudsvr owncloud]# chmod 777 config/
[root@owncloudsvr owncloud]#

(modify httpd.conf file under /etc/httpd/conf/ directory - before making changes take present file as backup for your safety purpose)
[root@owncloudsvr config]# cd /etc/httpd/conf
[root@owncloudsvr conf]# cp httpd.conf httpd.conf.org
[root@owncloudsvr conf]#
[root@owncloudsvr conf]# vi httpd.conf

    Options FollowSymLinks
    AllowOverride All -------------------------------------------------> None to All

[root@owncloudsvr conf]#

Start Service's:  Start mysqld and httpd service...
[root@owncloudsvr conf]# service mysqld restart
Stopping mysqld:                                           [  OK  ]
Starting mysqld:                                           [  OK  ]
[root@owncloudsvr conf]# service httpd restart
Stopping httpd:                                            [OK]
Starting httpd: httpd: apr_sockaddr_info_get() failed for owncloudsvr
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
                                                           [  OK  ]
[root@owncloudsvr conf]#

Now your owncloud server is ready, Try to open website by using url: http://ip/owncloud OR http://servername/owncloud anywhere in mobile or client desktop etc... 1st time it will ask for finishup stage

1st time log on root user with server password, then inside root user you can create multiple user's with password, you can give diskspace for particular user for particular GB...You can install client exe on your linux/windows/mac desktop (download client exe from given above link) & you can synchronize your client desktop with your owncloud server (upload download files, calender, addressbook etc... )...


Thanks and Regards,
Sandeep CC