<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Control WebPanel Wiki &#187; Other</title>
	<atom:link href="https://wiki.centos-webpanel.com/category/other/feed" rel="self" type="application/rss+xml" />
	<link>https://wiki.centos-webpanel.com</link>
	<description>CentOS WebPanel Wiki</description>
	<lastBuildDate>Wed, 12 Feb 2025 20:38:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>CentOS 7: Could not resolve host: mirrorlist.centos.org</title>
		<link>https://wiki.centos-webpanel.com/centos-7-could-not-resolve-host-mirrorlist-centos-org</link>
		<comments>https://wiki.centos-webpanel.com/centos-7-could-not-resolve-host-mirrorlist-centos-org#comments</comments>
		<pubDate>Sun, 09 Feb 2025 21:10:03 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[CentOS 7 EOL]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1861</guid>
		<description><![CDATA[Errors with yum on CentOS 7 when updating server packages Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&#038;arch=x86_64&#038;repo=os&#038;infra=stock error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Name or service not known" On July 1, 2024, CentOS 7 reached end of life, and the CentOS team has moved its repositories to the archive at vault.centos.org. Without updating [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Errors with yum on CentOS 7 when updating server packages</p>
<pre>
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&#038;arch=x86_64&#038;repo=os&#038;infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Name or service not known"</pre>
<p><em>On July 1, 2024, CentOS 7 reached end of life, and the CentOS team has moved its repositories to the archive at vault.centos.org. Without updating the repository URLs, packages cannot be updated or validated, resulting in these errors.<br />
</em></p>
<p>Solution, run script:</p>
<pre>/scripts/centos7_fix_repository</pre>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/centos-7-could-not-resolve-host-mirrorlist-centos-org/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update CURL to Latest version in CentOS</title>
		<link>https://wiki.centos-webpanel.com/update-curl-to-latest-version-in-centos</link>
		<comments>https://wiki.centos-webpanel.com/update-curl-to-latest-version-in-centos#comments</comments>
		<pubDate>Fri, 24 Mar 2023 06:52:20 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[Curl Update]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1838</guid>
		<description><![CDATA[To update to the latest version of CURL running the CWP7 server, follow the steps below. First stop the future updates via yum/dnf package manager, if you skip this step then after each update of curl from the base repo you need to rebuild curl Centos 7 /EL7 : cat /etc/yum.conf &#124;grep "^exclude="&#124;grep kernel 1&#62; [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>To update to the latest version of CURL running the CWP7 server, follow the steps below.</p>
<h3>First stop the future updates via yum/dnf package manager, if you skip this step then after each update of curl from the base repo you need to rebuild curl</h3>
<p><strong>Centos 7 /EL7 :</strong></p>
<pre>cat /etc/yum.conf |grep "^exclude="|grep kernel 1&gt; /dev/null 2&gt; /dev/null || echo 'exclude=curl* libcurl*' &gt;&gt; /etc/yum.conf
</pre>
<p><strong>Centos 8 stream /EL8 :</strong></p>
<pre>cat /etc/dnf.conf |grep "^exclude="|grep kernel 1&gt; /dev/null 2&gt; /dev/null || echo 'exclude=curl* libcurl*' &gt;&gt; /etc/dnf.conf
</pre>
<h3><strong>Now you need to install dependencies to build curl and libcurl:</strong></h3>
<p><strong>Centos 7 /EL7 :</strong></p>
<pre>yum install libssh libssh-devel libnghttp2-devel libnghttp2 libgsasl libgsasl-devel zstd libzstd-devel libzstd brotli brotli-devel libbrotli 
</pre>
<p><strong>Centos 8 stream /EL8 :</strong></p>
<pre>dnf install libssh libssh-devel libnghttp2-devel libnghttp2 libgsasl libgsasl-devel zstd libzstd-devel libzstd brotli brotli-devel libbrotli 
</pre>
<h3><strong>After you've installed the dependencies build CURL from the source :</strong></h3>
<pre>cd /usr/local/src
rm -rf curl*
wget https://curl.se/download/curl-7.88.0.zip
unzip curl-7.88.0.zip
cd curl-7.88.0
./configure --with-ssl --with-zlib --with-gssapi --enable-ldap --enable-ldaps --with-libssh --with-nghttp2
make
make install
</pre>
<p><strong>After the successful build check the cURL version :</strong></p>
<pre>curl -V
</pre>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/update-curl-to-latest-version-in-centos/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disk Usage Check</title>
		<link>https://wiki.centos-webpanel.com/disk-usage-check</link>
		<comments>https://wiki.centos-webpanel.com/disk-usage-check#comments</comments>
		<pubDate>Fri, 28 Jan 2022 08:19:08 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[Disk Usage Check]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1709</guid>
		<description><![CDATA[If you have a full disk space usage on your server in most cases this is caused by backups or logs but it can be also many other things. We recommend running all these commands from the ssh console because on a big disk this can be very slow. List partitions and usage df -h [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>If you have a full disk space usage on your server in most cases this is caused by backups or logs but it can be also many other things.<br />
We recommend running all these commands from the ssh console because on a big disk this can be very slow.</p>
<p><strong>List partitions and usage</strong></p>
<pre>df -h</pre>
<p><strong>Check Disk Usage per User</strong></p>
<pre>repquota -a -s</pre>
<p>Show only accounts with usage in Gbytes</p>
<pre>repquota -a -s | grep G</pre>
<p><strong>Check Disk Usage per Partition ignoring links</strong><br />
* You can replace /home with the parition or folder you want to check<br />
Let's check /home partition</p>
<pre>du -hx --max-depth 1 /home</pre>
<p>Show only folders with usage in Gbytes</p>
<pre>du -hx --max-depth 1 /home | grep G</pre>
<p>Check /var partition</p>
<pre>du -hx --max-depth 1 /var</pre>
<p>Show only folders with usage in Gbytes</p>
<pre>du -hx --max-depth 1 /var | grep G</pre>
<p>Check Mail folder /var/vmail</p>
<pre>du -hx --max-depth 1 /var/vmail</pre>
<p>Show only folders with usage in Gbytes</p>
<pre>du -hx --max-depth 1 /var/vmail | grep G</pre>
<p>Check MySQL folder /var/lib/mysql</p>
<pre>du -hx --max-depth 1 /var/lib/mysql</pre>
<p>Show only folders with usage in Gbytes</p>
<pre>du -hx --max-depth 1 /var/lib/mysql | grep G</pre>
<p>Check Backups</p>
<pre>du -hx --max-depth 1 /backup</pre>
<p>Show only folders with usage in Gbytes</p>
<pre>du -hx --max-depth 1 /backup | grep G</pre>
<p>Show only daily backup folder with usage in Gbytes</p>
<pre>du -hx --max-depth 1 /backup/daily | grep G</pre>
<p>Now when you know how to check the partitions and folders here are some useful commands to check files in the folder sorted by size:</p>
<pre>ls -lahS /folder/location</pre>
<p>Example for MySQL folder /var/lib/mysql/</p>
<pre>ls -lahS /var/lib/mysql/</pre>
<p>Some useful scripts we already have are checking the most frequent folders:<br />
/var/log/<br />
/usr/local/apache/logs/<br />
/usr/local/apache/domlogs/<br />
/usr/local/cwpsrv/logs/<br />
/tmp<br />
/root<br />
/var/lib/mysql/</p>
<pre>/scripts/disk_check</pre>
<p><strong>Delete Files</strong><br />
Now when you know how to check, the question is how can you delete or empty files.<br />
Note that you shouldn't delete files other than logs or backups as all others can crash your server.</p>
<p>Log files are in use by the programs so in case you want to clean big active log files you can't just delete them as they will remain invisible until you restart the service.<br />
The solution is to empty the file, example:</p>
<pre>:> /usr/local/apache/logs/access_log</pre>
<p>However all other logs files you can simply delete, examples</p>
<pre>rm -f  filename</pre>
<p>An example case when you have active log files and logrotated which are not active and are renamed with -DATE</p>
<p>Delete single log file NOT currently in use by service</p>
<pre>rm -f /var/log/maillog-20211108</pre>
<p>Delete all maillog files NOT currently in use by service</p>
<pre>rm -f /var/log/maillog-*</pre>
<p>Empty active log file which is in use by the service</p>
<pre>:> /var/log/maillog</pre>
<p><em>* If you are not sure it's better to grab a support service and have the experienced sysadmin to check this for you.</em></p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/disk-usage-check/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Account Suspended</title>
		<link>https://wiki.centos-webpanel.com/account-suspended</link>
		<comments>https://wiki.centos-webpanel.com/account-suspended#comments</comments>
		<pubDate>Fri, 31 Dec 2021 18:23:14 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[Account Suspended]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1657</guid>
		<description><![CDATA[If you are getting the account suspended message it can be for the following reasons: - Account was suspended by server admin or automated billing system. - Account HTTP/HTTPS is only suspended, this means the account monthly bandwidth limit was exceeded. Account Suspended fully If the account shows as suspended in the cwp.admin under the [&#8230;]]]></description>
				<content:encoded><![CDATA[<div class="st-alert st-alert- "><strong>Account Suspended</strong><br />
Please contact your hosting provider to correct issues causing your website to be offline.</div>
<p>If you are getting the account suspended message it can be for the following reasons:<br />
- Account was suspended by server admin or automated billing system.<br />
- Account HTTP/HTTPS is only suspended, this means the account monthly bandwidth limit was exceeded.</p>
<p><strong>Account Suspended fully</strong><br />
If the account shows as suspended in the cwp.admin under the account list then you can unsuspend it also from there.<br />
Mostly the reason for the suspension is Manual by SystemAdmin or by an Automated Billing system.</p>
<p><strong>Account HTTP/HTTPS Suspended only</strong><br />
If only website access was suspended meaning that you can login to user panel, ftp, and email then HTTP/HTTPS for the account was suspended because the Bandwidth limit was exceeded.</p>
<p>You can UnSuspend bandwidth exceeded account by increasing the bandwidth limit of the package that account uses.<br />
This change needs to be done from cwp.admin -> Packages module.</p>
<p>There is also an API that can unsuspend accounts but this will be temporary until the next bandwidth check cron which runs every 24h.</p>
<p><strong>API functions:</strong></p>
<p>UnSuspend Account:</p>
<pre>/scripts/cwp_api account unsuspend_user USERNAME</pre>
<p>UnSuspend Account Bandwidth (You should increase user/package bandwidth before):</p>
<pre>/scripts/cwp_api account unsuspend_bandwidth USERNAME</pre>
<p>Reset Account Bandwidth (It will reset user bandwidth to 0 and UnSuspend Account):</p>
<pre>/scripts/cwp_api account reset_bandwidth USERNAME</pre>
<p>If the suspended message continues then try to check vhost templates.</p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/account-suspended/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install ElasticSearch</title>
		<link>https://wiki.centos-webpanel.com/how-to-install-elasticsearch</link>
		<comments>https://wiki.centos-webpanel.com/how-to-install-elasticsearch#comments</comments>
		<pubDate>Mon, 06 Dec 2021 08:26:57 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[ElasticSearch]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1627</guid>
		<description><![CDATA[Introduction Elasticsearch is a platform for distributed search and analysis of data in real-time. Its popularity is due to its ease of use, powerful features, and scalability. Elasticsearch supports RESTful operations. This means that you can use HTTP methods (GET, POST, PUT, DELETE, etc.) in combination with an HTTP URI (/collection/entry) to manipulate your data. [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>Elasticsearch is a platform for distributed search and analysis of data in real-time. Its popularity is due to its ease of use, powerful features, and scalability.</p>
<p>Elasticsearch supports RESTful operations. This means that you can use HTTP methods (GET, POST, PUT, DELETE, etc.) in combination with an HTTP URI (/collection/entry) to manipulate your data. The intuitive RESTful approach is both developer and user-friendly, which is one of the reasons for Elasticsearch’s popularity.</p>
<p>Elasticsearch is free and open-source software with a solid company behind it — Elastic. This combination makes it suitable for use anywhere from personal testing to corporate integration.</p>
<p>This article will introduce you to Elasticsearch and show you how to install, configure, and start using it.</p>
<p><strong>Prerequisites</strong></p>
<p>Before following this tutorial, please make sure you complete the following prerequisites:</p>
<ol>
A CentOS 7 Droplet<br />
A non-root sudo user (Check out Initial Server Setup with CentOS 7 for details.)</ol>
<p>Except otherwise noted, all of the commands that require root privileges in this tutorial should be run as a non-root user with sudo privileges.</p>
<p><strong>Assumptions</strong></p>
<p>This tutorial assumes that your servers are using a VPN like the one described here: How To Use Ansible and Tinc VPN to Secure Your Server Infrastructure. This will provide private network functionality regardless of the physical network that your servers are using.</p>
<p>If you are using a shared private network, such as DigitalOcean Private Networking, you must use a VPN to protect Elasticsearch from unauthorized access. Each server must be on the same private network because Elasticsearch doesn’t have security built into its HTTP interface. The private network must not be shared with any computers you don’t trust.</p>
<p><strong>Step 1 — Installing Java</strong></p>
<p>First, you will need a Java Runtime Environment (JRE) on your Droplet because Elasticsearch is written in the Java programming language. You can use the native CentOS OpenJDK package for the JRE. This JRE is free, well-supported, and automatically managed through the CentOS Yum installation manager.</p>
<p>You can install the latest OpenJDK with the command:</p>
<pre>sudo yum install java-1.8.0-openjdk.x86_64</pre>
<p>To verify your JRE is installed and can be used, run the command:</p>
<pre>java -version</pre>
<p>The result should look like this:</p>
<pre>Output of java -version
openjdk version "1.8.0_65"
OpenJDK Runtime Environment (build 1.8.0_65-b17)
OpenJDK 64-Bit Server VM (build 25.65-b01, mixed mode)</pre>
<p>When you advance in using Elasticsearch and you start looking for better Java performance and compatibility, you may opt to install Oracle’s proprietary Java (Oracle JDK 8). For more information on how to do this, please check the article on How To Install Java on CentOS and Fedora.</p>
<p><strong>Step 2 — Downloading and Installing Elasticsearch</strong></p>
<p>Elasticsearch can be downloaded directly from elastic.co in zip, tar.gz, deb, or rpm packages. For CentOS, it’s best to use the native rpm package which will install everything you need to run Elasticsearch.</p>
<p>At the time of this writing, the latest Elasticsearch version is 1.7.3. Download it in a directory of your choosing with the command:</p>
<pre>wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.3.noarch.rpm</pre>
<p>Then install it in the usual CentOS way with the rpm command like this:</p>
<pre>sudo rpm -ivh elasticsearch-1.7.3.noarch.rpm</pre>
<p>This results in Elasticsearch being installed in /usr/share/elasticsearch/ with its configuration files placed in /etc/elasticsearch and its init script added in /etc/init.d/elasticsearch.</p>
<p>To make sure Elasticsearch starts and stops automatically with the Droplet, add its init script to the default runlevels with the command:</p>
<pre>sudo systemctl enable elasticsearch.service</pre>
<p><strong>Step 3 — Configuring Elastic</strong></p>
<p>Now that Elasticsearch and its Java dependencies have been installed, it is time to configure Elasticsearch.</p>
<p>The Elasticsearch configuration files are in the /etc/elasticsearch directory. There are two files:</p>
<p><strong>elasticsearch.yml</strong> — Configures the Elasticsearch server settings. This is where all options, except those for logging, are stored, which is why we are mostly interested in this file.<br />
<strong>logging.yml</strong> — Provides configuration for logging. In the beginning, you don’t have to edit this file. You can leave all default logging options. You can find the resulting logs in /var/log/elasticsearch by default.</p>
<p>The first variables to customize on any Elasticsearch server are node.name and cluster.name in elasticsearch.yml. As their names suggest, node.name specifies the name of the server (node) and the cluster to which the latter is associated.</p>
<p>If you don’t customize these variables, a node.name will be assigned automatically in respect to the Droplet hostname. The cluster.name will be automatically set to the name of the default cluster.</p>
<p>The cluster.name value is used by the auto-discovery feature of Elasticsearch to automatically discover and associate Elasticsearch nodes to a cluster. Thus, if you don’t change the default value, you might have unwanted nodes, found on the same network, in your cluster.</p>
<p>To start editing the main elasticsearch.yml configuration file:</p>
<pre>sudo nano /etc/elasticsearch/elasticsearch.yml</pre>
<p>Remove the # character at the beginning of the lines for node.name and cluster.name to uncomment them, and then change their values. Your first configuration changes in the /etc/elasticsearch/elasticsearch.yml file should look like this:</p>
<p>/etc/elasticsearch/elasticsearch.yml</p>
<pre>...
node.name: "My First Node"
cluster.name: mycluster1
...</pre>
<p>Another important setting is the role of the server, which could be either “master” or “slave”. “Masters” are responsible for the cluster's health and stability. In large deployments with a lot of cluster nodes, it’s recommended to have more than one dedicated “master.” Typically, a dedicated “master” will not store data or create indexes. Thus, there should be no chance of being overloaded, by which the cluster health could be endangered.</p>
<p>“Slaves” are used as “workhorses” which can be loaded with data tasks. Even if a “slave” node is overloaded, the cluster health shouldn’t be affected seriously, provided there are other nodes to take additional load.</p>
<p>The setting which determines the role of the server is called node.master. If you have only one Elasticsearch node, you should leave this option commented out so that it keeps its default value of true — i.e. the sole node should be also a master. Alternatively, if you wish to configure the node as a slave, remove the # character at the beginning of the node.master line, and change the value to false:</p>
<p>/etc/elasticsearch/elasticsearch.yml</p>
<pre>...
node.master: false
...</pre>
<p>Another important configuration option is node.data, which determines whether a node will store data or not. In most cases, this option should be left to its default value (true), but there are two cases in which you might wish not to store data on a node. One is when the node is a dedicated “master,” as we have already mentioned. The other is when a node is used only for fetching data from nodes and aggregating results. In the latter case, the node will act up as a “search load balancer”.</p>
<p>Again, if you have only one Elasticsearch node, you should leave this setting commented out so that it keeps the default true value. Otherwise, to disable storing data locally, uncomment the following line and change the value to false:</p>
<p>/etc/elasticsearch/elasticsearch.yml</p>
<pre>...
node.data: false
...</pre>
<p>Two other important options are index.number_of_shards and index.number_of_replicas. The first determines into how many pieces (shards) the index will be split into. The second defines the number of replicas that will be distributed across the cluster. Having more shards improves the indexing performance while having more replicas makes searching faster.</p>
<p>Assuming that you are still exploring and testing Elasticsearch on a single node, it’s better to start with only one shard and no replicas. Thus, their values should be set to the following (make sure to remove the # at the beginning of the lines):</p>
<p>/etc/elasticsearch/elasticsearch.yml</p>
<pre>...
index.number_of_shards: 1
index.number_of_replicas: 0
...</pre>
<p>One final setting which you might be interested in changing is path.data, which determines the path where data is stored. The default path is /var/lib/elasticsearch. In a production environment, it’s recommended that you use a dedicated partition and mount point for storing Elasticsearch data. In the best case, this dedicated partition will be a separate storage media which will provide better performance and data isolation. You can specify a different path.data path by uncommenting the path.data line and changing its value:</p>
<p>/etc/elasticsearch/elasticsearch.yml</p>
<pre>...
path.data: /media/different_media
...</pre>
<p>Once you make all the changes, please save and exit the file. Now you can start Elasticsearch for the first time with the command:</p>
<pre>sudo service elasticsearch start</pre>
<p>Please allow at least 10 seconds for Elasticsearch to fully start before you are able to use it. Otherwise, you may get errors about not being able to connect.</p>
<p><strong>Step 4 — Securing Elastic</strong></p>
<p>Elasticsearch has no built-in security and can be controlled by anyone who can access the HTTP API. This section is not a comprehensive guide to securing Elasticsearch. Take whatever measures are necessary to prevent unauthorized access to it and the server/virtual machine on which it is running. Consider using iptables to further secure your system.</p>
<p>The first security tweak is to prevent public access. To remove public access edit the file elasticsearch.yml:</p>
<p>sudo nano /etc/elasticsearch/elasticsearch.yml<br />
Find the line that contains the network.bind_host, uncomment it by removing the # character at the beginning of the line, and changing the value to localhost so it looks like this:</p>
<p>/etc/elasticsearch/elasticsearch.yml</p>
<pre>...
network.bind_host: localhost
...</pre>
<p><strong>Warning:</strong> Because Elasticsearch doesn’t have any built-in security, it is very important that you do not set this to any IP address that is accessible to any servers that you do not control or trust. Do not bind Elasticsearch to a public or shared private network IP address!</p>
<p>Also, for additional security, you can disable dynamic scripts which are used to evaluate custom expressions. By crafting a custom malicious expression, an attacker might be able to compromise your environment.</p>
<p>To disable custom expressions, add the following line is at the end of the /etc/elasticsearch/elasticsearch.yml file:</p>
<p>/etc/elasticsearch/elasticsearch.yml</p>
<pre>...
script.disable_dynamic: true
...</pre>
<p>For the above changes to take effect, you will have to restart Elasticsearch with the command:</p>
<pre>sudo service elasticsearch restart</pre>
<p><strong>Step 5 — Testing</strong></p>
<p>By now, Elasticsearch should be running on port 9200. You can test it with curl, the command line client-side URL transfers tool, and a simple GET request like this:</p>
<pre>curl -X GET 'http://localhost:9200'</pre>
<p>You should see the following response:</p>
<pre>Output of curl
{
  "status" : 200,
  "name" : "CentOS Node",
  "cluster_name" : "mysqluster",
  "version" : {
    "number" : "1.7.3",
    "build_hash" : "05d4530971ef0ea46d0f4fa6ee64dbc8df659682",
    "build_timestamp" : "2015-10-15T09:14:17Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.4"
  },
  "tagline" : "You Know, for Search"
}</pre>
<p>If you see a response similar to the one above, Elasticsearch is working properly. If not, make sure that you have followed correctly the installation instructions and you have allowed some time for Elasticsearch to fully start.</p>
<p><strong>Step 6 — Using Elasticsearch</strong></p>
<p>To start using Elasticsearch, let’s add some data first. As already mentioned, Elasticsearch uses a RESTful API, which responds to the usual CRUD commands: Create, Read, Update, and Delete. For working with it, we’ll use again curl.</p>
<p>You can add your first entry with the command:</p>
<pre>curl -X POST 'http://localhost:9200/tutorial/helloworld/1' -d '{ "message": "Hello World!" }'</pre>
<p>You should see the following response:</p>
<pre>Output
{"_index":"tutorial","_type":"helloworld","_id":"1","_version":1,"created":true}</pre>
<p>With curl, we have sent an HTTP POST request to the Elasticseach server. The URI of the request was /tutorial/helloworld/1. It’s important to understand the parameters here:</p>
<p>the tutorial is the index of the data in Elasticsearch.</p>
<p>helloworld is the type.</p>
<p>1 is the id of our entry under the above index and type.</p>
<p>You can retrieve this first entry with an HTTP GET request like this:</p>
<pre>curl -X GET 'http://localhost:9200/tutorial/helloworld/1'</pre>
<p>The result should look like:</p>
<pre>Output
{"_index":"tutorial","_type":"helloworld","_id":"1","_version":1,"found":true,"_source":{ "message": "Hello World!" }}</pre>
<p>To modify an existing entry you can use an HTTP PUT request like this:</p>
<pre>curl -X PUT 'localhost:9200/tutorial/helloworld/1?pretty' -d '
{
  "message": "Hello People!"
}'</pre>
<p>Elasticsearch should acknowledge successful modification like this:</p>
<pre>Output
{
  "_index" : "tutorial",
  "_type" : "helloworld",
  "_id" : "1",
  "_version" : 2,
  "created" : false
}</pre>
<p>In the above example, we have modified the message of the first entry to “Hello People!”. With that, the version number has been automatically increased to 2.</p>
<p>You may have noticed the extra argument pretty in the above request. It enables a human-readable format so that you can write each data field on a new row. You can also “prettify” your results when retrieving data and get much nicer output like this:</p>
<pre>curl -X GET 'http://localhost:9200/tutorial/helloworld/1?pretty'</pre>
<p>Now the response will be in a much better format:</p>
<pre>Output
{
  "_index" : "tutorial",
  "_type" : "helloworld",
  "_id" : "1",
  "_version" : 2,
  "found" : true,
  "_source":{ "message": "Hello World!" }
}</pre>
<p>Setup web server to host ElasticSearch Application</p>
<p>These options depend on the webservers you have currently installed</p>
<p>For example, if you have installed nginx/varnish/apache you can use:<br />
i. nginx -> custom port - This will proxy directly to ElasticSearch Application(RECOMMENDED)<br />
ii. nginx/varnish/apache -> custom port - This will proxy to varnish cache and then to apache and then to ElasticSearch Application</p>
<p>So far we have added to and queried data in Elasticsearch. To learn about the other operations please check the API documentation.</p>
<p><strong>Conclusion</strong></p>
<p>That’s how easy it is to install, configure, and begin using Elasticsearch. Once you have played enough with manual queries, your next task will be to start using it from your applications.</p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/how-to-install-elasticsearch/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create CWP iso image</title>
		<link>https://wiki.centos-webpanel.com/how-to-create-cwp-iso-image</link>
		<comments>https://wiki.centos-webpanel.com/how-to-create-cwp-iso-image#comments</comments>
		<pubDate>Tue, 30 Nov 2021 06:34:59 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[CWP iso image]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1618</guid>
		<description><![CDATA[This info is for Server providers like Cloud, VPS or Dedicated servers to create fast image deployment servers with CWP. You need to be aware that each cwp version is valid for 6 months only, so you would need to update the image before that expire time. Creating CWP iso image is easy, here are [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This info is for Server providers like Cloud, VPS or Dedicated servers to create fast image deployment servers with CWP.<br />
You need to be aware that each cwp version is valid for 6 months only, so you would need to update the image before that expire time.</p>
<p>Creating CWP iso image is easy, here are the steps:</p>
<p>- install and configure CWP<br />
- power off the server<br />
- create an image of the server</p>
<p>Since you had configured the server with IP, Hostname, and Email you will need to make that change after the image deployment.<br />
You can run this command after starting the new server to change those settings:</p>
<p>Options:<br />
<code>        --restart (Restart server after changes)<br />
        --newip (Set new IP in the server config)<br />
        --email (Set new admin email in the server config)<br />
        --hostname (Set new hostname in the server config)</code></p>
<pre>sh /scripts/image_rebuild_server_config -r yes --newip 111.112.124.135 --email my@email.com --hostname vps1.domain.com</pre>
<p><strong>This script will do:</strong><br />
- change hostname<br />
- change hostname in all services<br />
- change hostname certificate<br />
- change IP in all config<br />
- change mysql password to random for database: postfix, root, roundcube<br />
- clean log files<br />
- download latest cwp version</p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/how-to-create-cwp-iso-image/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cPanel Compatibility</title>
		<link>https://wiki.centos-webpanel.com/cpanel-compatibility</link>
		<comments>https://wiki.centos-webpanel.com/cpanel-compatibility#comments</comments>
		<pubDate>Fri, 11 Sep 2020 06:16:18 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[cPanel Compatibility]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1450</guid>
		<description><![CDATA[Access admin/user panel over the same port 2082 - CWP User Panel 2083 - CWP User Panel SSL 2086 - CWP Admin (same as 2030) 2087 - CWP Admin SSL (same as 2031) * Recommended to be used with the hostname because of the usage of the hostname SSL. Examples: https://hostname.domain.com:2083 https://hostname.domain.com:2087 https://100.110.120.130:2083 https://100.110.120.130:2087 Access [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>Access admin/user panel over the same port</strong><br />
2082 - CWP User Panel<br />
2083 - CWP User Panel SSL<br />
2086 - CWP Admin (same as 2030)<br />
2087 - CWP Admin SSL (same as 2031)<br />
<em>* Recommended to be used with the hostname because of the usage of the hostname SSL.</em><br />
Examples:</p>
<pre>https://hostname.domain.com:2083

https://hostname.domain.com:2087


https://100.110.120.130:2083


https://100.110.120.130:2087</pre>
<p><strong>Access to user panel over subdomain cpanel without port</strong><br />
cpanel.domain.com -&gt; it's the same same as port 2083 but it is using user domain SSL certificate</p>
<p><em>if you need to access admin panel also without the port then you can edit nginx/apache hostname conf files and add config for subdomain, don't forget to add dns A record also.</em><br />
/etc/nginx/conf.d/hostname.conf<br />
/etc/nginx/conf.d/hostname-ssl.conf<br />
/usr/local/apache/conf.d/hostname.conf<br />
/usr/local/apache/conf.d/hostname-ssl.conf</p>
<p><strong>webmail subdomain for access to Roundcube</strong><br />
webmail.domain.com -&gt; using user domain SSL certificate</p>
<p><strong>mail subdomain for access to the mail server</strong><br />
mail.domain.com -&gt; STMP (including SSL/TLS per domain)<br />
mail.domain.com -&gt; IMAP/POP3 (including SSL/TLS per domain)</p>
<p><strong>Auto-discover of mail configuration</strong></p>
<p><strong>Autologin</strong><br />
<em>Single click login without the password</em><br />
- From admin panel to user panel<br />
- RoundCube (login to any email account)<br />
- PHPMyAdmin (login as cpanel user)</p>
<p><strong>User Panel</strong><br />
- Advanced File Manager</p>
<p><strong>Migration tools </strong><br />
<strong><br />
Restore account from cPanel</strong> (restores local cpmove file)<br />
<a href="http://wiki.centos-webpanel.com/how-to-migrate-account-from-cpanel" target="_blank">http://wiki.centos-webpanel.com/how-to-migrate-account-from-cpanel</a></p>
<p><strong>cPanel to CWP server convert</strong> (removes cPanel and installs CWP but keeping all the accounts and databases)<br />
<a href="http://wiki.centos-webpanel.com/cpanel-to-cwp-server-convert" target="_blank">http://wiki.centos-webpanel.com/cpanel-to-cwp-server-convert</a></p>
<p><strong>cPanel Server Migration</strong> (migrates only accounts from the remote cpanel using SSH connection)<br />
<a href="https://docs.control-webpanel.com/docs/admin-guide/user-accounts/cpanel-server-migration-new" target="_blank">https://docs.control-webpanel.com/docs/admin-guide/user-accounts/cpanel-server-migration-new</a></p>
<p><strong>3rd-Party Integrations</strong><br />
- Softaculous<br />
- Sitepad<br />
- WHMCS, Blesta, HostBill, ClientExec, Wisecp...<br />
- Cloudlinux</p>
<p>If your main user panel login doesn't work for phpMyAdmin then please change the password in the user panel.</p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/cpanel-compatibility/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install dotnet SDK and running a Project Example</title>
		<link>https://wiki.centos-webpanel.com/install-dotnet-sdk-and-running-a-project-example</link>
		<comments>https://wiki.centos-webpanel.com/install-dotnet-sdk-and-running-a-project-example#comments</comments>
		<pubDate>Wed, 05 Aug 2020 21:02:55 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[dotnet SDK]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1411</guid>
		<description><![CDATA[Installation of dotnet on CWP server : First install .net package repo from official Microsoft site : rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm To install dotnet SDK 2.2 yum install dotnet-sdk-2.2 -y To install dotnet SDK 3.1 LTS : yum install dotnet-sdk-3.1 -y you can check the main dotnet version by running this command : dotnet --version How [&#8230;]]]></description>
				<content:encoded><![CDATA[<h3>Installation of dotnet on CWP server :</h3>
<p>First install .net package repo from official Microsoft site :</p>
<pre>rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
</pre>
<p>To install dotnet SDK 2.2</p>
<pre>yum install dotnet-sdk-2.2 -y</pre>
<p>To install dotnet SDK 3.1 LTS :</p>
<pre>yum install dotnet-sdk-3.1 -y</pre>
<p>you can check the main dotnet version by running this command :</p>
<pre>dotnet --version
</pre>
<h3><strong>How to Create project - example:</strong></h3>
<p>to create a project or download any existing prebuild project you need to follow this steps:<br />
<strong>Login into ssh with the username</strong> of your account user (<strong>ensure you enabled the full shell access for that user</strong>)<br />
or from root you can run this command to change the user :</p>
<pre>su - username -s /bin/bash
</pre>
<p>now go to user dir public_html:</p>
<pre>cd /home/username/public_html</pre>
<p>Download pre build ASP core project, we're using "movie-app-list" as an example :</p>
<pre>git clone https://github.com/do-community/movie-app-list.git movie-app-list
</pre>
<p>Then enter the project dir :</p>
<pre>cd movie-app-list</pre>
<p>before we do the configuration this project needs MySQL DB and MySQL User for its data storage, you can simply create MySQL user and DB from user panel as well as admin panel.</p>
<p>after you <strong>create db</strong> and its <strong>user</strong> add those details in "<strong>appsettings.json</strong>"</p>
<pre>{
  "Logging": {
    "LogLevel": {
      "Default": "Warning"
    }
  },
  "AllowedHosts": "*",
  "ConnectionStrings": {
    "MovieContext": "Server=localhost;User Id=<span style="color: #ff0000;"><strong>user_netdb</strong></span>;Password=<strong><span style="color: #ff0000;">dqrESQo3</span></strong>;Database=<strong><span style="color: #ff0000;">user_netdb</span></strong>" } }</pre>
<p><strong>Now build the application :</strong></p>
<p><strong>you need to run this as root :</strong></p>
<pre>dotnet ef database update
dotnet build
dotnet publish
</pre>
<p>**upper commands will install csharp and all other dependencies.</p>
<p>Then fix the user permission :</p>
<pre>cd /home/username/public_html
chown -R username:username *
</pre>
<p>Now again login to ssh as user and run the below command to start the application by<strong> default application is set to run</strong> on<strong> localhost:5000</strong></p>
<p>Now start the application via this command :</p>
<pre>$ su - username -s /bin/bash
$ /usr/bin/dotnet /home/username/public_html/movie-app-list/bin/Debug/netcoreapp2.2/publish/MvcMovie.dll</pre>
<p>After that <strong>Ensure you've installed Nginx from CWP</strong> for <strong>port 5000 proxy</strong> go to :</p>
<p><strong>ADMIN &gt;&gt; Webserver Settings &gt;&gt; Webserserver domain conf &gt;&gt; Choose user &gt;&gt; Create config under domain you need to proxy dotnet application &gt;&gt; Choose "nginx -&gt; proxy -&gt; (custom-port)</strong>" and<strong> choose force https template</strong> tick <strong>rebuild vhost</strong> and <strong>save changes</strong> and done.</p>
<p>* don't forget to set your app port!</p>
<p>go to the domain name and see your application is live there.</p>
<p><strong>Troubleshoot guide :</strong></p>
<p>If you get too many files open you simply need to increase the open file limit for the user from edit user account.</p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/install-dotnet-sdk-and-running-a-project-example/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Install and Setup Node.Js on CWP</title>
		<link>https://wiki.centos-webpanel.com/how-to-install-and-setup-node-js-on-cwp</link>
		<comments>https://wiki.centos-webpanel.com/how-to-install-and-setup-node-js-on-cwp#comments</comments>
		<pubDate>Sat, 24 Aug 2019 18:29:36 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[nodejs]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1253</guid>
		<description><![CDATA[Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Step 1: Install Prerequisites: yum groupinstall 'Development Tools' -y Step 2: Install Yum Repository NodeJS 12.x: curl -sL https://rpm.nodesource.com/setup_12.x &#124; bash - NodeJS 11.x: curl -sL https://rpm.nodesource.com/setup_11.x &#124; bash - NodeJS 10.x: curl -sL https://rpm.nodesource.com/setup_10.x &#124; bash - NodeJS 8.x: curl -sL https://rpm.nodesource.com/setup_8.x &#124; [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.</p>
<p><strong>Step 1: Install Prerequisites:</strong></p>
<pre>yum groupinstall 'Development Tools' -y
</pre>
<p><strong>Step 2: Install Yum Repository</strong></p>
<p>NodeJS 12.x:</p>
<pre>curl -sL https://rpm.nodesource.com/setup_12.x | bash -</pre>
<p>NodeJS 11.x:</p>
<pre>curl -sL https://rpm.nodesource.com/setup_11.x | bash -</pre>
<p>NodeJS 10.x:</p>
<pre>curl -sL https://rpm.nodesource.com/setup_10.x | bash -</pre>
<p>NodeJS 8.x:</p>
<pre>curl -sL https://rpm.nodesource.com/setup_8.x | bash -</pre>
<p><strong>Step 3: Install Nodejs and npm</strong></p>
<pre>yum install -y nodejs</pre>
<p><strong>Step 4: Confirm installation:</strong><br />
Run the below commands to check if nodejs is installed properly:</p>
<pre>node -v
npm -v
</pre>
<p>The above command should output the version of nodejs and npm installed.For example, for version 12.X, you should see the something like below:</p>
<pre>[root@cwp2 ~]# node -v
v12.6.0
[root@cwp2 ~]# npm -v
6.9.0
</pre>
<p>npm which is the package manager for nodejs can be used to search and install additional modules for nodejs.</p>
<pre>npm search package
npm install package
</pre>
<p><strong>Step 5: Setup webserver to host Nodejs Application</strong><br />
<em>These options depend on the webservers you have currently installed</em></p>
<p>Example if you have installed nginx/varnish/apache you can use:<br />
<strong>i.</strong> nginx -&gt; custom port - This will proxy directly to nodejs Application(RECOMMENDED)<br />
<strong>ii.</strong> nginx/varnish -&gt; custom port - This will proxy to varnish cache and then to nodejs Application<br />
<strong>iii.</strong> nginx/varnish/apache -&gt; custom port - This will proxy to varnish cache and then to apache and then to nodejs Application</p>
<p><strong>Configure webservers for domain to be used for nodejs Application:</strong><br />
CWP.Admin left Menu -&gt; Webserver settings -&gt; Webserver Domain Conf -&gt; Select Username -&gt; Select Domain/Subdomain -&gt; create configuration -&gt; select any option with (custom port) -&gt; check the box – Rebuild webserver conf for domain on save -&gt; Enter port number you have used in the application for the custom port, leave IP as 127.0.0.1 -&gt; save changes</p>
<p><strong>Step 6: Install AutoSSL</strong><br />
CWP.Admin left Menu -&gt; Webserver settings -&gt; SSL Certificates -&gt; AutoSSL -&gt; select user and domain -&gt; install SSL</p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/how-to-install-and-setup-node-js-on-cwp/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internationalized Domain Name (IDN) Conversion Tools</title>
		<link>https://wiki.centos-webpanel.com/internationalized-domain-name-idn-conversion-tools</link>
		<comments>https://wiki.centos-webpanel.com/internationalized-domain-name-idn-conversion-tools#comments</comments>
		<pubDate>Tue, 30 Jul 2019 05:49:32 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[IDN Conversion Tools]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1237</guid>
		<description><![CDATA[When working with a domain name containing international (non-ASCII) characters, you need to convert the domain name into "punycode" before adding it to the CWP,DNS or Web server. You can use this IDN Conversion Tools to convert your domain from special characters to a name in ASCII characters. https://www.verisign.com/en_US/channel-resources/domain-registry-products/idn/idn-conversion-tool/index.xhtml https://www.punycoder.com/ https://simpledns.com/idn-convert]]></description>
				<content:encoded><![CDATA[<p>When working with a domain name containing international (non-ASCII) characters, you need to convert the domain name into "punycode" before adding it to the CWP,DNS or Web server. You can use this IDN Conversion Tools to convert your domain from special characters to a name in ASCII characters.</p>
<p><a href="https://www.verisign.com/en_US/channel-resources/domain-registry-products/idn/idn-conversion-tool/index.xhtml">https://www.verisign.com/en_US/channel-resources/domain-registry-products/idn/idn-conversion-tool/index.xhtml</a></p>
<p><a href="https://www.punycoder.com/">https://www.punycoder.com/</a></p>
<p><a href="https://simpledns.com/idn-convert">https://simpledns.com/idn-convert</a></p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/internationalized-domain-name-idn-conversion-tools/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
