Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Sunday 26 March 2017

Install & Configure Lighttpd with SSL on CentOS/RHEL 6x

Install & Configure Lighttpd with SSL on CentOS/RHEL 6x


Q. What is Lighttpd ?

-- Lighttpd is a Web Server for UNIX/Linux and Windows operating systems. It is an alternative to Apache Web Server. It is also called Lighty. It is designed to be Secure, fast, standards-compliant, and flexible while being optimized for speed-critical environments.

Step: 1. Bind Host File :

# vi /etc/hosts

10.100.97.40    ser4.domain.com     ser4

-- Save & Quit (:wq)

Step: 2. Disable Selinux & Stop Iptables :

# vi /etc/sysconfig/selinux

SELINUX=disabled

-- Save & Quit (:wq)

# service iptables stop
# chkconfig iptables off

Step: 3. Rebbot the System :

# init 6

Step: 4. Install Lighttpd Server :

# yum -y install epel-release
# yum -y install lighttpd openssl

Step: 5. Disable IPv6 Support :

# vi /etc/lighttpd/lighttpd.conf

server.use-ipv6 = "disable"
server.max-fds = 2048

-- Save & Quit (:wq)

Step: 6. Start Lighttpd Server :

# service lighttpd restart
# chkconfig lighttpd on

Step: 7. Create Certificate Signing Request (CSR) :

# mkdir /etc/lighttpd/ssl/
# cd /etc/lighttpd/ssl/

# openssl req -new -newkey rsa:2048 -nodes -keyout ser4.domain.com.key -out ser4.domain.com.csr

