Categories
How to Server Management Tips & Tricks

Install owncloud 8 in CentOS 7 – Get your own cloud storage

Today I will show you how to install owncloud on centOS 7 via SSH CLI. And get your own cloud storage without any extra cost. I am using a VPS in this guide with 512MB RAM and 100GB space. At the end of this guide, I should have roughly 98GB of cloud storage. Owncloud requires MySQL sever, apache server and PHP 5.5 installed on your server, because owncloud is a web application working on SQL and PHP 5.5. In this tutorial we are going to install Apache as our web server, mariadb as our SQL server and Apache as web-server.

Owncloud is an open-source cloud file storage solution that is available for almost any Operating System you can think of. There are also dedicated owncloud clients available for iPhone, Android and Windows phone market. So you can also access your owncloud storage from your mobile devices.

Things required to install owncloud.

  1. A system running centOS 7. I am using a VPS.
  2. Basic knowledge of SSH commands.
  3. 30 minutes of your time.

Install owncloud in centOS 7

  1.  Login to your VPS as root using SSH client. I am using putty for windows but you can also use terminal if you are mac user.
  2. Install php5.5, Apache, mysql server and other extensions required for owncloud. Owncloud requires LAMP stack to be installed to work.
    yum update
    yum install httpd php php-mysql php-dom php-mbstring php-gd php-pdo php-json php-xml php-zip php-gd curl php-curl php-mcrypt php-pear maridb mariadb-server -y
    How to install owncloud 8 via ssh in centos 7
  3. Start mysql server by following command:
    systemctl start mariadb
  4. Make your SQL server secure by running following command:
    mysql_secure_installation
  5. You will be prompted to enter your mysql password, just set a secure and hard-to-guess password and disable anonymous access to mysql server.
  6. Download latest version of owncloud using wget command. I am using owncloud 8.0.4 which is latest at this time.
    wget https://download.owncloud.org/community/owncloud-8.0.4.zip
  7. Extract the downloaded archive using this command.
    yum install -y zip unzip
    unzip owncloud-8.0.4.zip
  8. Now move owncloud directory to apache folder using the command given below.
    mv owncloud /var/www/html/owncloud
  9. Set the owner of data/ apps/ and config folders to apache. Just copy and paste all command one by one.
    chown -R apache:apache /var/www/html/owncloud
  10. After that you have to make a new SQL database and grant full access to a user.
    mysql -uroot -p
    Enter your mysql password that you set in earlier steps
    CREATE DATABASE owncloud;
    GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' IDENTIFIED BY 'PASSWORD_HERE';
    FLUSH PRIVILEGES;
    quit;
    Install Owncloud 8 in centos 7 manually
  11. Start the apache server and access you owncloud via http://ip-address/owncloud
    systemctl start httpd
  12. Now you have to make sure that your owncloud files are not directly accessible to public. I highly recommend you to set you data directory somewhere else in the server, because you don’t want unauthorized access to you Owncloud files.Install owncloud manually in centOS 7
  13. In your web browser, you have to create admin account first. Also enter the database details you choose in step 10.
  14. Now you should be able to access owncloud from your computer and mobile as well.

If you liked it, then share with others and help us spread the word. Join the discussion below if you have any suggestion or problem during the process.

Categories
Server Management

Denial of Service attack – How to stop DDoS?

Denial of Service or DoS is one of the most common types of attacks that are happening in www. This post will tell you what is a DoS attack? How it is initiated? How DoS attack is affecting the internet? and how to stop DDoS attacks?

What Denial of Service attack is?

Denial of Service or DoS attack pretty much defines it self by its name. To define the denial of service attack Wikipedia says:

In computing, a denial-of-service (DoS) or distributed denial-of-service (DDoS) attack is an attempt to make a machine or network resource unavailable to its intended users. A DoS attack generally consists of efforts to temporarily or indefinitely interrupt or suspend services of a host connected to the Internet.

Denial of service attack demonstration using funnel exampleBasically if an attacker is sending that much traffic, to any site or server, that the server can’t respond than this type of attack is called denial of service attack. To explain DoS attack in a simple manner, suppose there is a funnel put on a glass. If you try to pour a full bottle of water through that funnel, the water will over-flow. Same thing happens in DoS attack, the attacker sends too much traffic to the server resulting in suspension of the server.

