How to Mount Windows Partitions in Ubuntu

If you are running a dual-boot of Ubuntu and Windows, sometimes you might fail to access a Windows partition (formatted with NTFS or FAT32 filesystem type), while using Ubuntu, after hibernating Windows (or when it’s not fully shutdown).

This is because, Linux cannot mount and open hibernated Windows partitions (the full discussion of this is beyond the ambit of this article).

In this article, we will simply show how to mount Windows partition in Ubuntu. We will explain a few useful methods of solving the above issue.

Mount Windows Using the File Manager

The first and safest way is to boot into Windows and fully shutdown the system. Once you have done that, power on the machine and select Ubuntu kernel from the grub menu to boot into Ubuntu.

After a successful logon, open your file manager, and from the left pane, find the partition you wish to mount (under Devices) and click on it. It should be automatically mounted and its contents will show up in the main pane.

Mounted Windows Partition

Mounted Windows Partition

Mount Windows Partition in Read Only Mode From Terminal

The second method is to manually mount the filesystem in read only mode. Usually, all mounted filesystems are located under the directory /media/$USERNAME/.

Ensure that you have a mount point in that directory for the Windows partition (in this example, $USERNAME=aaronkilik and the Windows partition is mounted to a directory called WIN_PART, a name which corresponds to the device label):

$ cd /media/aaronkilik/
$ ls -l

List Mounted Partitions

List Mounted Partitions

In case the mount point is missing, create it using the mkdir command as shown (if you get “permission denied” errors, use sudo command to gain root privileges):

$ sudo mkdir /media/aaronkilik/WIN_PART

To find the device name, list all block devices attached to the system using the lsblk utility.

$ lsblk

List Block Devices

List Block Devices

Then mount the partition (/dev/sdb1 in this case) in read-only mode to the above directory as shown.

$ sudo mount -t vfat -o ro /dev/sdb1 /media/aaronkilik/WIN_PART		#fat32
OR
$ sudo mount -t ntfs-3g -o ro /dev/sdb1 /media/aaronkilik/WIN_PART	#ntfs

Now to get mount details (mount point, options etc..) of the device, run the mount command without any options and pipe its output to grep command.

$ mount | grep "sdb1" 

List Windows Partition

List Windows Partition

After successfully mounting the device, you can access files on your Windows partition using any applications in Ubuntu. But, remember that, because the device is mounted as read-only, you will not be able to write to the partition or modify any files.

Also note that if Windows is in a hibernated state, if you write to or modify files in the Windows partition from Ubuntu, all your changes will be lost after a reboot.

For more information, refer to the Ubuntu community help wiki: Mounting Windows Partitions.

That’s all! In this article, we have shown how to mount Windows partition in Ubuntu. Use the feedback form below to reach us for any questions if you face any unique challenges or for any comments.

Source

How to Install Ubuntu 18.04 Alongside With Windows

This tutorial describes the installation process of the latest release of Ubuntu Desktop 18.04, codename Bionic Beaver, on a dedicated machine or a virtual machine alongside a pre-installed Windows 10 Operating System. The installation process can be done via the Ubuntu Desktop DVD ISO image or via a bootable Ubuntu USBdrive.

The Ubuntu Bionic OS will be installed on a UEFI motherboard with Legacy Mode or CSM (Compatibility Support Module) option disabled.

Requirements

  1. Download Ubuntu Desktop 18.04 ISO image for x86_64bit architecture.
  2. A direct or a proxy internet connection.
  3. Rufus utility in order to create an Ubuntu Desktop bootable USB drive compatible with UEFI motherboards.

Create Free Space on Windows for Ubuntu Install

On a pre-installed machine with a single Windows 10 partition, you need to create some free space in Windowspartition in order to install Ubuntu 18.04.

First login to the system using an account with administrator privileges, open a Command Prompt window with admin rights and execute diskmgmt.msc command to open Disk Management utility.

diskmgmt.msc

Select the Windows partition, usually C: volume, right click on this partition and select Shrink Volume option in order to reduce the partition size.

Windows Disk Management Utility

Windows Disk Management Utility

Wait for the system to collect partition size data, add the desired amount of space you want to shrink and hit in Shrink button. After the shrink process completes, a new unallocated space will be present in your drive. We’ll use this free space to install Ubuntu alongside Windows 10.

New Windows Partition for Ubuntu Install

New Windows Partition for Ubuntu Install

Install Ubuntu 18.4 Alongside with Windows