Country Name (2 letter code) [XX]: IN
State or Province Name (full name) []: WB
Locality Name (eg, city) [Default City]: Kolkata
Organization Name (eg, company) [Default Company Ltd]: Organization_Name
Organizational Unit Name (eg, section) []: IT
Common Name (eg, your name or your server's hostname) []: ser4.domain.com
Email Address []: admin@domain.com

A challenge password []: Just Press Enter.
An optional company name []: Just Press Enter.

Step: 8. Request Certificate from CA :

# openssl x509 -req -days 365 -in ser4.domain.com.csr -signkey ser4.domain.com.key -out ser4.domain.com.crt
# cat ser4.domain.com.key ser4.domain.com.crt > ser4.domain.com.pem

Step: 9. Lighttpd Virtual Hosting :

# mkdir -p /var/www/domain.com/http
# mkdir /var/log/lighttpd/domain.com
# chown lighttpd:lighttpd /var/www/domain.com/http
# chown lighttpd:lighttpd /var/log/lighttpd/domain.com

# vi /etc/lighttpd/lighttpd.conf

$SERVER["socket"] == ":443" {
        ssl.engine = "enable"
        ssl.pemfile = "/etc/lighttpd/ssl/ser4.domain.com.pem" 
}

$HTTP["host"] =~ "(^|\.)domain\.com$" {
server.name = "ser4.domain.com"
server.document-root = "/var/www/domain.com/http"
accesslog.filename = "/var/log/lighttpd/domain.com/access.log"
server.error-handler-404 = "/e404.php"
}

-- Save & Quit (:wq)

Step: 10. Verify Configuration & Restart Lighttpd :

# lighttpd -t -f /etc/lighttpd/lighttpd.conf
Syntax OK

# service lighttpd restart

# netstat -tulpn | grep lighttpd
tcp        0      0 0.0.0.0:80                    0.0.0.0:*                   LISTEN      3426/lighttpd      
tcp        0      0 0.0.0.0:443                 0.0.0.0:*                   LISTEN      3426/lighttpd



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

 

Saturday 18 March 2017

How To Configure Magento2 with Nginx on Ubuntu 14.04

How To Configure Magento2 with Nginx on Ubuntu 14.04


Q. What is Magento :

-- Magento is an e-commerce platform built on open source technology which provides online merchants with a flexible shopping cart system, as well as control over the look, content and functionality of their online store. Magento offers powerful marketing, search engine optimization, and catalog-management tools.

Step: 1. Set Host Name :

# hostname magento.domain.com
# vi /etc/hostname

magento.domain.com

-- Save & Quit (:wq)

Step: 2. Bind Hosts File :

# vi /etc/hosts

10.100.97.37    magento.domain.com        magento

-- Save & Quit (:wq)

Step: 3. Update the System :

# apt-get update
# apt-get -y upgrade

Step: 4. Install NTP Server For Time Synchronization :

# apt-get -y install ntp ntpdate
# service ntp restart
# ntpdate pool.ntp.org
# date

Step: 5. Install Nginx Server :

# apt-get -y install nginx

-- Verify that Nginx has been Installed Properly by Checking the Port :

# netstat -plntu | grep 80

Step: 6. Install PHP7 with PHP7-FPM :

# apt-get -y install language-pack-en-base
# LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
# apt-get update

# apt-get -y install php7.0 php7.0-fpm php7.0-mcrypt php7.0-curl php7.0-cli php7.0-mysql \
    php7.0-gd php7.0-xsl php7.0-json php7.0-intl php7.0-dev php7.0-common php7.0-mbstring \
    php7.0-zip php-pear php-soap libcurl3 curl wget

Step: 7. Modify PHP Settings For Magento :

# vi /etc/php/7.0/fpm/php.ini

memory_limit = 512M
max_execution_time = 1800
zlib.output_compression = On

-- Save & Quit (:wq)

# vi /etc/php/7.0/cli/php.ini

memory_limit = 512M
max_execution_time = 1800
zlib.output_compression = On

-- Save & Quit (:wq)

Step: 8. Restart the PHP7-FPM Service to Apply the Configuration Changes :
 
# service php7.0-fpm restart

Step: 9. Install MySQL Server :

# apt-get -y install mysql-server-5.6 mysql-client-5.6

New password for the MariaDB "root" user: redhat
Repeat password for the MariaDB "root" user: redhat

Step: 10. Create Database & DB User for Magento :

# mysql -u root -p
Enter the Password:

mysql> create database magentodb;
mysql> grant all privileges on magentodb.* to magento@localhost identified by 'password';
mysql> flush privileges;
mysql> \q

Step: 11. Install PHP Composer :

# cd ~/
# curl -sS https://getcomposer.org/installer | php
# mv composer.phar /usr/bin/composer

-- Now Verify that Composer Command is Working :

# composer -v

Step: 12. Download & Extract Magento 2 :

# mkdir /var/www/
# cd /var/www/
# wget https://github.com/magento/magento2/archive/2.0.7.tar.gz
# tar -zxvf 2.0.7.tar.gz
# mv magento2-2.0.7 magento2

Step: 13. Configure the Magento Key :

At 1st Register A Magento Account. Click on Below Link :

http://repo.magento.com/

-- Create An Account.
-- After Created the Account & Click on "My Account"
-- Click on "Developers"
-- Click on "Secure Keys"
-- Give A Name & Click on "Generate New". (It will Generate Random Public & Private Keys).

Step: 14. Install Third-Party Components for Magento :

# cd /var/www/magento2/
# composer install -v

Authentication required (repo.magento.com):
Username: 65500dc62bc7a48f09c36056df12bf03 (Use Public Key For User Name)
Password: 528d7b92a879cb673f18940322312e10 (Use Private Key For User Password)
     
-- Do you want to store credentials for repo.magento.com in /root/.config/composer/auth.json ?
     [Yn] Type "Y" & Press "Enter"

Step: 15. Configure the Nginx Virtualhost :

# vi /etc/nginx/sites-available/magento

-- Paste the below Configuration :

upstream fastcgi_backend {
        server  unix:/run/php/php7.0-fpm.sock;
}

server {

        listen 80;
        server_name magento.domain.com;
        set $MAGE_ROOT /var/www/magento2;
        set $MAGE_MODE developer;
        include /var/www/magento2/nginx.conf.sample;
}

-- Save & Quit (:wq)

# ln -s /etc/nginx/sites-available/magento /etc/nginx/sites-enabled/
# service nginx restart

Step: 16. Install Magento Through Command Line :

# cd /var/www/magento2
# bin/magento setup:install --backend-frontname="adminlogin" \
--key="65500dc62bc7a48f09c36056df12bf03" \
--db-host="localhost" \
--db-name="magentodb" \
--db-user="magento" \
--db-password="password" \
--language="en_US" \
--currency="INR" \
--timezone="Asia/Kolkata" \
--use-rewrites=1 \
--use-secure=0 \
--base-url="http://magento.domain.com" \
--base-url-secure="https://magento.domain.com" \
--admin-user=admin \
--admin-password=Passw0rd \
--admin-email=admin@domain.com \
--admin-firstname=Koushik \
--admin-lastname=Chatterjee \
--cleanup-database

IMPORTANT Note:

backend-frontname: The admin page for our magento site, we use 'adminlogin'.
Key: Magento Keys, we can generate it, or find it random on http://randomkeygen.com/.
Base-url: Make sure it is same with Virtualhost Configuration.

Step: 17. Set Appropriate Permission for Magento :

# cd /var/www/magento2/
# chmod 700 /var/www/magento2/app/etc
# chown -Rf www-data:www-data .

Step: 18. Restart the Nginx Server :

# service nginx restart

Step: 19. Access the Site & Admin Panel :

http://magento.domain.com

-- For Admin Access :

http://magento.oit.com/adminlogin
User: admin
Pass: Passw0rd

Note: If You get an Error about a Missing Magento indexer Cronjob, then you can Solve it by adding the Following Cronjob to Your Server.

# crontab -u www-data -e

-- Add the Following Lines:

* * * * * /usr/bin/php /var/www/magento2/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/magento2/var/log/magento.cron.log
* * * * * /usr/bin/php /var/www/magento2/update/cron.php >> /var/www/magento2/var/log/update.cron.log
* * * * * /usr/bin/php /var/www/magento2/bin/magento setup:cron:run >> /var/www/magento2/var/log/setup.cron.log

-- Save & Quit (:wq)

# service cron restart

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


Sunday 5 March 2017

Install & Configure Chamilo (Learning Management System) on CentOS 6x

Install & Configure Chamilo (Learning Management System) on CentOS 6x


Q. What is Chamilo?

-- Chamilo is a  software which is used for virtual/online trainings or Learning Management System. Chamilo is absolutely free and comes under GPL License, with Chamilo you can store and organize all of study materials which can be utilized by tutors and students.

-- Some of the important features of Chamilo are:

1. Course and user management based on various user’s profiles like students, Teachers, Session
     Managers, Administrators.
2. You can Download, upload or hide some course contents as and when required.
3. Create, add , delete questions in the form of multiple choice, fill in the blank, matching type questions or
     open questions.
4. Various types of survey can be conducted with the help of Chamilo.
5. You can enable deadline based assignments.
6. Users can be generated in bulk.
7. CSV/Excel data can bde downloaded or uploaded and Instant results reports can be generated.

Step: 1. Bind Hosts File :

# vi /etc/hosts

192.168.72.220    ser1.domain.com    ser1

-- Save & Quit (:wq)

Step: 2. Disable Selinux & Firewall :


# vi /etc/sysconfig/selinux

SELINUX=disabled

-- Save & Quit (:wq)

# service iptables stop
# chkconfig iptables off

Step: 3. Install NTP :

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

Step: 4. Install Apache Server :

# yum -y install httpd httpd-devel

Step: 5. Install MySQL Database Server :

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

Step: 6. Install Epel Repo :

# rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Step: 7. Install PHP :

# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

# yum -y install php56w php56w-mysql php56w-common php56w-gd php56w-mbstring \
    php56w-mcrypt php56w-devel php56w-xml php56w-imap php56w-ldap php56w-pdo \
    php56w-odbc php56w-pear php56w-xmlrpc php56w-soap php56w-cli mod_ssl \
    libtool-ltdl mhash mcrypt unzip
 
Step: 8. Start Apache Service :

# service httpd restart
# chkconfig httpd on

Step: 9. Set MySQL Root Password :

# service mysqld restart
# chkconfig mysqld on

# mysql_secure_installation

Step: 10. Create Database and User for Chamilo :

# mysql -u root -predhat

mysql> create database chamilodb;
mysql> grant all privileges on chamilodb.* TO chamilo@localhost identified by 'password';
mysql> grant all privileges on chamilodb.* TO chamilo@'%' identified by 'password';
mysql> flush privileges;
mysql> exit

Step: 11. Install Some Prerequired Packages :

# yum -y install gcc-c++ libuuid-devel

Step: 12. Modify php.ini :


# vi /etc/php.ini

date.timezone = "Asia/Kolkata"
max_execution_time = 300
max_input_time = 600
memory_limit = 256M
post_max_size = 128M
upload_max_filesize = 128M
session.cookie_httponly = On
extension = xapian.so

-- Save & Quit (:wq)

Step: 13. Enable Internationalization Support in PHP :

# yum -y install libicu libicu-devel.x86_64
# /usr/bin/pecl install intl
# echo 'extension=intl.so' >> /etc/php.ini

Step: 13. Download latest Version of Chamilo :

# cd /var/www/html/
# wget https://github.com/chamilo/chamilo-lms/archive/v1.10.0.zip
# unzip v1.10.0.zip
# rm -rf v1.10.0.zip
# mv chamilo-lms-1.10.0 chamilo
# chmod -Rf 755 /var/www/html/chamilo
# chown -R apache:apache /var/www/html/chamilo

Step: 14. Restart the Apache Service :

# service httpd restart

Step: 15. Install Chamilo Through Web Browser :

http://192.168.72.220/chamilo

-- Click on "Install Chamilo".
-- Select Language & Click Next.
-- Scroll Down & Click "New Installation".
-- Check "I Accept" & Click Next.
-- MySQL database settings:
     Database Host: localhost
     Port: 3306
     Database Login: chamilo
     Database Password: password
     Main Chamilo database (DB): chamilodb
  
-- Click on "Check Database Connection".
-- Click Next.
-- Config settings:
     Administrator login: admin
     Administrator Password: Passw0rd
     Administrator first name: Koushik
     Administrator last name: Chatterjee
     Administrator email: kchatterjee@domain.com
  
-- Click Next.
-- Click "Install Chamilo".
-- Click "Go to Your Newly Created Portal".
     User: admin
     Pass: Passw0rd

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

 
Copyright © 2016 Kousik Chatterjee's Blog