How to install and configure Nginx on cPanel servers

nginx

 

Nginx is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server.

How to set up Nginx?

Follow the steps to install nginx as reverse proxy in a cPanel server:

1) SSH to server as root.
2) Change the directory to “/usr/local/src”

# cd /usr/local/src

Download & Install Nginx on cPanel servers

#wget http://nginxcp.com/latest/nginxadmin.tar
#tar xf nginxadmin.tar
#cd publicnginx
#./nginxinstaller install

In WHM, now Nginx Admin plugin will be available under plugins section. After installing make sure Nginx process is running on the server

1) You can chcek this by using the following command.

# ps aux | grep nginx

2) If it is not showing any process, then kill httpd and restart httpd

#killall -9 httpd
#/etc/init.d/httpd restart

3) Nginx Admin Uninstall instruction:

#cd /usr/local/src
#wget http://nginxcp.com/latest/nginxadmin.tar
#tar xf nginxadmin.tar
#cd publicnginx
#./nginxinstaller uninstall

Make sure that the Nginx is running on port 80 and Apache on different port (like 8080).

Also open the new port the server firewall.

.

.

That’s it!

Read More

How to Install Zamfoo

What is Zamfoo ?

zamfoo

Zamfoo is a plugin which provides additional features to a Reseller and makes his work a bit easy. Zamfoo plugin needs to be installed on the server and can be integrated with Reseller center. The OS recommended for Zamfoo is Cent OS, as its the most compatible OS for cPanel/WHM. Altough there are few limitations to use the this with WHM reseller.

 

Zamfoo_hostdens.com

 

To Install Zamfoo 

Run the following commands in SSH:

cd/

Use of this commands : This will take you to the root directory of your server.

 

wget http://www.zamfoo.com/downloads/zamfoo_installer.tar

Use of this commands : This command will download zafoo on your server.

 

tar -xvf zamfoo_installer.tar

Use of this commands : This command will extract contents on the server.

 

chmod 755 runme.cgi

Use of this commands : This command will modify the permissions to make it executable.

 

./runme.cgi

Use of this commands : This command will run the installer.

 

After firing all these commands,

You will have to enter the license key here:-

$license=”License key”

Once enter the License key
press CTRL + X

then Save it.

.

.

.

.

 Zamfoo will be installed on your Linux server.

Read More

Installing LAMP On Linux Mint

Installing LAMP (Linux, Apache, MySQL and PHP) On Linux Mint. 

LAMP stands for Linux, Apache, MySQL, PHP. How to install Linux the L of LAMP.

LAMP_hostdens_com

Install Apache

To start off we will install Apache.

1) Open up the Terminal

(Applications > Accessories > Terminal)

2) Copy/Paste the following line of code into Terminal and then press enter

sudo apt-get install apache2

3) Type you’re password, and then press enter.

The page should display the words

.

.

.

.

“It works!” 

 

Testing Apache

 

To make sure everything installed correctly we will now test Apache to ensure it is working properly.

1) Open up any web browser and then enter the following line.

http://localhost/

2) You should see a folder entitled apache2-default/.

3) Open it and you will see a message saying 

.
.
.
.
“It works!”, congrats to you!

 

Install PHP

PHP is an open source web scripting language that is widely use to build dynamic webpages.

To install PHP

1) Open up the Terminal

(Applications > Accessories > Terminal)

2) Type in this command

sudo apt-get install php5 libapache2-mod-php5

After you answer yes to the prompt twice, PHP will install itself.

3) It may also be useful to add php to the directory index, to serve the relevant php index files

sudo nano /etc/apache2/mods-enabled/dir.conf

 

Test PHP

To ensure there are no issues with PHP let’s give it a quick test run.

1) Open up the Terminal

(Applications > Accessories > Terminal)

2) Type in this command

sudo gedit /var/www/testphp.php

This will open up a file called phptest.php.

3) Copy/Paste this line into the phptest file:

<?php phpinfo(); ?>

4) Save and close the file.

5) Now open you’re web browser and type the following into the web address:

http://localhost/testphp.php

The page should look
.
.
.

Congrats you have now installed both Apache and PHP!

 

Install MySQL

To finish this guide up we will install MySQL. MySQL is a powerful database management system used for organizing and retrieving data

To install MySQL,

1) Open terminal and type in these commands

sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

During the installation, MySQL will ask you to set a root password. If you miss the chance to set the password while the program is installing, it is very easy to set the password later from within the MySQL shell.

2) Once you have installed MySQL, we should activate it with this command

sudo mysql_install_db

3) Finish up by running the MySQL set up script

sudo /usr/bin/mysql_secure_installation

4) The prompt will ask you for your current root password.

