Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu
Showing posts with label Linux-Others. Show all posts
Showing posts with label Linux-Others. Show all posts

Sunday 28 February 2016

How To Configure Wordpress on CentOS/RHEL 6x

How To Configure Wordpress on CentOS/RHEL 6x


Q. What Is WordPress?

Ans: WordPress is an open source and free blogging application and a dynamic CMS (Content Management System) developed using MySQL and PHP.

Step: 1. Install Apache Server :

# yum -y install httpd httpd-devel

Step: 2. Install & Configure Mysql Server :

# yum -y install mysql mysql-server

# service mysqld restart
# chkconfig mysqld on

# mysql_secure_installation (To Set Root Password for Mysql)

Step: 3. Create "wordpress" Database :

# mysql -u root -predhat

mysql> create database wordpress character set utf8 collate utf8_bin;
mysql> grant all privileges on wordpress.* to wordpress@'localhost' identified by 'password';
mysql> flush privileges;
mysql> exit

Step: 4. Install PHP :

# yum -y install php php-mysql php-common php-gd php-mbstring php-mcrypt \
  php-devel php-xml php-imap php-ldap php-mbstring php-odbc php-pear \
  php-xmlrpc php-soap php-cli php-intl mod_ssl

Step: 5. Downloading WordPress Package :

# cd /var/www/html
# wget http://wordpress.org/latest.tar.gz
# tar -xvzf latest.tar.gz

Step: 6. Configure Wordpress :

# cd wordpress
# cp wp-config-sample.php wp-config.php
# vi wp-config.php

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here');

-- Give DB_NAME (wordpress)

/** MySQL database username */
define('DB_USER', 'username_here');

-- Give DB_USER (wordpress)

/** MySQL database password */
define('DB_PASSWORD', 'password_here');

-- Give DB_PASSWORD (password)

/** MySQL hostname */
define('DB_HOST', 'localhost');

/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');

/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');

-- Save & Quit (:wq)

Step: 7. Creating Apache VirtualHost for WordPress :

# vi /etc/httpd/conf/httpd.conf

<Directory /var/www/html/wordpress>
    Options +Indexes +Multiviews
        DirectoryIndex index.php index.html
    AllowOverride All
    Allow from all
</Directory>

-- Save & Quit (:wq)

# vi /etc/httpd/conf.d/wordpress.conf

Add The Following Lines :

Alias /wordpress /var/www/html/wordpress

<Directory /var/www/html/wordpress>
  AllowOverride Options
  <IfModule mod_authz_core.c>
    # Apache 2.4
    Require local
  </IfModule>
  <IfModule !mod_authz_core.c>
    # Apache 2.2
    Order Deny,Allow
    Deny from All
    Allow from all
    Allow from ::1
 </IfModule>
</Directory>

<Directory /var/www/html/wordpress/wp-content/plugins/akismet>
  <FilesMatch "\.(php|txt)$">
    Order Deny,Allow
    Deny from all
  </FilesMatch>
</Directory>

-- Save & Quit (:wq)


Step: 8. Restart the Apache Service :

# service httpd restart
# chkconfig httpd on

Step: 9. Finishing WordPress Installation :

http://192.168.72.139/wordpress

Give your Site Title, Create Admin User, Create Admin Password, Enter Your E-Mail and then click on Install button.

Click on Login -> Enter your WordPress Login details.

User: admin
Password: Passw0rd

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

Sunday 7 February 2016

How to Install CentOS Web Panel In RHEL/CentOS 6x


 CentOS Web Panel


-- About CentOS Web Panel :

CentOS Web panel(CMP), specially designed for RPM based distributions like CentOS, RHEL etc. CWP is a free, Open Source control panel that can be widely used for deploying a Web hosting environment easily.

Note: CWP automatically installs full LAMP on your server.

Features Included:

A. Apache, Tomcat 8 Server Management & Install in one click.
B. PHP
C. User Management
D. DNS
E. Email
F. System Management
G. Monitoring Server
H. Security
I. MySQL, PostgreSQL Database Management

Step: 1. Set Hostname :

# vi /etc/sysconfig/network

HOSTNAME=ser2.kmi.com

-- Save & Quit (:wq)

# hostname ser2.kmi.com

Step: 2. Bind the Hosts File :

   
# vi /etc/hosts
   
192.168.100.220 ser1.kmi.com   ser1
       
-- Save & Quit (:wq)
               
Step: 3. Stop firewall & Disable the Selinux :
   
# service iptables stop
# chkconfig iptables off