There is another type of DoS called Distributed Denial of Service attack or DDoS. This type of attack is initiated by a complete network of servers across the globe and all those servers are instructed to attack 1 particular server. Distributed Denial of Service attack will make any server in the world go down with in minutes.

Even huge data-centers like Facebook have suffered from Denial of Service attack. If your server is being hit by a DoS or DDoS attack, most of the time you will have to let the attack happen, it can last from a couple of minutes to 24 hours. But if you want to block Denial of Service attack happening on your site, you can do this.

How to block a DDoS attack on my site?

Okay, so you have a site and your site is being hit by the Distributed denial of service attack. You can do a couple of things to block this attack. First of all you have to make sure that it is your site which is under attack, not the actual server itself.

If you have complete access to the server then you can check it by looking at the bandwidth of other domains pointing to the same server. You can also use Cloudflare which is a freemium CDN service and also stop DDoS attacks. There is also an option in Cloudflare control panel “I’m under attack”. Selecting this option from security options will stop every request to your site for 5 seconds.

Like if you selected “I’m under attack” option, then every visitor will have to wait for 5 seconds and then cloudflare will send that visitor to your site. This stops all the bots and DDoS requests but keeps the visitors intact.

If your domain is protected by Cloudflare and still you are being hit by the denial-of-service attack, then it is your server which is under attack. The attackers have found your server’s IP Address and they are attacking the server itself.

How to block a DDoS attack on a server?

This type of attack is not really easy to block. You have to filter out all the IP Address of the zombie servers using a firewall. All the Severs that are launching DDoS attacks are called Zombie servers. I have listed a couple of techniques that you can use to block DDoS attack on a server.

  • You can buy DDoS protection from your server provider. This will increase the cost of your server but your server will stay protected.
  • You can wipe your complete server and start over. I know this sounds weird but I have seen many cases where a malware on your server is initiating Denial of service attack. You wouldn’t be able to find the malware unless you are a server genius.
  • Terminate and get a DDoS protected server, if your server provider is not able to provide any DDoS protection.

Disadvantages a Denial of service attack

Denial of service is actually an attack and any type of attack can not have advantages for you. There are many disadvantages of a denial of service attack and you may face 1 or a couple of these listed below:

  • If you are using a very strict IP blocking strategy, you can also block legitimate IP addresses. This can also lock you out of your own server. How bad is that.
  • Your server can get suspended or even terminated, if your server provider is very strict against Denial of service attacks.

I hope this post will help you fight against DDoS attack and if it did, then don’t forget to share with others. Follow us on twitter, Google+ and join our group at Facebook. If you have any feedback feel free to join the discussion below and let us improve using your suggestions/criticism. Cheers.

Categories
Server Management Tips & Tricks

What is Cloudflare? Advantage and Disadvantage of Cloudflare

What is Cloudflare? what are the advantages and Disadvantages of using cloudflare? How can I enable cloudflare on shared hosting or VPS? I am often asked by these questions. Today I will answer these questions once and for all.

What is Cloudflare?

Cloudflare is a CDN (Content Delivery Network) which has more features than a Standard CDN has to offer. There are many advantages of cloudflare and some disadvantages also, we’ll have a look at it later in this post. Lets define cloudflare. Cloudflare is a CDN which sits right in the middle of your domain name and web host. It provides added security to DDoS attacks, It also cache the static resources of your website making your site load faster and putting less load on to the web hosting.

Cloudflare is a free service, with premium packages for high traffic site. It gives you ability to change your web-hosting without waiting for the name-servers to propagate. For example, Lets say you have a site hosted with host “A” and you want to migrate to host “B”. You can migrate within minutes, if you are using Cloudflare. But if you are not using Cloudflare, migration can take up-to many hours. Cloudflare has many data-centers around the world, which means that your visitors will be served by the data-center that is nearest to them.