On the next step, place Ubuntu Desktop DVD ISO image or the bootable USB stick into the appropriate motherboard drive and, reboot the machine and hit the appropriate bootable key ((usually F12F10 or F2) in order to boot the Ubuntu installer DVD or USB bootable image.

On the first installation screen select Install Ubuntu and hit Enter key to start the installation process.

Select Install Ubuntu

Select Install Ubuntu

In the ”Welcome” screen, select your installation language and hit on Continue button.

Select Ubuntu Installation Language

Select Ubuntu Installation Language

On the next screen, select the keyboard layout for your system and hit on Continue button.

Select Ubuntu Keyboard Layout

Select Ubuntu Keyboard Layout

In the next installation screen, choose Normal installation and hit on Continue button. In this screen you also have the option to perform a Minimal installation of Ubuntu Desktop, which includes only some basic system utilities and a web browser.

You can also turn off Secure Boot option, if this option is enabled in motherboard UEFI settings in order to install third-party software for graphic card, Wi-Fi or additional media formats. Be aware that turning off Secure Boot option requires a password.

Select Ubuntu Install Type

Select Ubuntu Install Type

Next, In Installation type menu, choose Something else option in order to manually partition the hard disk and hit on Continue button.

Ubuntu Manual Partition

Ubuntu Manual Partition

In hard disk partition table menu, select the hard drive free space and hit on + button in order to create the Ubuntu partition.

Select Ubuntu Install Drive

Select Ubuntu Install Drive

In the partition pop-up window, add the size of the partition in MB, choose the partition type as Primary and the partition location at the Beginning of this space.

Next, format this partition with ext4 filesystem and use / as partition mount point. The /(root) partition summary is described below:

  • Size = minimum 30000 MB recommended
  • Type for the new partition = Primary
  • Location for the new partition = Beginning of this space
  • Use as = EXT4 journaling file system
  • Mount point = /

Create Ubuntu Root Partition

Create Ubuntu Root Partition

After completing this step, hit on OK button to return to disk utility. Other partitions, such as /home or Swap are optional in Ubuntu Desktop and should be created only for special purposes.

However, if you still want to add a home partition, select free space, hit on + button and use the below scheme to create the partition.

  • Size = size allocated as per your requirements, depending on the size of remaining disk free space
  • Type for the new partition = Primary
  • Location for the new partition = Beginning
  • Use as = EXT4 journaling file system
  • Mount point = /home

In this guide we’ll install Ubuntu alongside Windows 10 with only the /(root) partition set. After you’ve created the required root partition on the disk, select Windows boot Manager as device for the boot loader installation and hit on Install Now button.

Select Ubuntu Boot Manager

Select Ubuntu Boot Manager

In the pop-up window, hit on Continue button in order to commit the changes that will be written to disk and start the installation.

Confirm Ubuntu Partition ChangesConfirm Ubuntu Partition Changes

Confirm Ubuntu Partition Changes

On the next screen, select your location from the provided map and hit on Continue button.

Select Your Country Location

Select Your Country Location

Next, insert your name, the name of your desktop, a username with a strong password and choose the option with ‘Require my password to log in’. When you finish, hit on Continue button and wait for the installation process to complete.

Create Ubuntu User Account

Create Ubuntu User Account

During the installation process, a series of screens which describe Ubuntu Desktop and the installation progress bar will be displayed on your screen. You cannot interfere with the installation process in this final stage.

Ubuntu Installation Progress

Ubuntu Installation Progress

After the installation completes, eject the installation medium and hit on Restart now button in order to reboot the machine.

Ubuntu Installation Finishes

Ubuntu Installation Finishes

After reboot, the system should boot into GNU GRUB menu. In case the GRUB menu is not displayed, restart the machine, go to motherboard UEFI settings and change boot order or Boot Options -> BBS priority.

The settings to enable GRUB menu highly depends on your machine motherboard UEFI settings. You should consult motherboard documentation in order to identify the settings that need to be changed in order to display GRUB menu.

Ubuntu Boot Grub Menu

Ubuntu Boot Grub Menu

Finally, login to Ubuntu 18.04 Desktop with the credentials configured while installing the system and follow the initial Ubuntu welcome screen in order to start using Ubuntu Desktop.

Ubuntu Login Screen

Ubuntu Login Screen

Ubuntu New Features

Ubuntu New Features

Congratulations! You have successfully installed Ubuntu 18.04 Bionic Desktop alongside Windows 10 on your machine.

Source

Install WordPress with Nginx, MariaDB 10 and PHP 7 on Ubuntu 18.04

WordPress 5 recently released with some core changes, such as the Gutenberg editor. Many of our readers might want to test it on their own server. For those of you, in this tutorial we are going to setup WordPress 5with LEMP on Ubuntu 18.04.

Read AlsoInstall WordPress with Nginx, MariaDB 10 and PHP 7 on Debian 9

For people who are not aware, LEMP is a popular combination of LinuxNginxMySQL/MariaDB and PHP.

Requirements

  1. A dedicated server or a VPS (Virtual Private Server) with Ubuntu 18.04 minimal installation.

This tutorial will guide you through the installation of all the required packages, creating your own database, preparing vhost and completing the WordPress installation via browser.

Installing Nginx Web Server on Ubuntu 18.04

First we will prepare our web server Nginx. To install the package, run the following command:

$ sudo apt update && sudo apt upgrade
$ sudo apt install nginx

To start the nginx service and automatically start it upon system boot, run the following commands:

$ sudo systemctl start nginx.service
$ sudo systemctl enable nginx.service

Creating Vhost for WordPress Website on Nginx

Now we will create vhost for our WordPress website. Create the following file using your favorite text editor:

$ sudo vim /etc/nginx/sites-available/wordpress.conf

In the example below, change example.com with the domain you wish to use:

server {
    listen 80;
    listen [::]:80;
    root /var/www/html/wordpress;
    index  index.php index.html index.htm;
    server_name example.com www.example.com;

     client_max_body_size 100M;

    location / {
        try_files $uri $uri/ /index.php?$args;        
    }

    location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass             unix:/var/run/php/php7.2-fpm.sock;
    fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}

Save the file and exit. Then enable the site with:

$ sudo ln -s /etc/nginx/sites-available/wordpress.conf  /etc/nginx/sites-enabled/

Then reload nginx with:

$ sudo systemctl reload nginx 

Installing MariaDB 10 on Ubuntu 18.04

We will use MariaDB for our WordPress database. To install MariaDB run the following command:

$ sudo apt install mariadb-server mariadb-client

Once the installation is complete, we will start it and configure it to start automatically on system boot:

$ sudo systemctl start mariadb.service
$ sudo systemctl enable mariadb.service

Next secure your MariaDB installation by running the following command:

$ sudo mysql_secure_installation

Simply answer the questions in the prompt to complete the task.

Creating WordPress Database for Website

After that we will prepare the database, database user and password for that user. They will be used by our WordPress application so it can connect to the MySQL server.

$ sudo mysql -u root -p

With the commands below, we will first create database, then a database user and its password. Then we will grant the user privileges to that database.

CREATE DATABASE wordpress;
CREATE USER 'wp_user'@'localhost' IDENTIFIED BY ‘secure_password’;
GRANT ALL ON wordpress.* TO 'wp_user'@'localhost' ;
FLUSH PRIVILEGES;
EXIT;

Installing PHP 7 on Ubuntu 18.04

Since WordPress is application written in PHP, we will install PHP and the required PHP packages to run WordPress, use the command below:

$ sudo apt install php-fpm php-common php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-mysql php-cli php-ldap php-zip php-curl

Once the install is complete, we will start the php-fpm service and enable it:

$ sudo systemctl start php7.2-fpm
$ systemctl enable php7.2-fpm

Installing WordPress 5 on Ubuntu 18.04

From this point on, starts the easy part. Download the latest WordPress package with the following wget command:

$ cd /tmp && wget http://wordpress.org/latest.tar.gz

Then extract the archive with:

$ sudo tar -xvzf latest.tar.gz -C /var/www/html

The above will create our document root that we have set in the vhost which is /var/www/html/wordpress. We will then need to change the ownership of the files and folders within that directory with:

$ sudo chown www-data: /var/www/html/wordpress/ -R

Now we are ready to run the installation of our WordPress. If you have used unregistered/non-existing domain, you can configure your hosts /etc/hosts file with the following record:

192.168.1.100 example.com

Presuming that your server’s IP address is 192.168.1.100 and that the domain you are using is example.comThat way your computer will resolve example.com on the given IP address.

Now load your domain into a browser, you should see the WordPress installation page:

Select WordPress Install Language

Select WordPress Install Language

On the next page input the database credentials that we have setup earlier:

WordPress Database Settings

WordPress Database Settings

Submit the form and on the next screen configure your website title, admin user and email:

WordPress Website Setup

WordPress Website Setup

Your installation is now complete and you can start managing your WordPress website. You can start by installing some fresh new theme or extending the site functionality via plugins.

Conclusion

That was it. The process of setting up your own WordPress installation on Ubuntu 18.04. I hope the process was easy and straightforward.

Source

How to Install WordPress 5 On Ubuntu 16.10/16.04 Using LAMP Stack

For those who cannot afford the hustles of developing websites from scratch, there are now several content management systems (CMSs) such as WordPress that you can take advantage of to setup blogs as well as complete websites with a few clicks.

WordPress is a powerful, free and open-source, highly pluggable and customizable CMS that is being used by millions around the world to run blogs and fully functional websites.

It is easy to install and learn, especially for persons who do not have prior website design and development knowledge. With millions of plugins and themes available, developed by an active and dedicated community of fellow users and developers, that you can utilize to tailor your blog or website to work and look just the way you want.

Suggested Read: How to Setup WordPress with LAMP + Postfix as Send-Only Mail Notifications

Requirements:

  1. A dedicated VPS with a registered domain name, I suggest you to go for Bluehost hosting, which offers 50%off, one Free Domain name and Free SSL.

In this post, we shall run through the various steps you can follow, to install the latest version of WordPress 5.3on Ubuntu 18.10-18.04Ubuntu 16.10-16.04 and Linux Mint 18-19 with LAMP (LinuxApacheMySQL and PHP) stack.

Install LAMP on Ubuntu and Linux Mint

First, we shall uncover the various steps for installation of LAMP stack before progressing to install WordPress.

Step 1: Install Apache Web Server

To install Apache web server, issue the command below:

$ sudo apt-get install apache2 apache2-utils 

We need to enable Apache2 web server to start at system boot time, as well start the service as follows:

$ sudo systemctl enable apache2
$ sudo systemctl start apache2

To test whether the server is running, open your web browser and enter http://server_address. The Apache2 default index page will be displayed in case the web server is up and running.

Apache Default Page Under Ubuntu 16.04

Apache Default Page Under Ubuntu 16.04

Note: The Apache default root directory is /var/www/html, all your web files will be stored in this directory.

Step 2: Install MySQL Database Server

Next, we need to install MySQL database server by running the command below:

$ sudo apt-get install mysql-client mysql-server

If you want to install MariaDB, you can install it using following command.

$ sudo apt-get install mariadb-server mariadb-client

During the package installation, you will be prompted to set the root user password for mysql as seen in the image below. Choose a good and secure password, then hit the OK button twice to proceed further.

Set MySQL root Password

Set MySQL root Password

The database server deployment is not yet secure, for this reason, issue the following command to harden it’s security:

$ sudo mysql_secure_installation 

Firstly, you will be asked to install the ‘validate_password’ plugin, so type in Y/Yes and press Enter, and also choose the default password strength level. On my system, I already installed it.

Importantly, if you do not want to change the root password, then type N/No when prompted to do so. Answer Y/Yes for the rest of the subsequent questions.

Step 3: Install PHP and Modules

Last but not least, we shall install PHP and a few modules for it to work with the web and database servers using the command below:

$ sudo apt-get install php7.0 php7.0-mysql libapache2-mod-php7.0 php7.0-cli php7.0-cgi php7.0-gd  

Furthermore, to test if php is working in collaboration with the web server, we need to create a info.php file inside /var/www/html.

$ sudo vi /var/www/html/info.php

And paste the code below into the file, save it and exit.

<?php 
phpinfo();
?>

When that is done, open your web browser and type in the this address http://server_address/info.php. You should be able to view the php info page below as a confirmation.

PHP 7.0 Information

PHP 7.0 Information

Step 4: Install WordPress CMS

Download the latest WordPress package and extract it by issuing the commands below on the terminal:

$ wget -c http://wordpress.org/latest.tar.gz
$ tar -xzvf latest.tar.gz

Then move the WordPress files from the extracted folder to the Apache default root directory, /var/www/html/:

$ sudo rsync -av wordpress/* /var/www/html/

Next, set the correct permissions on the website directory, that is give ownership of the WordPress files to the web server as follows:

$ sudo chown -R www-data:www-data /var/www/html/
$ sudo chmod -R 755 /var/www/html/

Step 5: Create WordPress Database

Execute the command below and provide the root user password, then hit Enter to move to the mysql shell:

$ mysql -u root -p 

At the mysql shell, type the following commands, pressing Enter after each line of a mysql command. Remember to use your own, valid values for database_namedatabaseuser, and also use a strong and secure password as databaseuser_password:

mysql> CREATE DATABASE wp_myblog;
mysql> GRANT ALL PRIVILEGES ON wp_myblog.* TO 'your_username_here'@'localhost' IDENTIFIED BY 'your_chosen_password_here';
mysql> FLUSH PRIVILEGES;
mysql> EXIT;

Go the /var/www/html/ directory and rename existing wp-config-sample.php to wp-config.php:

$ sudo mv wp-config-sample.php wp-config.php

then update it with your database information under the MySQL settings section (refer to the highlighted boxes in the image below):

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here'); /** MySQL database username */ define('DB_USER', 'username_here'); /** MySQL database password */ define('DB_PASSWORD', 'password_here'); /** MySQL hostname */ define('DB_HOST', 'localhost'); /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8'); /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', '');