# vi /etc/sysconfig/selinux
   
SELINUX=disabled
   
-- Save & Quit (:wq)

Step: 4. Restart the Server :

# init 6

Step: 5. Update the System :

# yum -y update
               
Step: 6. Time Synchronization NTP :

# yum -y install ntp
# chkconfig ntpd on
# ntpdate pool.ntp.org
# service ntpd start

Step: 7. Install MySQL Database Server :

# yum -y remove mysql mysql-server

# rpm -Uvh http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

# yum -y install mysql-server

Step: 8. Set MySQL Root Password :

# service mysqld restart
# chkconfig mysqld on
# mysql_secure_installation

Step: 9. Install CWP :

# cd /usr/local/src
# wget http://centos-webpanel.com/cwp-latest
or
# wget http://dl1.centos-webpanel.com/files/cwp-latest

# sh cwp-latest

MySQL root password []:redhat

#############################
#      CWP Installed                         #
#############################

go to CentOS WebPanel Admin GUI at http://SERVER_IP:2030/

http://192.168.100.221:2030
SSL: https://192.168.100.221:2031
---------------------
Username: root
Password: ssh server root password
MySQL root Password: redhat

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

Friday 5 February 2016

How to Install Oracle Java on RHEL/Centos 6x

Install Oracle Java


About JAVA :

-- Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable.

Step: 1. Installing the Java :

# yum -y install wget
# cd /opt
# wget --no-check-certificate --no-cookies --header 'Cookie: oraclelicense=accept-securebackup-cookie' http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.rpm
   
# yum -y install jdk-8u5-linux-x64.rpm

Step: 2. Setup JAVA_HOME Variable :

# export JAVA_HOME=/usr/java/jdk1.8.0_05
# export PATH=$PATH:$JAVA_HOME
# echo $JAVA_HOME

Step: 3. Edit the Java Profile :

# vi /etc/profile.d/java.sh

#!/bin/bash
JAVA_HOME=/usr/java/jdk1.8.0_05
PATH=$JAVA_HOME/bin:$PATH
export PATH JAVA_HOME
export CLASSPATH=.

-- Save & Quit (:wq)

# chmod +x /etc/profile.d/java.sh
# source /etc/profile.d/java.sh

Step: 4. Check Version of JAVA :

# java -version
   
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) Client VM (build 25.5-b02, mixed mode)

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

 

Thursday 28 January 2016

How to Install DNS Server in CentOS/RHEL 6x

DNS Server Configuration

Note: Before Start
Set ip-address manually (I use 192.168.72.140)
Set hostname FQDN (I use server1.domain.com)

Step: 1. To set IP-Address :

# system-config-network-tui

Uncheck DHCP & Give the IP Address manually.

OK -> Quit

Step: 2. Installation of DNS Server :

# yum -y install bind* caching-nameserver

Step: 3. Make sure that the Host Names are set Properly :

# vi /etc/hosts

127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.72.140 server1.domain.com server1 (IP Address & FQDN)

-- Save & Quit (:wq)

# vi /etc/sysconfig/network

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=server1.domain.com

-- Save & Quit (:wq)

Step: 4. Set Hostname :

# hostname server1.domain.com

Step: 5. DNS resolve Entry :

# vi /etc/resolv.conf

search domain.com
nameserver 192.168.10.1

-- Save & Quit (:wq)

Step: 6. Configure DNS Server :

# vi /etc/named.conf

Edit those Lines :