Advantages of using CloudflareAdvantages-of-cloudflare

  • It hides your web-host’s original IP address so that any hacker may not be able to attack the server.
  • It cache your site’s some (or all) resources to load the site quicker and making the actual server work less.
  • It gives you ability to block all the DDoS attacks by changing the site’s security.
  • If your site goes down, Cloudflare will continue serving cached data until your site comes back up.
  • If your domain registrar don’t provide option to add DNS records, you can use Nameservers of CF and add host’s DNS records there.
  • Cloudflare’s base offering is free of cost and allows you to add multiple number of domains.
  • You can block access to your site for certain regions or countries, If you are receiving many attacks from particular countries.
  • It gives you free SSL, which you can use on shared host as well.

Disadvantages of using CloudflareDisadvantages-of-cloudflare

  • As Cloudflare acts as a man-in-the-middle, If Cloudflare goes down, your site will also go down, even if your web-hosting is up.
  • Cloudflare allows you to change the security of website to “I am under attack” mode, which blocks all DDoS attempts. But it also blocks all the robots, which is a minus for some people.
  • Sometimes Cloudflare acts weird, like it sometimes disallow access to the site, but it happens once in a blue moon.

How to enable Cloudflare on a shared hosting or VPS

Just go-to Cloudflare.com and signup for a free account. Add your domain and it will automatically detect current name-servers and IP address of current host. Just select the security and cache settings you like and click next. Now copy the name-servers given by Cloudflare and add them in your domain registrar.

Conclusion

To conclude, I can say that cloudflare is a very good service which provides very good level of security and redundancy for free. but if you are willing to pay, you can look for some other (better) CDN options, Like MaxCDN etc.
Any questions or queries regarding anything on MGeeky.com? We recommend you to join our facebook group and join the discussions there. You can also give us your feedback in the comments below. Join us on Facebook, Twitter and Google+ and spread the word if you liked our efforts.

Categories
Server Management Tips & Tricks

How to fix Not Found error on WordPress?

Not found 404 error is very common among wordpress users. Today I will discuss about the reasons and solution of this issue. As a wordpress user I understand how frustrating this can become if you don’t know how to fix this.

Reasons behind 404 Not Found error.

WordPress has a builtin permalink maker. Basically this error pops up when you change permalinks settings from Settings -> Permalinks. If you recently migrated your wordpress installation from 1 host to another, That can also be another reason of 404 not found error.

How to fix 404 not found error in wordpress

  • Login to your site’s wordpress dashboard.
  • Click on Settings -> Permalink and simply Click Save Settings. ( If change in permalink settings is the reason behind 404 not found error, You have to change it back to what it was before 404 )
  • This will Fix the error.

If the error still comes, Follow this guide.

  • Download and install Filezilla in your PC and Login using FTP details of your hosting.
  • Go to “public_html” folder.
  • Look for a file named “.htaccess” if it is not there, create one.
  • Set the permissions of .htaccess file as 755
  • Now you have to login to the dashboard and repeat the steps given above.

If you still have the same error, then you may need to contact your hosting provider. They can help you the best.

Likes it? share with others on social network and help us spread the word of awareness and knowledge. Join us at social network and don’t forget to provide feedback below

Categories
How to Server Management

How to test internet speed of Linux Server from CLI

Whether you get a VPS or a Dedicated Server, The main reason behind the buy is to run Webserver, FTP server, Database servers or simply to Download and Upload some big files to the Internet. The most important advantage of a VPS or a Dedicated Server is that it mostly had blazing faster internet than your home internet.

Today We’ll guide you how you can run a speedtest right from the Command Line Interface of your Linux Server. The process is very simple and requires only a couple of commands to be executed from SSH Client.

Prerequisite:

  1. A VPS or Dedicated Linux based server.
  2. Root access to your server
  3. SSH Client such as Putty
  4. 5 minutes of your time.

How to test internet speed of Linux Server from CLI:

  • First of all you have to login to your VPS as root using SSH Client.
  • Now we have to download a Speedtest python script from a URL. If you don’t know how to do this, Just run the following command and you would be good to go.
    wget https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py

 

  • Now we have to modify the permissions of the script which we just donwloaded, by running the following command.
    chmod a+rx speedtest_cli.py
  • Now we have to move the script to an executable location, Just execute the following command.
    mv speedtest_cli.py /usr/local/bin/speedtest-cl
  • Now we will set the owner of that script. Currently we are running the SSH as root so we’ll execute the following command to make root user owner of that script file.
    chown root:root /usr/local/bin/speedtest-cli
  • We’ve successfully installed the script and now we just have to run the testing script by executing the following command.
    speedtest-cli

 