Afterwards, restart the web server and mysql service using the commands below:

$ sudo systemctl restart apache2.service 
$ sudo systemctl restart mysql.service 

Open your web browser, then enter your server address: http://server-address to get the welcome page below. Read through the page and click on “Let’s go!” to proceed further and fill all requested on screen information .

WordPress Installation Wizard

WordPress Installation Wizard

Hoping that everything went on just fine, you can now enjoy WordPress on your system. However, to express any concerns or ask questions concerning the steps above or even provide additional information that you think has not been included in this tutorial, you can use the feedback section below to get back to us.

Source

How to Install WordPress with LSCache, OpenLiteSpeed and CyberPanel

OpenLiteSpeed is a high-performance event-driven open source web server developed and maintained by LiteSpeed Technologies. In this article, we will see how we can use CyberPanel to get up and running with LSCache and WordPress on OpenLiteSpeed in few clicks.

What is LSCache?

LSCache is a full-page cache built directly into OpenLiteSpeed web server, it is similar to Varnish but more efficient because we remove the reverse proxy layer from the picture when LSCache is used.

LSCache WordPress Plugin!

LiteSpeed has also developed a WordPress plugin that communicates with OpenLiteSpeed web server to cache the dynamic content which greatly reduces the load time, increases performance and puts less load on your server.

LiteSpeed’s plugin provides powerful cache-management tools that, due to LSCache’s tight integration into the server, are impossible for other plugins to replicate. These include tag-based smart purging of the cache, and the ability to cache multiple versions of generated content based on criteria such as mobile vs. desktop, geography, and currency.

LSCache has the ability to cache personalized copies of a page, which means that caching can be extended to include logged-in users. Pages that are publicly uncacheable may be cached privately.

In addition to LSCache’s advanced cache-management capabilities, the WordPress plugin also provides additional optimization functionality such as CSS/JS minification and combination, HTTP/2 Push, lazy load for images and iframes, and database optimization.

What is CyberPanel?

CyberPanel is a control panel on top of OpenLiteSpeed, you can use it to create websites and install WordPress with one click.

It also features:

  • FTP
  • DNS
  • Email
  • Multiple PHPs

In this article, we will see how we can efficiently make use of all of these technologies to get up and running in no time.

Step 1: Install CyberPanel – ControlPanel

1. The first step is to install CyberPanel, you can use the following commands to install CyberPanel on your Centos 7 VPS or dedicated server.

# wget http://cyberpanel.net/install.tar.gz
# tar zxf install.tar.gz
# cd install
# chmod +x install.py
# python install.py [IP Address]

After successful CyberPanel installation, you will get login credentials as shown below.

###################################################################
                CyberPanel Successfully Installed                  
                                                                   
                                                                   
                                                                   
                Visit: https://192.168.0.104:8090                
                Username: admin                                    
                Password: 1234567                                  
###################################################################

2. Now login into CyberPanel using above credentials.

CyberPanel Login

CyberPanel Login

Cyber Panel Dashboard

Cyber Panel Dashboard

Step 2: Install WordPress in CyberPanel

3. To setup WordPress with LSCache, first we need to create a website by going to Main > Websites > Create Website section and fill out all details as shown.

Create Website in CyberPanel

Create Website in CyberPanel

4. Now go to Main > Websites > List Websites section, click on Launch icon to launch the website panel, so that WordPress can be installed.

List Websites

List Websites

Once the website panel is launched you will have the following options on your screen:

Website Information

Website Information

5. On this window, open File Manager and delete everything from the public_html folder. Now scroll down to the bottom and you will see a tab which says WordPress with LS Cache.

Install WordPress with LSCache

Install WordPress with LSCache

6. In the path box do not enter anything if you want WordPress to be installed in the website document root. If you enter any path it will be relative to the website home directory.

For example, if you enter wordpress, your WordPress installation directory will be tecmint.com/wordpress.

7. Once you click on “Install WordPress“, CyberPanel will download WordPress and LSCache, create the database, and setup a WordPress site. Once CyberPanel is finished installing WordPress you will need to visit your website domain to configure your website.