options {
        listen-on port 53 { 192.168.72.140; };
#       listen-on-v6 port 53 { ::1; };
allow-query { any; };

Add Those Lines :

zone"domain.com" IN {
type master;
file "forward.zone";
allow-update { none; };
};

zone"72.168.192.in-addr.arpa" IN {
type master;
file "reverse.zone";
allow-update { none; };
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

-- Save & Quit (:wq) 

Note: Create forward and reverse zone files which we mentioned in the ‘/etc/named.conf’ file.

Step: 7. Create Forward Zone :

# vi /var/named/forward.zone

$TTL 86400
@   IN  SOA     server1.domain.com. root.server1.domain.com. (
        2011071001  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
           IN   NS          server1.domain.com.
server1    IN   A           192.168.72.140

-- Save & Quit (:wq) 

Step: 8. Create Reverse Zone :

# vi /var/named/reverse.zone

$TTL 86400
@   IN  SOA     server1.domain.com. root.server1.domain.com. (
        2011071001  ;Serial
        3600        ;Refresh
        1800        ;Retry
        604800      ;Expire
        86400       ;Minimum TTL
)
          IN  NS           server1.domain.com.
140       IN  PTR          server1.domain.com.

-- Save & Quit (:wq) 

Step: 9. Now Change Group of forward.zone & reverse.zone :

# cd /var/named/
# chgrp named forward.zone
# chgrp named reverse.zone

Step: 10. Restart the named Service :

Note: FIXING THE BIND (NAMED) SERVICE BUG – GENERATING /ETC/RNDC.KEY

# rndc-confgen -a -r /dev/urandom

# service named restart
# chkconfig named on

Step: 11. The DNS Server is ready now, 9. it’s time to Test :

# dig server1.domain.com
# dig -x 192.168.72.140
# nslookup
> sever1.domain.com
> 192.168.72.140

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

 

Tuesday 26 January 2016

How to Install & Configure OsTicket on Centos/RHEL 6x

Install OsTicket


Q. What is OSTicket ?

-- OSTicket is a widely-used and trusted open source support Ticket System. It seamlessly routes
   inquiries created via email, web-forms and phone calls into a simple, easy-to-use, multi-user,
   web-based customer support platform.

Requirements:
===========

1. Install httpd.
2. Install mysql.
3. Install php.
4. Install OsTicket.

Step: 1. Install Apache Server :

# yum -y install httpd httpd-devel

Step: 2. Restart Apache Server :

# service httpd restart
# chkconfig httpd on

Step: 3. Install & Configure MySQL :

# yum -y install mysql mysql-server mysql-devel

Step: 4. Start Mysqld Service :

# service mysqld restart
# chkconfig mysqld on

Step: 5. Changing MySQL Root Password :

# mysql_secure_installation

Step: 6. Create Database for OsTicket  :

# mysql -u root -p
Enter password:

mysql> create database osticket;
mysql> grant all privileges on osticket.* to osticket@'localhost' identified by 'password';
mysql> flush privileges;
mysql> exit

Step: 7. Install PHP 5.3 :

# yum -y install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel \
  php-xml php-imap php-ldap php-mbstring php-odbc php-pear php-xmlrpc php-soap mod_ssl

Step: 8. Restart Apache Service :

# service httpd restart

Step: 9. Install & Configure OsTicket :

# yum -y install unzip
# cd /var/www/html
# wget http://osticket.com/sites/default/files/download/osTicket-v1.9.2.zip
# unzip osTicket-v1.9.2.zip
# ls -ltr
# mv upload support

Step: 10. Rename & Change Permission of 'ost-config.sample.php' :

# cd /var/www/html/support/include
# mv ost-config.sample.php ost-config.php
# chmod 777 ost-config.php

Step: 11. Enable Short_Open_Tag from /etc/php.ini :

# vi /etc/php.ini

-- Find This Line 'short_open_tag'

short_open_tag = On

-- Save & Quit (:wq)

Step: 12. Restart Apache Server :

# service httpd restart

Step: 13. Open Browser & Type :


http://ip address/support/setup/

-- System Settings :
   Helpdesk Name: Support Portal
   Default Email: kchatter@domain.com
   Default Language: English

-- Admin User :
   First Name: Kousik
   Last Name : Chatterjee
   Email Add : kchatterjee@domain.com
   Username  : administrator
   Password  : Passw0rd
   Retype Pass : Passw0rd

-- Database Settings :
   MySQL Hostname : localhost
   MySQL Database : osticket
   MySQL Username : osticket
   MySQL password : password

-- Click On 'Install Now'

Step: 14. After installed OsTicket Delete the /osticket/setup Directory :

# cd /var/www/html/support
# rm -rf setup

Step: 15. Change ost-config.php file Permission :

# chmod 644 /var/www/html/support/include/ost-config.php

Step: 16. Configure Apache Server :

# vi /etc/httpd/conf/httpd.conf

<Directory /var/www/html/support/scp>
    Options +Indexes +Multiviews
        DirectoryIndex index.php
    AllowOverride All
    Allow from all

</Directory>

Uncommented :

NameVirtualHost *:80

-- Save & Quit (:wq)

Step: 17. Create a file under /etc/httpd/Conf.d Folder :

# vi /etc/httpd/conf.d/domain.com.conf

<VirtualHost *:80>

  # Admin email, Server Name (domain name) and any aliases
  ServerAdmin techsupport@domain.com
  ServerName www.domain.com
  ServerAlias domain.com
 
  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.php
  DocumentRoot /var/www/html/support/scp

  # Custom log file locations
  LogLevel warn
  ErrorLog  /logs/domain.com-error_log
  CustomLog /logs/domain.com-access_log combined

</VirtualHost>

-- Save & Quit (:wq)

Step: 18. Restart Apache Server :

# mkdir /logs
# service httpd restart

Step: 19. Open Browser & Type :

http://domain.com/support
User: administrator
Pass: Passw0rd

Below, You'll Find some useful links regarding your Installation.

Your osTicket URL:
http://sever_ip_address/support/   

Your Staff Control Panel:
http://sever_ip_address/support/scp

osTicket Forums:
http://osticket.com/forum/   

osTicket Community Wiki:
http://osticket.com/wiki/

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

 

How to Install & Configure Redmine 2.6.1 on RHEL/Centos 6x

Install and Configure Redmine

Q. What is Redmine ?

Ans: Redmine is a flexible project management web application. Written using the Ruby on Rails framework, it is cross-platform and cross-database.

Features :

1. Multiple projects support
2. Flexible role based access control
3. Flexible issue tracking system etc.

Step: 1. Stop Iptables :

# service iptables stop
# chkconfig iptables off

Step: 2. Disable Selinux :

# vi /etc/sysconfig/selinux

SELINUX=disabled

-- Save & Quit (:wq)

Step: 3. Restart the Server :

# init 6

Step: 4. Install Prerequisites :

# yum install -y ruby-devel gcc-c++ openssl-devel httpd httpd-devel make ruby-rdoc libcurl-devel rubygem-rake zlib-devel curl-devel apr-devel apr-util-devel wget

Step: 5. Install Ruby :

# cd /tmp
# wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz
# tar -zxvf ruby-2.1.2.tar.gz
# cd ruby-2.1.2
# ./configure
# make install
# cd ..
# rm -rf ruby-2.1.2.tar.gz ruby-2.1.2

Step: 6. To Check Ruby Version :

# ruby -v

Step: 7. Install Rubygems :

# cd /tmp
# wget http://production.cf.rubygems.org/rubygems/rubygems-2.2.2.tgz
# tar zxvf rubygems-2.2.2.tgz
# cd rubygems-2.2.2
# ruby setup.rb
# cd ..
# rm -rf rubygems-2.2.2.tgz rubygems-2.2.2

Step: 8. To Check Gems Version :

# gem -v

Step: 9. Install Passenger :

# gem install passenger
# passenger-install-apache2-module

Press Enter and press " ! " and make sure you select only the ruby one.

**LOOK CAREFULLY after successfully installing it give codes .we must edit in our apache. FOR ME .It may be other for you. ========================================================================
LoadModule passenger_module /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.50/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
PassengerRoot /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.50
PassengerDefaultRuby /usr/local/bin/ruby
</IfModule>
=========================================================================

Step: 10. To Load the Passenger Module into Apache :

# vi /etc/httpd/conf/httpd.conf

Go, to the load module section and paste it.
Add the below line. In the module section. Line num 202.

LoadModule passenger_module /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.50/buildout/apache2/mod_passenger.so

Add the following line on line number 377.

<IfModule mod_passenger.c>
PassengerRoot /usr/local/lib/ruby/gems/2.1.0/gems/passenger-4.0.50
PassengerDefaultRuby /usr/local/bin/ruby
</IfModule>

-- Save & Quit (:wq)

Step: 11. Now, you can download the latest version of Redmine :

# cd /var/www/html
# wget wget http://www.redmine.org/releases/redmine-2.6.1.zip
# unzip redmine-2.6.1.zip
# mv redmine-2.6.1 redmine
# rm -rf redmine-2.6.1.zip
# chown -R apache.apache /var/www/html/redmine
# chmod -R 755 /var/www/html/redmine
# touch /var/www/html/redmine/log/production.log
# chown root.apache /var/www/html/redmine/log/production.log
# chmod 664 /var/www/html/redmine/log/production.log

Step: 12. Start the Apache Server :

# service httpd restart
# chkconfig httpd on

Step: 13. Install Mysql Server :

# yum -y install mysql mysql-server mysql-devel

Step: 14. Start Mysql Service :

# service mysqld restart
# chkconfig mysqld on

Step: 15. Set MySQL Root Password :

# mysql_secure_installation

Step: 16. Create Database for Redmine :

# mysql -u root -p
Enter Password:

mysql> create database redminedb character set utf8;
mysql> grant all privileges on redminedb.* to redmine@'localhost' identified by 'password';
mysql> flush privileges;
mysql> exit

Step: 17. Now, Install the Gem file and the bundler :

# gem install rake rack i18n rubytree RedCloth mysql coderay rails jquery-rails fastercsv builder mime-types awesome_nested_set activerecord-jdbc-adapter selenium-webdriver shoulda mysql2

# cd /var/www/html/redmine
# gem install bundler
# bundle install --without development test rmagick

Note: If you see any of the gem is not installing then go to.

# cd /var/www/html/redmine
# vi Gemfile

Commented the following line, Line no. 29

# gem "rmagick", ">= 2.0.0"

-- Save & Quit (:wq)

Step: 18. Setup the Database Connection for Redmine :

# cd /var/www/html/redmine/config
# mv database.yml.example database.yml
# vi database.yml

In the production section, update username, password and other parameters accordingly like so :

production:

adapter: mysql2
database: redmine
host: localhost
username: redmine
password: redhat
encoding: utf8

-- Save & Quit (:wq)

Step: 19. Create the Virtual host files for running Redmine :

# vi /etc/httpd/conf.d/redmine.conf

<VirtualHost *:80>
ServerName redmine

DocumentRoot /var/www/html
Alias /redmine /var/www/html/redmine/public

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/html/redmine>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory /var/www/html/redmine/public>
PassengerEnabled on
SetHandler none
PassengerAppRoot /var/www/html/redmine
RailsBaseURI /redmine
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>

-- Save & Quit (:wq)

Step: 20. Restart Apache Server :

# service httpd restart

Step: 21. Set Environment to "production" Environment :

# cd /var/www/html/redmine/config
# vi environment.rb

If there is line uncomment it if not just proceed ahead.

ENV['RAILS_ENV'] ||= 'production'

Step: 22. In Terminal, use Following Command :

# gem install mysql2
# RAILS_ENV=production bundle exec rake generate_secret_token
# RAILS_ENV=production bundle exec rake db:migrate
# RAILS_ENV=production bundle exec rake redmine:load_default_data

Type en when asked.

Step: 23. Rename dispatch CGI files in /redmine/public/ :

# cd /var/www/html/redmine/public
# mv dispatch.fcgi.example dispatch.fcgi
# cp htaccess.fcgi.example .htaccess

Step: 24. Fix Rights for the Apache user :

# cd /var/www/html
# chown -R apache:apache redmine

Step: 25. Also, for Configuration of Email :

# cd /var/www/html/redmine/config
# cp configuration.yml.example configuration.yml
# vi configuration.yml

Just close.
You can configured the email as per your need.

Step: 26. Restart the Apache Server :

# service httpd restart

Step: 27. Point Your Web Browser & Type :

http://ip_address_server/redmine
or
http://domain_name/redmine
User: admin
Pass: admin

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog


Sunday 24 January 2016

How to Install Skype on RHEL/CentOS 6x

Install Skype on Linux

Step: 1. Download Skype 4.2 :

# cd /mnt
# wget http://download.skype.com/linux/skype_static-4.0.0.8.tar.bz2

Step: 2. Install Needed Dependencies :

# yum install alsa-lib.i686 fontconfig.i686 freetype.i686 glib2.i686 libSM.i686 libXScrnSaver.i686 libXi.i686 libXrandr.i686 libXrender.i686 libXv.i686 libstdc++.i686 pulseaudio-libs.i686 qt.i686 qt-x11.i686 zlib.i686

Step: 3. Extract Skype :

# mkdir /opt/skype
# tar xvf skype_static* -C /opt/skype --strip-components=1

Step: 4. Create libtiff.so.4 link on CentOS / Red Hat :

# cd /usr/lib
# ln -s libtiff.so.3 /usr/lib/libtiff.so.4

Step: 5. Create Launcher, Link icons, lang and sounds :

# ln -s /opt/skype/skype.desktop /usr/share/applications/skype.desktop
# ln -s /opt/skype/icons/SkypeBlue_48x48.png /usr/share/icons/skype.png
# ln -s /opt/skype/icons/SkypeBlue_48x48.png /usr/share/pixmaps/skype.png

# touch /usr/bin/skype
# chmod 755 /usr/bin/skype
# vi /usr/bin/skype

#!/bin/sh
export SKYPE_HOME="/opt/skype"

$SKYPE_HOME/skype --resources=$SKYPE_HOME $*

-- Save & Quit (:wq)

Step: 6. Start Skype :

Open Terminal & Type: skype

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

 
Copyright © 2016 Kousik Chatterjee's Blog