How to test internet speed of Linux Server from CLI

  • If you want to share your Internet speed with your friends or with us in comments section. You have to run the following command.
    speedtest-cli --share

How to test internet speed of Linux Server from CLI

  • Simply share the link with your friends or in the comments to show your servers internet speed off. 🙂
  • If you want to run the Internet speed from a Speedtest server from any location around the globe. Run the following command and replace the “1767” with the ID of the server from the list given below.
    speedtest-cli --share --server=1767

How to test internet speed of Linux Server from CLI

If you find our guides helpful, Do join us on social networks and share this with your friends 🙂 Don’t forget to share your Server’s internet speed with us 🙂

 

Categories
Server Management

Benifitial uses of VPS, Buying guide.

In recent days, one of our Facebook group member requested for some details about VPS. What are beneficial uses of VPS? How to use a VPS in a beneficial way? Today we will tell you some of the uses of VPS.

VPS stands for Virtual Private Server. VPS is actually a Virtual Machine which runs in a datacenter. Now the datacenter could be in any country, but most of the Data Centers are deployed in USA, United Kingdom, European Countries and some of the other Developed countries around the globe.

You may also like:

  1. How to run Benchmarks in Linux VPS to check performance
  2. How to install VNC server in Ubuntu 14.04
  3. How to test internet speed of Linux Server from CLI

There are literally a lot of VPS providers now a days which are offering different Specs, Virtualization and Data center locations. There are some aspects that you should look, before buying a VPS.

Uses of VPS and Guide to buy a VPS:

First of all you should look for the Reputation of the VPS provider. There are a lot of forums where VPS users post their experiences with different VPS providers. Uptime guarantee is next this you should look for. Suppose, there is a VPS which claims 99% uptime guarantee. This means, your VPS will be offline for 3-4 days per year. Next you should look for the virtualization and What operating systems are allowed to be installed. At the end you should look for the Specs and the price.

What is virualization of a VPS?

Like I said before, VPS is a Virtual Machine. Every virtual machine in a server is called a “Container” in technical manner. The way you virtual machine is deployed with in the actual server, Is called virtualization of VPS. There are two usual types of virtualizations.

  • OpenVZ or OVZ
  • KVM

OpenVZ

This type of vitualization has some drawbacks in performance department. The main disadvantage of OVZ is that the provider can oversell containers. In other words, The specs of this type of VPS are shared among other VPS running on same machine. This type of virtualization does not support Windows. You can only install Linux distributions.

KVM

KVM virtualization on the other hand is more dedicated as compared to OVZ. All the specs promised are provided to you and no one else can use those resources. One thing to mention here is that, the Internet is shared in KVM also, just like OVZ. This type of container can have Windows installed in them, Only if the providers allows it.

To make this concept a little more clear, Let me give you an example. Suppose there is a Dedicated Server with 96GB of RAM, 2TB HDD and 10gbps link. If the provider decides to sell OVZ containers on the said Server, He can sale as many containers as he wants, with 1GB RAM and 20gb HDD. But If the virtualization is KVM, then the provider can only sell upto 96 containers with 1GB RAM. And that 1GB RAM would be all dedicated.

Some benefits of having a VPS

  • You can host your websites.
  • You can run many services on a VPS
    – Like you can have your own Proxy server
    – Host gaming servers
    – Download huge files in seconds (but in VPS, Not in your PC)
    – Quickly Download and upload huge files
    – and The VPS is running 24/7 so you can do your tasks on VPS without even thinking about a power cut.

Buy and access your VPS in minutes

You will need your credit card handy. Search for a VPS that suites you best. Buy it using your Credit card. Next you can do what ever you want to do with your VPS. You you login credentials are sent to you by email. You must have SSH client installed in your PC to access VPS.

If you are looking for a cheap but good VPS, You should check out Crissic solutions