WordPress Installation Completed

WordPress Installation Completed

In this example we’ve used tecmint.com, so we will visit this domain to configure our site. These are very basic settings and you can follow the onscreen instructions to complete your configurations.

Step 3: Activate LiteSpeed Cache Plugin

8. Once WordPress is installed, you can login to the dashboard at https://tecmint.com/wp-admin. It will ask for the username/password combination that you set up during wordpress configuration.

Activate LSCache on WordPress

Activate LSCache on WordPress

The LSCache plugin is already installed, so you just need to go into Installed Plugins in your WordPress dashboard and activate it.

9. Now verify LSCache by going to example.com and see your responce headers will look something like.

Check LSCache Headers

Check LSCache Headers

You can see that this page is now served from cache and the request didn’t hit the backend at all.

Step 4: Advance LiteSpeed Cache Options

  • Purge Cache – If for some reason you want to purge the cache you can do so via the LSCache. On this page you have numerous ways to purge the cache.

LSCache Purge

LSCache Purge

Minify, Combine, and HTTP/2 Push

  • Minification – When code is minified, all unnecessary whitespace characters, newline characters, and comments are removed. This shrinks the size of the source code.
  • Combination – When a website includes several JavaScript (or CSS) files, those files may be combined into one. This reduces the number of requests made by the browser and, if there was duplicate code, it is removed.
  • HTTP/2 Push – This functionality allows the server to anticipate the browser’s needs and act upon them. One example: when serving index.html, HTTP/2 can reasonably assume that the browser also wants the included CSS and JS files, and will push them, too, without being asked.

All of the above measures give OpenLiteSpeed the ability to serve content faster. These settings can be found in the LiteSpeed Cache settings page under the Optimize tab, and they are all disabled by default. Press the ONbutton next to each setting that you’d like to enable.

It is possible to exclude some CSS, JS, and HTML from being minified or combined. Enter the URLs to these resources in the appropriate boxes, one per line, to exclude them.

Step 5: Change Default PHP and Install Extensions

10. If, for some reason, you need to change the PHP version for your WordPress website you can do so via CyberPanel:

Change PHP Version

Change PHP Version

11. Some additional WordPress plugins may require you to install additional PHP extensions, or you may want to add Redis to WordPress. You can install missing extensions via CyberPanel from the Server > PHP > Install Extensions tab.

First select the PHP version from the drop down for which you want to install the extension. In the search box, enter the extension name, and finally click Install to install the missing extension.

Install PHP Extensions

Install PHP Extensions

For more information read CyberPanel and OpenLiteSpeed Documentation.

Source

WPSeku – A Vulnerability Scanner to Find Security Issues in WordPress

WordPress is a free and open-source, highly customizable content management system (CMS) that is being used by millions around the world to run blogs and fully functional websites. Because it is the most used CMS out there, there are so many potential WordPress security issues/vulnerabilities to be concerned about.

However, these security issues can be dealt with, if we follow common WordPress security best practices. In this article, we will show you how to use WPSeku, a WordPress vulnerability scanner in Linux, that can be used to find security holes in your WordPress installation and block potential threats.

WPSeku is a simple WordPress vulnerability scanner written using Python, it can be used to scan local and remote WordPress installations to find security issues.

How to Install WPSeku – WordPress Vulnerability Scanner in Linux

To install WPSeku in Linux, you need to clone the most recent version of WPSeku from its Github repository as shown.

$ cd ~
$ git clone https://github.com/m4ll0k/WPSeku

Once you have obtained it, move into the WPSeku directory and run it as follows.

$ cd WPSeku

Now run the WPSeku using the -u option to specify your WordPress installation URL like this.

$ ./wpseku.py -u http://yourdomain.com 

WordPress Vulnerability Scanner

WordPress Vulnerability Scanner

The command below will search for cross site scripting, local file inclusion, and SQL injection vulnerabilities in your WordPress plugins using the -p option, you need to specify the location of plugins in the URL:

$ ./wpseku.py -u http://yourdomain.com/wp-content/plugins/wp/wp.php?id= -p [x,l,s]

The following command will execute a brute force password login and password login via XML-RPC using the option -b. Also, you can set a username and wordlist using the --user and --wordlist options respectively as shown below.

$ ./wpseku.py -u http://yourdomian.com --user username --wordlist wordlist.txt -b [l,x]   

To view all WPSeku usage options, type.

$ ./wpseku.py --help

WPSeku WordPress Vulnerability Scanner Help

WPSeku WordPress Vulnerability Scanner Help

WPSeku Github repository: https://github.com/m4ll0k/WPSeku

That’s it! In this article, we showed you how to get and use WPSeku for WordPress vulnerability scanning in Linux. WordPress is secure but only if we follow WordPress security best practices. Do you have any thoughts to share? If yes, then use the comment section below.

Source

Nikto – A Web Application Vulnerability and CGI Scanner for Web Servers

Nikto Web Scanner is an another good to have tool for any Linux administrator’s arsenal. It’s an Open source web scanner released under the GPL license, which is used to perform comprehensive tests on Web servers for multiple items including over 6500 potentially dangerous files/CGIs.

Suggested Read: WPSeku – A Vulnerability Scanner to Find Security Issues in WordPress

It’s written by Chris Solo and David Lodge for Vulnerability assessment, it checks for outdated versions over 1250 Web servers and over 270 version specific problems. It also scans and reports for outdated web server software and plugins.

Features of Nikto Web Scanner

  1. Supports SSL
  2. Supports full HTTP proxy
  3. Supports text, HTML, XML and CSV to save reports.
  4. Scan for multiple ports
  5. Can scan on multiple servers by taking inputs from files like nmap output
  6. Support LibWhisker IDS
  7. Capable enough to identify installed software with headers, files, and favicons
  8. Logs for Metasploits
  9. Reports for “unusual ” headers.
  10. Apache and cgiwrap user enumeration
  11. Authenticate hosts with Basic and NTLM
  12. Scans can be Auto-paused at a specified time.

Nikto Requirements

A system with basic PerlPerl ModulesOpenSSL installation should enable Nikto to run. It has been thoroughly tested on WindowsMac OSX and various Unix/Linux distributions such as Red HatDebianUbuntuBackTrack, etc.

Installation of Nikto Web Scanner on Linux

Most of the today’s Linux systems comes with pre-installed PerlPerl Modules, and OpenSSL packages. If not included, you can install them using the default system package manager utility called yum or apt-get.

On Red Hat/CentOS/Fedora
[root@tecmint ]# yum install perl perl-Net-SSLeay openssl
On Debian/Ubuntu/Linux Mint
[root@tecmint ]# apt-get install perl openssl libnet-ssleay-perl

Next, clone the latest stable Nikto source files from its Github repository, move into Nikto/programs/ directory and run it using perl:

$ git clone https://github.com/sullo/nikto.git
$ cd nikto/programs
$ perl nikto.pl -h 
Sample Output
Option host requires an argument

       -config+            Use this config file
       -Display+           Turn on/off display outputs
       -dbcheck            check database and other key files for syntax errors
       -Format+            save file (-o) format
       -Help               Extended help information
       -host+              target host
       -id+                Host authentication to use, format is id:pass or id:pass:realm
       -list-plugins       List all available plugins
       -output+            Write output to this file
       -nossl              Disables using SSL
       -no404              Disables 404 checks
       -Plugins+           List of plugins to run (default: ALL)
       -port+              Port to use (default 80)
       -root+              Prepend root value to all requests, format is /directory
       -ssl                Force ssl mode on port
       -Tuning+            Scan tuning
       -timeout+           Timeout for requests (default 10 seconds)
       -update             Update databases and plugins from CIRT.net
       -Version            Print plugin and database versions
       -vhost+             Virtual host (for Host header)
   		+ requires a value

	Note: This is the short help output. Use -H for full help text.