Type it in.

5) Enter current password for root (enter for none)

OK,

.

.

.

successfully used password, moving on…

Read More

Apache Solr

How To Install Apache Solr In Ubuntu

Apache Solr

Solr is a search engine platform based on Apache Lucene. It is written in Java and uses the Lucene library to implement indexing.

If you want to install Solr the easy way, you should use this steps. Solr doesn’t work alone; it needs a Java servlet container such as Tomcat or Jetty.

Apache Solr

To Install Apache Solr In Ubuntu

Step 1. To Installing Java

Installing Java from the command line.

sudo apt-get install openjdk-7

Step 2. To Installing Tomcat

Install Tomcat from the command line.

sudo apt-get install tomcat7

Step 3. To Installing Solr

1) Download the latest version of Solr 4.8.1 from

http://lucene.apache.org/solr/

2) Expand the archive, and copy Solr’s Java libraries to the Tomcat library directory

sudo cp solr-4.8.1/dist/solrj-lib/* /usr/share/tomcat7/lib/

3) Copy Solr’s logging configuration file to the Tomcat configuration directory

sudo cp solr-4.8.1/example/resources/log4j.properties /var/lib/tomcat7/conf/

4) Copy the Solr webapp to the Tomcat webapps directory.

sudo cp solr-4.8.1/dist/solr-4.8.1.war /var/lib/tomcat7/webapps/solr.war

5) Define the Solr context by modifying the solr.xml file.

sudo vim /var/lib/tomcat7/conf/Catalina/localhost/solr.xml

6) Context fragment pointing to the webapp file from above and to the Solr home directory.

<Context docBase=”/var/lib/tomcat7/webapps/solr.war” debug=”0″ crossContext=”true”>
<Environment name=”solr/home” type=”java.lang.String” value=”/usr/share/tomcat7/solr” override=”true” />
</Context>

Step 5. Configuring Solr

1) Create the Solr home directory.

sudo mkdir /usr/share/tomcat7/solr

2) Copy the Solr configuration files to the Solr home directory.

sudo cp -r solr-4.8.1/example/solr/collection1/conf /usr/share/tomcat7/solr/

Read More

Apache Solr_hostdens_com

Apache Solr

Apache Solr_hostdens_com

What is Apache Solr?

  Apache Solr is the popular, blazing-fast, open source platform for searches of data stored in HDFS in Hadoop. Solr powers the search and navigation features of many of the world’s largest Internet sites, enabling powerful full-text search and near real-time indexing. Solr enables you to easily create search engines which searches websites, databases and files.Whether users search for tabular, text, geo-location or sensor data in Hadoop, they find it quickly with Apache Solr.

What Solr Does ? 

Hadoop operators put documents in Apache Solr by “indexing” via XML, JSON, CSV or binary over HTTP.

Then users can query those petabytes of data via HTTP GET. They can receive XML, JSON, CSV or binary results. Apache Solr is optimized for high volume web traffic.

Top features of  Apache Solr

Solr is characterized by various features while its major ones include powerful full-text search, hit highlighting, faceted search, dynamic clustering, database integration, rich document (like Word and PDF) handling, and geospatial search. From its various features we describe the following ones:

  • Advanced Full-Text Search Capabilities: since it is powered by Lucene, Solr enables powerful matching capabilities including phrases, wildcards, joins, grouping and much more across any data type
  • Optimized for High Volume Traffic: Solr is proven at extremely large scales the world over
  • Comprehensive Administration Interfaces: Solr ships with a built-in, responsive administrative user interface to make it easy to control its instances
  • Highly Scalable and Fault Tolerant: Built on the battle-tested Apache Zookeeper, Solr makes it easy to scale up and down. It bakes in replication, distribution, rebalancing and fault tolerance out of the box.
  • Flexible and Adaptable with easy configuration: Solr is designed to adapt to the needs all while simplifying configuration

 

How Solr Works ?

Solr is written in Java and runs as a standalone full-text search server within a servlet container such as Jetty. Solr uses the Apache Lucene Java search library at its core for full-text indexing and search, and has REST-like HTTP/XML and JSON APIs that make it easy to use with many programming languages.

Solr’s powerful external configuration allows it to be tailored to almost any type of application without Java coding, and it has an extensive plugin architecture when more advanced customization is required.

Apache Solr includes a deployment methodology to set up a cluster of Solr servers that combines fault tolerance and high availability. This is referred to as SolrCloud. SolrCloud provides distributed indexing and search capabilities, and provides automated failover for queries in the event of any failure to a SolrCloud server.

SolrCloud utilizes Apache ZooKeeper for cluster coordination and configuration.

 

 

 

 

Read More