Liked it? Share with others on social media. Show your feedback in Comments section and don’t forget to join us at Facebook, Twitter and Google+ Cheers 🙂

    Categories
    Server Management

    Advantages, Disadvantages of Unmanaged VPS

    VPS hosting is pretty much common now a days. Everything has its advantages and disadvantages in our lives, same goes with un-managed VPS Hosting. Today we’ll unfold the mystery and tell you what are the benefits and drawbacks of having an Un-managed VPS.

    Usually people think that VPS is only for bigger sites which has hundreds of thousands of hits per day. This perception is totally wrong. VPS stands for Virtual Private Server. Which means that you buy a Virtual Server which is all your’s.

    What is Virtual Private Server or VPS?

    Virtual Private server is a virtual machine which is running in a Hardware server. Hardware server is known as Dedicated server. A hardware server may run hundreds or even thousands of Virtual servers in it. This works almost same like a Virtual machine running in Virtual Box. There are different types of virtualizations in which VPS(s) are available. Like KVM, in-which the specs are not shared among other Virtual machines. OpenVZ or OVZ, in-which the specs are shared among other Virtual machines in the same server.

    There are two types of managing services are available for VPS.

    • Managed VPS
    • Un-Managed VPS

    Today we’re only going to talk about Un-Managed VPS.

    What is Unmanaged VPS?

    This type of VPS is not managed by the provider company. You are solely responsible for any error you face in the management of your VPS.

    Advantages of Unmanaged VPS

    1. UnManaged VPS are very cheap as compared to Managed VPS
    2. You can play with your VPS and run any number of services Technically allowed.
    3. You can re-install any OS in your VPS from within the allowed OS list.
    4. Unmanaged VPS is very good tool if you want to learn different OS(s).
    5. Downloading/Uploading any LEGAL digital content is allowed in VPS.
    6. You can install your personal VPN in UnManaged VPS.

    Disadvantages of Unmanaged VPS

    1. You have to buy/install Web Panel e.g CPanel if you don’t have much exposure to SSH Commands.
    2. Sometimes Troubleshooting an error can become a pain.
    3. You have to install, Manage and keep the software, installed on you VPS, if you want to be safe from potential security threat.
    4. You may face some downtime in case your VPS is not DDOS protected. Hackers may attack your server with a DDOS attack and your server provider may suspend your service.
    5. You may face some issues with Uptime of unmanaged VPS as unmanaged VPS is a cheaper VPS.
    6. If you are not a pro, you may have to hire a server manager who will want to be paid, obviously.

    Conclusion

    If you are an expert in server management, You can buy an unmanaged VPS without any problem. This may save you some bucks. Unmanaged VPS is also recommended for those who are looking for the best bang for the buck as unmanaged VPS are cheaper and allow you to run multiple services at once. UnManaged VPS are also good for all the learners and geeks out there.

    If you just want to host your sites, Peace of mind and don’t mind spending some extra money, Managed VPS is surely your way to go.

    Liked it? Share with others and help your loved ones find concise and complete information. Join us on Facebook, Twitter and Google+ Don’t forget to provide your feedback below. cheers 🙂

    Categories
    How to Server Management

    Disk Performance Test – Linux Server

    Today I will guide you how to Run Disk Performance Test on your Linux Server. This test is Important for checking the performance of any linux server or system you have just bought. I will check Hard Disk Performance of my Crissic VPS in this guide.

    Recently I bought a Cheap VPS in Los Angeles from them. The basic requirements, to conduct this Disk Performance test, are listed below.

    • Root access to you Linux VPS.
    • A couple of minutes from your time.

    Why Disk Performance test is Important?

    Mostly Linux Operating System is used in Online Servers because of the redundancy of the Operating System. When you buy a Linux based server, one of the most important factor of the server performance is Disk Performance. Whether it you server is SSD based, is a SSD-Cached server or a Server with SATA Hard Disk Drive. Disk Performance test will show you how much I/O speed and performance your server is capable of.

    How much Disk Performance is good?

    I have found a formula which is totally self-made by me and totally unofficial. The formula is If you own a HDD VPS and you have tested Disk Performance the result anything above 50MB/s is pretty much OK but If you own a SSD-Cached or SSD based Server The speed must be above 100MB/s. Anything below 100MB/s is not acceptable.

    How to Run Disk Performance Test

    Disk performance test in linux is performed by executing a built-in command, called dd. This command will need some more perameters to check I/O speed of Linux Server. The command is listed below, you just have to execute the following command in SSH and it will run a quick I/O test.

    dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
    If you have found our efforts helpful and they have worked for you, share with other over the social Networks. Also join us on Facebook, Twitter, Google+. Don’t forget to provide your feedback, we appreciate that.
    Categories
    How to Server Management

    How to Install VNC server on Ubuntu 14.04

    Installing VNC server on Ubuntu can become a little tricky sometimes. Recently I purchased a budget VPS for playing and making guides for Mgeeky.com server management section. Today I will show you how you can Install VNC server on you Ubuntu 14.04 VPS. For this process I am using Ubuntu 14.04 x64 Minimal.

    What is VNC?

    VNC stands for Virtual Network Computing, VNC is used to add Graphical User Interface is the Operating Systems that do not have it by default. VNC communication requires a VNC Server listening on a special Port, Desktop Environment and a VNC Viewer a.k.a Client.

    How to Install VNC Server on Ubuntu 14.04?

    This guide consists on several steps which include

    1. Accessing your Server via SSH
    2. Installing VNC Server and Desktop Environment
    3. Configuring VNC Server
    4. Creating a VNC service File
    5. Starting VNC server
    6. Accessing you VNC Server using VNC Viewer

    Step 1: Accessing your Server via SSH

    This step is pretty simple and most of you may be already familiar with this, but for those who are not, You have to access your Server using SSH Client, Such as Putty for Windows. Just insert the IP address of your server and click “Connect”. You will be asked for username, type “root”, without quotes and press Enter. Next, You need to enter the root password which you received from your server company, via E-Mail.

    Once you are logged in, Proceed to next Step.

    Step 2: Installing VNC Server and Desktop Environment

    In this step we’ll execute a couple of commands which you have to copy and paste ( Right Click if you are using putty ) and you’ll be good to go.

    First of all we’ll update the packages of Ubuntu using the following command.

    apt-get update

    Next we’ll install Desktop Environment packages and VNC server packages.

    apt-get install xfce4 xfce4-goodies tightvncserver

    Now We’ve to start VNC server and set a secure Password for VNC viewer. Run the following command and you would be asked for a password.

    vncserver

    Now add a secure password that you’ll need while accessing VNC.

    Step 3 : Configuring VNC Server

    In step 2, We started VNC server by typing vncserver command only for setting the Password. Now we have to stop the VNC server to configure it. Without stopping vncserver, configuring it is impossible. So, Just paste the following command to stop vncserver.

    vncserver -kill :1

    After stopping vncserver, We’ll backup xstartup file. xstartup file tells the VNC Server that what it needs to start when the vncserver starts. Paste the following command in SSH client.

    mv ~/.vnc/xstartup ~/.vnc/xstartup.bak

    After backing up the xstartup file, You just have to make another xtartup file and add some lines of code in this file. For this purpose I am uning nano editor, If you don’t have nano you can get it by executing

    apt-get install nano

    Now edit xtartup file using nano:

    nano ~/.vnc/xstartup

    Insert the following commands in the xstartup file and save it using ctrl+o.

    #!/bin/sh
    
    xrdb $HOME/.Xresources
    xsetroot -solid grey
    #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
    #x-window-manager &
    # Fix to make GNOME work
    export XKL_XMODMAP_DISABLE=1
    /etc/X11/Xsession

    Next we have to make the xstartup file file executable,

    chmod +x ~/.vnc/xstartup

     Step 4: Creating a VNC service File

    Creating VNC service file is recommended. This step add vncserver as a service in Ubuntu. You can start, Stop or Restart anytime, If you create a VNC service file. To do this you have to make a file named vncserver in /etc/init.d/

    nano /etc/init.d/vncserver

    This will open a text editor and you’ll be able to add commands in it. just copy and paste the following code in it and you’ll be good to go.

    #!/bin/bash
    PATH="$PATH:/usr/bin/"
    export USER="user"
    DISPLAY="1"
    DEPTH="16"
    GEOMETRY="1024x768"
    OPTIONS="-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY} -localhost"
    . /lib/lsb/init-functions
    case "$1" in
    start)
    log_action_begin_msg "Starting vncserver for user '${USER}' on localhost:${DISPLAY}"
    su ${USER} -c "/usr/bin/vncserver ${OPTIONS}"
    ;;
    stop)
    log_action_begin_msg "Stopping vncserver for user '${USER}' on localhost:${DISPLAY}"
    su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}"
    ;;
    restart)
    $0 stop
    $0 start
    ;;
    esac
    exit 0

    Now we have to make this file executable by executing this command in SSH client.

    chmod +x /etc/init.d/vncserver

    Now you can start vncserver as a service by running the following command

    service vncserver start

     Step 5 : Starting VNC server

    This step is a little tricky as you have to replace some words with actual values. This step will start the VNC Server and you would be able to access it using any VNC Viewer.

    ssh -L 5901:127.0.0.1:5901 -N -f -l  USER SERVER_IP

    Don’t forget to replace USER with actual user that you want the VNC server to work as, and SERVER_IP with the actual IP Address of your server.

    Step 6 : Accessing VNC Server using VNC Viewer

    This step is very simple. Just install any VNC Viewer, I am using UltraVNC, Start the VNC Viewer and enter your server’s IP Address followed by the port number which is :1  and hit connect. It will ask you for the password that you entered in Step 2.

    If you like our guides, do share this with your friends and others. Join us on Social Media and also Don’t forget to provide your feedback. Cheers 🙂

    Categories
    How to Server Management

    How to install WordPress in Vesta Control Panel

    Recently I wrote a step by step guide for How to install Vesta Control Panel in CentOS 6 and How to do basic setup and add a website/domain in Vesta Control Panel. Now I am going to guide you how to install WordPress on VPS with Vesta Control Panel. This guide is very easy and short. I personally like Vesta Panel because of its simplicity and snappiness. Although it lacks some of the main features like File Manager, but it is a Good alternative to CPanel.

    The VPS I am using is running CentOS 6.5 (64-bit) if you are curious. but it should work on all Linux distributions supported by Vesta Control Panel which are CentOS and Debian.

    Installing WordPress in Vesta Control Panel

    1. Login to you VPS using SSH/Putty as ‘root’.
      How to install WordPress in Vesta Control Panel
    2. Install nano installer by executing the following command, If you already have nano editor installed, Skip to next step.
      yum -y install nano
    3. Navigate to public_html folder of the domain in which you want to install wordpress. If you haven’t added any domain yet, here is a guide stating how to add a domain in Vesta Control Panel. The public_html folder is in the following directory
      /home/UserName/web/YourDomain/public_html/
      Change the “UserName” with your username of Vesta Panel and “YourDomain” with the domain you on which you want wordpress

      cd /home/admin/web/mgeeky.com/public_html/

      How to install WordPress in Vesta Control Panel

    4. If everything goes well you’ll be there in public_html folder, Just execute the following command and this will download the latest version of WordPress in zip file.
      wget http://wordpress.org/latest.zip

      How to install WordPress in Vesta Control Panel

    5. Now just unzip the latest.zip file by executing the following command
      unzip latest.zip

      How-to-install-WordPress-in-Vesta-Control-Panel

    6. After executing the above command, all WordPress files should be extracted in a wordpress folder in public_html. Execute the following 2 commands to move all wordpress files in public_html
      cd wordpress
      mv * ..

      How to install WordPress in Vesta Control Panel22

    7. This step is optional, after moving all files from wordpress folder, there would be an empty folder named as “wordpress”. you can leave this foder or remove this by executing the following command.
      rmdir wordpress
    8. Vesta Control panel itself adds a index.html file in public_html folder of every new domain, It is recommended that you remove that index.html file by executing the following command
      rm index.html

      How to install WordPress in Vesta Control Panel22

    9. Now you have to edit wp-config.php file. I am assuming you have installed nano editor so I am using this command
      mv wp-config-sample.php wp-config.php
      nano wp-config.php

      How to install WordPress in Vesta Control Panel22

    10. Replace database_name_here with your actual database name, username_here with your database username, password_here with password of your database username
      After that press ctrl+o and Exit the editor by pressing Ctrl+x.
    11. Open your web browser and visit your the domain name and you’ll be greeted by the the basic setup screen of WordPress.
      How to install WordPress in Vesta Control Panel22
    12. Once done filling the form, You’ll have wordpress install on a VPS running Vesta Control Panel.