The “Option host requires an argument” is clearly telling that we didn’t include the needed parameters while doing a test. So, we need to add a basic necessary parameter to do a test run.

Basic Testing

The basic scan requires a host that you want to target, by default it scans port 80 if nothing is specified. The host can either be a hostname or an IP Address of a system. You can specify a host using “-h” option.

For example, I want to do a scan on an IP 172.16.27.56 on TCP port 80.

[root@tecmint nikto-2.1.5]# perl nikto.pl -h 172.16.27.56
Sample Output
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          172.16.27.56
+ Target Hostname:    example.com
+ Target Port:        80
+ Start Time:         2014-01-10 00:48:12 (GMT5.5)
---------------------------------------------------------------------------
+ Server: Apache/2.2.15 (CentOS)
+ Retrieved x-powered-by header: PHP/5.3.3
+ The anti-clickjacking X-Frame-Options header is not present.
+ Server leaks inodes via ETags, header found with file /robots.txt, inode: 5956160, size: 24, mtime: 0x4d4865a054e32
+ File/dir '/' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ "robots.txt" contains 1 entry which should be manually viewed.
+ Apache/2.2.15 appears to be outdated (current is at least Apache/2.2.22). Apache 1.3.42 (final release) and 2.0.64 are also current.
+ Multiple index files found: index.php, index.htm, index.html
+ DEBUG HTTP verb may show server debugging information. See http://msdn.microsoft.com/en-us/library/e8z01xdh%28VS.80%29.aspx for details.
+ OSVDB-877: HTTP TRACE method is active, suggesting the host is vulnerable to XST
+ OSVDB-3233: /phpinfo.php: Contains PHP configuration information
+ OSVDB-12184: /index.php?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000: PHP reveals potentially sensitive information via certain HTTP requests that contain specific QUERY strings.
+ OSVDB-3092: /test.html: This might be interesting...
+ OSVDB-3268: /icons/: Directory indexing found.
+ OSVDB-3233: /icons/README: Apache default file found.
+ /connect.php?path=http://cirt.net/rfiinc.txt?: Potential PHP MySQL database connection string found.
+ OSVDB-3092: /test.php: This might be interesting...
+ 6544 items checked: 0 error(s) and 16 item(s) reported on remote host
+ End Time:           2014-01-10 00:48:23 (GMT5.5) (11 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested

If you want to scan on a different port number, then add “-p” [-port] option. For example, I want to do a scan on IP 172.16.27.56 on TCP port 443.

[root@tecmint nikto-2.1.5]# perl nikto.pl -h 172.16.27.56 -p 443
Sample Output
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          172.16.27.56
+ Target Hostname:    example.com
+ Target Port:        443
---------------------------------------------------------------------------
+ SSL Info:        Subject: /O=*.mid-day.com/OU=Domain Control Validated/CN=*.mid-day.com
                   Ciphers: DHE-RSA-AES256-GCM-SHA384
                   Issuer:  /C=US/ST=Arizona/L=Scottsdale/O=Starfield Technologies, Inc./OU=http://certificates.starfieldtech.com/repository/CN=Starfield Secure Certification Authority/serialNumber=10688435
+ Start Time:         2014-01-10 01:08:26 (GMT5.5)
---------------------------------------------------------------------------
+ Server: Apache/2.2.15 (CentOS)
+ Server leaks inodes via ETags, header found with file /, inode: 2817021, size: 5, mtime: 0x4d5123482b2e9
+ The anti-clickjacking X-Frame-Options header is not present.
+ Apache/2.2.15 appears to be outdated (current is at least Apache/2.2.22). Apache 1.3.42 (final release) and 2.0.64 are also current.
+ Server is using a wildcard certificate: '*.mid-day.com'
+ Allowed HTTP Methods: GET, HEAD, POST, OPTIONS, TRACE
+ OSVDB-877: HTTP TRACE method is active, suggesting the host is vulnerable to XST
+ OSVDB-3268: /icons/: Directory indexing found.
+ OSVDB-3233: /icons/README: Apache default file found.
+ 6544 items checked: 0 error(s) and 8 item(s) reported on remote host
+ End Time:           2014-01-10 01:11:20 (GMT5.5) (174 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested

You can also specify hostsports and protocols using a full URL syntax, and it will be scanned.

[root@tecmint nikto-2.1.5]# perl nikto.pl -h http://172.16.27.56:80

You can also scan any website. For example, here I did a scan on google.com.

[root@tecmint nikto-2.1.5]# perl nikto.pl -h http://www.google.com
Sample Output
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          173.194.38.177
+ Target Hostname:    www.google.com
+ Target Port:        80
+ Start Time:         2014-01-10 01:13:36 (GMT5.5)
---------------------------------------------------------------------------
+ Server: gws
+ Cookie PREF created without the httponly flag
+ Cookie NID created without the httponly flag
+ Uncommon header 'x-frame-options' found, with contents: SAMEORIGIN
+ Uncommon header 'x-xss-protection' found, with contents: 1; mode=block
+ Uncommon header 'alternate-protocol' found, with contents: 80:quic
+ Root page / redirects to: http://www.google.co.in/?gws_rd=cr&ei=xIrOUomsCoXBrAee34DwCQ
+ Server banner has changed from 'gws' to 'sffe' which may suggest a WAF, load balancer or proxy is in place
+ Uncommon header 'x-content-type-options' found, with contents: nosniff
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ File/dir '/groups/' in robots.txt returned a non-forbidden or redirect HTTP code (302)
….

The above command will perform a bunch of http requests (i.e. more than 2000 tests) on the web server.

Multiple Port Testing

You can also perform multiple ports scanning in the same session. To scan multiple ports on the same host, add “-p” [-port] option and specify the list of ports. Ports can be defined as a range (i.e., 80-443), or as a comma separated (i.e., 80,443). For example, I want to scan a ports 80 and 443 on the host 172.16.27.56.

[root@tecmint nikto-2.1.5]# perl nikto.pl -h 172.16.27.56 -p 80,443
Sample Output
- Nikto v2.1.5
---------------------------------------------------------------------------
+ No web server found on cmsstage.mid-day.com:88
---------------------------------------------------------------------------
+ Target IP:          172.16.27.56
+ Target Hostname:    example.com
+ Target Port:        80
+ Start Time:         2014-01-10 20:38:26 (GMT5.5)
---------------------------------------------------------------------------
+ Server: Apache/2.2.15 (CentOS)
+ Retrieved x-powered-by header: PHP/5.3.3
+ The anti-clickjacking X-Frame-Options header is not present.

---------------------------------------------------------------------------
+ Target IP:          172.16.27.56
+ Target Hostname:    example.com
+ Target Port:        443
---------------------------------------------------------------------------
+ SSL Info:        Subject: /O=*.mid-day.com/OU=Domain Control Validated/CN=*.mid-day.com
                   Ciphers: DHE-RSA-AES256-GCM-SHA384
                   Issuer:  /C=US/ST=Arizona/L=Scottsdale/O=Starfield Technologies, Inc./OU=http://certificates.starfieldtech.com/repository/CN=Starfield Secure Certification Authority/serialNumber=10688435
+ Start Time:         2014-01-10 20:38:36 (GMT5.5)
---------------------------------------------------------------------------
+ Server: Apache/2.2.15 (CentOS)
+ All CGI directories 'found', use '-C none' to test none
+ Apache/2.2.15 appears to be outdated (current is at least Apache/2.2.22). Apache 1.3.42 (final release) and 2.0.64 are also current.
.....

Using a Proxy

Let’s say a system where Nikto is running only has access to the target host via an HTTP proxy, the test can still be performed using two different ways. One is using nikto.conf file and another way is to run directly from the command line.

Using Nikto.conf File

Open nikto.conf file using any command line editor.

[root@localhost nikto-2.1.5]# vi nikto.conf

Search for the variable “PROXY” and uncomment the ‘#‘ from the beginning of the lines as shown. Then add the proxy hostportproxy user and password. Save and close the file.

# Proxy settings -- still must be enabled by -useproxy
PROXYHOST=172.16.16.37
PROXYPORT=8080
PROXYUSER=pg
PROXYPASS=pg

Now, execute the Nikto using “-useproxy” option. Please note all connections will be relayed via the HTTP proxy.

root@localhost nikto-2.1.5]# perl nikto.pl -h localhost -p 80 -useproxy
Sample Output
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          127.0.0.1
+ Target Hostname:    localhost
+ Target Port:        80
+ Start Time:         2014-01-10 21:28:29 (GMT5.5)
---------------------------------------------------------------------------
+ Server: squid/2.6.STABLE6
+ Retrieved via header: 1.0 netserv:8080 (squid/2.6.STABLE6)
+ The anti-clickjacking X-Frame-Options header is not present.
+ Uncommon header 'x-squid-error' found, with contents: ERR_CACHE_ACCESS_DENIED 0
+ Uncommon header 'x-cache-lookup' found, with contents: NONE from netserv:8080
Using Command Line

To run the Nikto directly from the command line using the “-useproxy” option by setting the proxy as the argument.

root@localhost nikto-2.1.5]# perl nikto.pl -h localhost -useproxy http://172.16.16.37:8080/
Sample Output
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          127.0.0.1
+ Target Hostname:    localhost
+ Target Port:        80
+ Start Time:         2014-01-10 21:34:51 (GMT5.5)
---------------------------------------------------------------------------
+ Server: squid/2.6.STABLE6
+ Retrieved via header: 1.0 netserv:8080 (squid/2.6.STABLE6)
+ The anti-clickjacking X-Frame-Options header is not present.
+ Uncommon header 'x-squid-error' found, with contents: ERR_CACHE_ACCESS_DENIED 0
+ Uncommon header 'x-cache-lookup' found, with contents: NONE from netserv:8080

Updating Nikto

You can update Nikto to the latest plugins and databases automatically, simply run the “-update” command.

[root@localhost nikto-2.1.5]# perl nikto.pl -update

If new updates are available, you will see a list of new updates downloaded.

+ Retrieving 'nikto_report_csv.plugin'
+ Retrieving 'nikto_headers.plugin'
+ Retrieving 'nikto_cookies.plugin'
+ Retrieving 'db_tests'
+ Retrieving 'db_parked_strings'
+ Retrieving 'CHANGES.txt'
+ CIRT.net message: Please submit Nikto bugs to http://trac2.assembla.com/Nikto_2/report/2

You can also manually download and update Nikto plugins and databases from the http://cirt.net/nikto/UPDATES/.

Reference Links

Nikto Homepage

Source

GNU Debugger or GDB: A Powerful Source Code Debugging tool for Linux Programs

A debugger plays a vital role in any software development system. Nobody can write a bug-free code all at once. During the course of development, bugs are being raised and needs to be solved for further enhancement. A development system is incomplete without a debugger. Considering the open source developers community, GNU Debugger is their best choice. It is also used for commercial software development on UNIX type platforms.

GNU Debugger Tool

Debugging source code with GNU Debugger

GNU Debugger, also known as gdb, allows us to sneak through the code while it executes or what a program was trying to do at the moment before it crashed. GDB basically helps us to do four main things to catch flaws in the source code.

  1. Start the program, specifying arguments that may affect the general behavior.
  2. Stop the program on specified conditions.
  3. Examine the crash or when program was stopped.
  4. Change the code and to experiment with the modified code instantaneously.

We can use gdb to debug programs written in C and C++ without much effort. As of now support for other programming languages like DModula-2Fortran are partial.

Getting started with GNU Debugger or GDB

GDB is invoked using the gdb command. On issuing gdb, it displays some information about platform and drops you into the (gdb) prompt as shown below.

[root@fedora20 ~]# gdb
Sample Output
GNU gdb (GDB) Fedora 7.6.50.20130731-19.fc20 
Copyright (C) 2013 Free Software Foundation, Inc. 
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 
This is free software: you are free to change and redistribute it. 
There is NO WARRANTY, to the extent permitted by law.  Type "show copying" 
and "show warranty" for details. 
This GDB was configured as "x86_64-redhat-linux-gnu". 
Type "show configuration" for configuration details. 
For bug reporting instructions, please see: 
<http://www.gnu.org/software/gdb/bugs/>. 
Find the GDB manual and other documentation resources online at: 
<http://www.gnu.org/software/gdb/documentation/>. 
For help, type "help". 
Type "apropos word" to search for commands related to "word". 
(gdb)

Type help list to out the different classes of commands available inside gdb. Type help followed by a class name for a list of commands in that class. Type help all for the list of all commands. Command name abbreviations are allowed if they are unambiguous. For example, you can type n instead of typing next or c for continue and so on.

Most Commonly used GDB Commands

Commonly used gdb commands are listed in the following table. These commands are to be used from the gdb command prompt (gdb).

Command
Description
run
Start a program execution
quit
Quit gdb
print expr
Print expression where expr may be a variable name too
next
Go to next line
step
Step into next line
continue
Continue from the current line till the end of program or next break point

Note the difference between the two commands step and next. The next command does not go inside function if next line is a function call. Whereas step command can go in inside function and see what happens there.

A sample session with GDB

Consider the following source code.

// sum.c
#include <stdio.h> 

int sum (int a, int b) { 
	int c; 
	c = a + b; 
	return c; 
} 

int main() { 
	int x, y, z; 
	printf("\nEnter the first number: "); 
	scanf("%d", &x); 
	printf("Enter the second number: "); 
	scanf("%d", &y); 
	z = sum (x, y); 
	printf("The sum is %d\n\n", z); 
	return 0; 
}

In order to debug the output file we need to compile the same with -g option to gcc as follows.

$ gcc -g sum.c -o sum

The output file sum can be attached to gdb via either of the following 2 ways:

1. By specifying the output file as an argument to gdb.

$ gdb sum

2. Running output file inside gdb using file command.

$ gdb
(gdb) file sum

The list command lists lines in the source code file and moves the pointer. So first list will display the first 10 lines and next list displays the next 10 and so on.

(gdb) list
1	#include <stdio.h>   
2	 
3	int sum (int a, int b) { 
4		int c; 
5		c = a + b; 
6		return c; 
7	} 
8	 
9	int main() { 
10		int x, y, z;

To start execution, issue the run command. Now the program gets executed normally. But we forgot to put some breakpoints in the source code for debugging, right? These breakpoints can be specified for functions or at specified lines.

(gdb) b main

Note: I have used an abbreviation b for break.

After setting break point at main function, rerunning the program will stop at the line 11. The same thing can be made into effect if the line number is known before.

(gdb) b sum.c:11

Now step through the lines of code using the next or n command. It is important to note that next command does not go inside function code unless a break point is set on the function. Let’s try out the print command now. Set break point on function sum as below.

(gdb) b sum 
Breakpoint 1 at 0x4005aa: file sum.c, line 5. 
(gdb) r 
Starting program: /root/sum 

Enter the first number: 2 
Enter the second number: 3 

Breakpoint 1, sum (a=2, b=3) at sum.c:5 
5		c = a + b; 
(gdb) p a 
$1 = 2 
(gdb) p b 
$2 = 3
(gdb) c 
Continuing. 
The sum is 5 

[Inferior 1 (process 3444) exited normally]

If the program being run requires command line parameters then provide the same along with the run command as.

(gdb) run   . . .

Shared library files associated with the current running program can be listed as.

(gdb) info share 
From                To                  Syms Read   Shared Object Library 
0x00000035a6000b10  0x00000035a6019c70  Yes         /lib64/ld-linux-x86-64.so.2 
0x00000035a641f560  0x00000035a6560bb4  Yes         /lib64/libc.so.6

Modifying Variables

GDB is also capable of modifying variables throughout the execution of program. Let’s try this out. As mentioned above set break point at line 16 and run the program.

(gdb) r 
Starting program: /root/sum 

Enter the first number: 1 
Enter the second number: 2 

Breakpoint 1, main ( ) at sum.c:16 
16		printf("The sum is %d\n\n", z); 
(gdb) set z=4 
(gdb) c 
Continuing. 
The sum is 4

Now a = 1b = 2 and result should be z = 3. But here we changed the final result to z = 4 in the main function. In this way debugging can be made easier using gdb.

Enable/Disable Breakpoints

To get the list of all breakpoints type info breakpoints.

(gdb) info breakpoints 
Num     Type           Disp Enb Address            What 
1       breakpoint     keep y   0x00000000004005c2 in main at sum.c:11

Here there is only one break point and it is To. enabled disable the breakpoints specify the breakpoint number along with the disable command. To enable afterwards use the enable command.

(gdb) disable 1 
(gdb) info breakpoints 
Num     Type           Disp Enb Address            What 
1       breakpoint     keep n   0x00000000004005c2 in main at sum.c:11

You can also delete the breakpoints with delete command.

Debugging running Processes

Numerous processes are running in background in a GNU/Linux system. To debug a running process first of all we need to find the process id of that particular process. pidof command gives you the pid of a process.

$ pidof <process_name>

Now we need to attach this pid to gdb. There are 2 ways.

1. By specifying pid along with gdb.

$ gdb -p <pid>

2. Using attach command from gdb.

(gdb) attach <pid>

That’s all for now. These are only basics of gdb to get a good start in debugging source code and it is much more than the things explained above. For example, we can debug using the stack information, environment variables and lot more. Try to play around with all these stuffs…

Source

How to Install Latest VirtualBox 6.0 in Linux

VirtualBox is an open source cross-platform virtualization software, it can be installed on any operating system and enable you to install and run multiple guest operating systems on same computer.

For example, if you install it on your Linux system, you can run Windows XP operating system under it as a Guest OS or run Linux OS on your Windows system and so on. This way, you can install and run as many as guest operating systems as you like, the only limit is disk space and memory.

Recently Oracle has released latest stable version of Virtualbox 6.0.0, the newest version of Virtual box comes with so many major changes and new features added to it.

Whats new in Virtualbox 6.0

  • Added support for exporting a virtual machine to Oracle Cloud Infrastructure.
  • A much improved HiDPI and scaling support, along with superior detection and per-machine configuration.
  • A Major rework of user interface with smooth and easy setup of virtual machines.
  • A new file manager allows user to manage the guest file system and copy files between host and guest.
  • A major update of 3D graphics device emulation on Linux guests.
  • vboximg-mount utility for hosts enables users to access the content of guest disks on the host.
  • Added support for using Hyper-V on Windows host.

You can see the complete new change log details about VirtualBox 6.0 on their Official Changelog Page.

This guide explains how to install VirtualBox 6.0 on RHELCentOS and Fedora systems using VirtualBox’s own repository with YUM and DNF (for Fedora 22+ releases) tool.

This guide also explains how to install VirtualBox 6.0 on DebianUbuntu and Linux Mint systems using VirtualBox’s own repository with APT-GET or APT command.

Installing VirtualBox 6.0 in RHEL/CentOS and Fedora

If you’ve any earlier version of Virtualbox installed, remove that before installing latest version.

# yum remove VirtualBox*
# dnf remove VirtualBox*  [On Fedora 22+]

Adding VirtualBox Repository

Next add the VirtualBox own repository to install latest VirtualBox 6.0 on following systems.

For RHEL/CentOS 7/6/
# cd /etc/yum.repos.d/
# wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
For RHEL/CentOS 5
# wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -Uvh epel-release-5-4.noarch.rpm
For Fedora 24-29
# cd /etc/yum.repos.d/
# wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo

Install Dependency Packages for VirtualBox

VirtualBox uses vboxdrv kernel module to control and allocate physical memory for execution of guest operating systems. Without this module, you can still use the VirtualBox to create and configure virtual machines, but they will not work.

So, to make VirtualBox fully functional you will need to update your system first, then install some additional modules like DKMSkernel-headers and kernel-devel and some dependency packages.

# yum update
# yum install binutils qt gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms

Install VirtualBox 6.0

Once you’ve installed all the needed dependency packages, you can install latest version of VirtualBox using following command.

# yum install VirtualBox-6.0

Rebuild Kernel Modules for VirtualBox 6.0

The below command will automatically create vboxusers group and user and also search and automatically rebuild required kernel modules.

------------- Fedora 22+ and CentOS/RHEL 7 ------------- 
/usr/lib/virtualbox/vboxdrv.sh setup
 
------------- Fedora 18-16 and CentOS/RHEL 6/5 ------------- 
/etc/init.d/vboxdrv setup
## OR ##
service vboxdrv setup

If the above build process fails, you will get a warning messages similar to below.

vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-4.19.0-1.el7.elrepo.x86_64

Then you need to first check your installed kernel and then install needed kernel-devel using following commands.

# uname -r
# yum install kernel-devel-CURRENT_KERNEL

Note: replace CURRENT_KERNEL with string you get from uname -r.

Now run the build setup again.

# /usr/lib/virtualbox/vboxdrv.sh setup

Next, replace user_name in the following command with your own user name.

# usermod -a -G vboxusers user_name

Troubleshooting

If you get any error message like KERN_DIR or if your kernel source directory not detected automatically by build process, you can set it by using following command. Make sure you change kernel version according to your system as shown in red color.

## RHEL / CentOS / Fedora ##
KERN_DIR=/usr/src/kernels/4.19.0-1.el7.elrepo.x86_64

## Export KERN_DIR ##
export KERN_DIR

Installing VirtualBox 6.0 in Debian, Ubuntu and Linux Mint

First, uninstall any earlier version of Virtualbox if any.

$ sudo apt-get remove virtualbox-*

Next, install latest VirtualBox 6.0 version using official Virtualbox repository. To add the repository, use the following command as shown.

$ sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" >> /etc/apt/sources.list.d/virtualbox.list'
$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install virtualbox-6.0

Starting VirtualBox 6.0

Simply execute following command to start it from the terminal or use launcher from menu to start.

# VirtualBox
VirtualBox 6.0 Screenshots on CentOS 7

VirtualBox 6.0 Running on CentOS 7

VirtualBox 6.0 Running on CentOS 7

Create Virtalbox New Guest Machine

Create Virtalbox New Guest Machine

Installing VirtualBox Extension Pack

If you need some additional functionality such as VirtualBox RDPPXEROM with E1000 support and USB 2.0 Host Controller support, etc. You need to download and install the VirtualBox Extension Pack using following wget command.

# # wget http://download.virtualbox.org/virtualbox/6.0.0/Oracle_VM_VirtualBox_Extension_Pack-6.0.0.vbox-extpack

To install the extension pack, you must have Virtualbox 6.0 installed, once you downloaded vbox-extpack open with Virtualbox as shown below.

If it doesn’t work out, then open Virtaulbox –> Preferences –> Extensions and browse for the vbox-extpack to install it.

Install Virtualbox Extension Pack

Install Virtualbox Extension Pack

Updating VirtualBox

If you want to update the VirtualBox with latest version in the future, you can simply run the following command to update it.

On RHEL/CentOS/Fedora
# yum update VirtualBox-6.0
On Ubuntu/Linux Mint
# apt-get install VirtualBox-6.0

Remove VirtualBox

If in case you want to remove VirtualBox completely, just use the following command to remove it completely from your system.

On RHEL/CentOS/Fedora
# cd /etc/yum.repos.d/
# rm -rf virtualbox.repo
# yum remove VirtualBox-6.0
On Ubuntu/Linux Mint
# apt-get remove VirtualBox-6.0

You can also Download VirtualBox 6.0 for other LinuxWindows and Mac OS X platforms.

Source

Linux Directory Structure and Important Files Paths Explained

For any person, who does not have a sound knowledge of Linux Operating System and Linux File System, dealing with the files and their location, their use may be horrible, and a newbie may really mess up.

This article is aimed to provide the information about Linux File System, some of the important files, their usability and location.

Linux Directory Structure Diagram

A standard Linux distribution follows the directory structure as provided below with Diagram and explanation.

Linux File System Structure

Linux Directory Structure

Each of the above directory (which is a file, at the first place) contains important information, required for booting to device drivers, configuration files, etc. Describing briefly the purpose of each directory, we are starting hierarchically.

  1. /bin : All the executable binary programs (file) required during booting, repairing, files required to run into single-user-mode, and other important, basic commands viz.catdudftarrpmwc, history, etc.
  2. /boot : Holds important files during boot-up process, including Linux Kernel.
  3. /dev : Contains device files for all the hardware devices on the machine e.g., cdromcpu, etc
  4. /etc : Contains Application’s configuration files, startupshutdownstartstop script for every individual program.
  5. /home : Home directory of the users. Every time a new user is created, a directory in the name of user is created within home directory which contains other directories like DesktopDownloadsDocuments, etc.
  6. /lib : The Lib directory contains kernel modules and shared library images required to boot the system and run commands in root file system.
  7. /lost+found : This Directory is installed during installation of Linux, useful for recovering files which may be broken due to unexpected shut-down.
  8. /media : Temporary mount directory is created for removable devices viz., media/cdrom.
  9. /mnt : Temporary mount directory for mounting file system.
  10. /opt : Optional is abbreviated as opt. Contains third party application software. Viz., Java, etc.
  11. /proc : A virtual and pseudo file-system which contains information about running process with a particular Process-id aka pid.
  12. /root : This is the home directory of root user and should never be confused with ‘/
  13. /run : This directory is the only clean solution for early-runtime-dir problem.
  14. /sbin : Contains binary executable programs, required by System Administrator, for Maintenance. Viz., iptablesfdiskifconfig, swapon, reboot, etc.
  15. /srv : Service is abbreviated as ‘srv‘. This directory contains server specific and service related files.
  16. /sys : Modern Linux distributions include a /sys directory as a virtual filesystem, which stores and allows modification of the devices connected to the system.
  17. /tmp :System’s Temporary Directory, Accessible by users and root. Stores temporary files for user and system, till next boot.
  18. /usr : Contains executable binariesdocumentationsource codelibraries for second level program.
  19. /var : Stands for variable. The contents of this file is expected to grow. This directory contains loglockspoolmail and temp files.

Linux is a complex system which requires a more complex and efficient way to startstopmaintain and reboota system unlike Windows. There is a well defined configuration filesbinariesman pagesinfo files, etc. for every process in Linux.

  1. /boot/vmlinuz : The Linux Kernel file.
  2. /dev/hda : Device file for the first IDE HDD (Hard Disk Drive)
  3. /dev/hdc : Device file for the IDE Cdrom, commonly
  4. /dev/null : A pseudo device, that don’t exist. Sometime garbage output is redirected to /dev/null, so that it gets lost, forever.
  5. /etc/bashrc : Contains system defaults and aliases used by bash shell.
  6. /etc/crontab : A shell script to run specified commands on a predefined time Interval.
  7. /etc/exports : Information of the file system available on network.
  8. /etc/fstab : Information of Disk Drive and their mount point.
  9. /etc/group : Information of Security Group.
  10. /etc/grub.conf : grub bootloader configuration file.
  11. /etc/init.d : Service startup Script.
  12. /etc/lilo.conf : lilo bootloader configuration file.
  13. /etc/hosts : Information of Ip addresses and corresponding host names.
  14. /etc/hosts.allow : List of hosts allowed to access services on the local machine.
  15. /etc/host.deny : List of hosts denied to access services on the local machine.
  16. /etc/inittab : INIT process and their interaction at various run level.
  17. /etc/issue : Allows to edit the pre-login message.
  18. /etc/modules.conf : Configuration files for system modules.
  19. /etc/motd : motd stands for Message Of The Day, The Message users gets upon login.
  20. /etc/mtab : Currently mounted blocks information.
  21. /etc/passwd : Contains password of system users in a shadow file, a security implementation.
  22. /etc/printcap : Printer Information
  23. /etc/profile : Bash shell defaults
  24. /etc/profile.d : Application script, executed after login.
  25. /etc/rc.d : Information about run level specific script.
  26. /etc/rc.d/init.d : Run Level Initialisation Script.
  27. /etc/resolv.conf : Domain Name Servers (DNS) being used by System.
  28. /etc/securetty : Terminal List, where root login is possible.
  29. /etc/skel : Script that populates new user home directory.
  30. /etc/termcap : An ASCII file that defines the behaviour of Terminalconsole and printers.
  31. /etc/X11 : Configuration files of X-window System.
  32. /usr/bin : Normal user executable commands.
  33. /usr/bin/X11 : Binaries of X windows System.
  34. /usr/include : Contains include files used by ‘c‘ program.
  35. /usr/share : Shared directories of man filesinfo files, etc.
  36. /usr/lib : Library files which are required during program compilation.
  37. /usr/sbin : Commands for Super User, for System Administration.
  38. /proc/cpuinfo : CPU Information
  39. /proc/filesystems : File-system Information being used currently.
  40. /proc/interrupts : Information about the current interrupts being utilised currently.
  41. /proc/ioports : Contains all the Input/Output addresses used by devices on the server.
  42. /proc/meminfo : Memory Usages Information.
  43. /proc/modules : Currently using kernel module.
  44. /proc/mount : Mounted File-system Information.
  45. /proc/stat : Detailed Statistics of the current System.
  46. /proc/swaps : Swap File Information.
  47. /version : Linux Version Information.
  48. /var/log/lastlog : log of last boot process.
  49. /var/log/messages : log of messages produced by syslog daemon at boot.
  50. /var/log/wtmp : list login time and duration of each user on the system currently.

That’s all for now.

Source

WP2Social Auto Publish Powered By : XYZScripts.com