Switching Default UEK kernel to Redhat Kernel on Oracle Linux 7

About the Unbreakable Enterprise Kernel (UEK)

In September 2010, Oracle announced the new Unbreakable Enterprise Kernel (UEK) for Oracle Linux as a recommended kernel for deployment with Oracle Linux 5.

Starting with Oracle Linux 5.5, Oracle give you could choose to use either the Red Hat Compatible Kernel or the UEK.

In Oracle Linux 5.6 and above, the UEK became the default kernel for Oracle Linux.

Switching Default UEK kernel to Redhat Kernel

Switching Default UEK kernel to Redhat Kernel on Oracle Linux 7

This article will describe how to Switching Default UEK kernel to Redhat Kernel on Oracle Linux 7 with the following steps :

1. Original Kernel for Oracle Linux 7 will likely as below :

# uname -a
Linux localhost.localdomain 3.8.13-55.1.6.el7uek.x86_64 #2 SMP Wed Feb 11 14:18:22 PST 2015 x86_64 x86_64 x86_64 GNU/Linux

2. Grep the list of the available kernel in Oracle Linux 7. The sequence of entry will start with 0.

a) To display with command 1 :

# egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \'
Oracle Linux Server 7.1, with Linux 3.10.0-229.el7.x86_64
Oracle Linux Server 7.1, with Unbreakable Enterprise Kernel 3.8.13-55.1.6.el7uek.x86_64
Oracle Linux Server 7.1, with Linux 0-rescue-26ad0b77c2de4840ba8402282bdd9d17

b) To display with command 2 :

# grep '^menuentry' /boot/grub2/grub.cfg | cut -f 2 -d \'
Oracle Linux Server 7.1, with Linux 3.10.0-229.el7.x86_64
Oracle Linux Server 7.1, with Unbreakable Enterprise Kernel 3.8.13-55.1.6.el7uek.x86_64
Oracle Linux Server 7.1, with Linux 0-rescue-26ad0b77c2de4840ba8402282bdd9d17

3. Set entry 0 as the default kernel with this command :

# grub2-set-default 0
# grub2-mkconfig -o /etc/grub2.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-229.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-229.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.8.13-55.1.6.el7uek.x86_64
Found initrd image: /boot/initramfs-3.8.13-55.1.6.el7uek.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-26ad0b77c2de4840ba8402282bdd9d17
Found initrd image: /boot/initramfs-0-rescue-26ad0b77c2de4840ba8402282bdd9d17.img
done

4. Reboot the server :

# init 6

5. After reboot, verify that Red Hat Compatible Kernel will become the default :

# uname -a
Linux localhost.localdomain 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 04:05:24 PST 2015 x86_64 x86_64 x86_64 GNU/Linux

I hope this article gives you some ideas and essential guidance on how to Switching Default UEK kernel to Redhat Kernel.

Note :
*Do not edit the GRUB 2 configuration file directly. On BIOS-based systems, the configuration file is /boot/grub2/grub.cfg. On UEFI-based systems, the configuration file is /boot/efi/EFI/redhat/grub.cfg.

*The grub2-mkconfig command generates the configuration file using the template scripts in /etc/grub.d and menu-configuration settings taken from the configuration file, /etc/default/grub.

Source

How to Configure FTP Server in Linux RHEL 6

In this post i will show how to install Very Secure FTP (Vsftpd) and how to configure ftp server in linux Red Hat Enterprise Linux 6 (RHEL 6). Vsftpd is a GPL licensed FTP server for UNIX systems, including Linux. It is secure and extremely fast and it is stable.

As an example I will install and configure the vsftpd server and will also transfer files from the clients running on the Windows XP command prompt.

-A linux server with ip address 192.168.1.43 running on RHEL 6 Operating system
-A window client with ip address 192.168.1.52 running on Windows XP Pro
-RHEL 6 server Running portmap/rpcbind and xinetd services
-Firewall and SElinux should be off on server

how to configure ftp server in linux

How to Install FTP Server in Linux ?

1. Install vsftpd, rpcbind and xinetd service using the following command :

# yum install vsftpd rpcbind xinetd -y

2. Check vsftpd, xinetd and rpcbind/portmap exist and installed on the server :

# rpm -qa vsftpd
vsftpd-2.2.2-6.el6.i686

# rpm -qa xinetd
xinetd-2.3.14-29.el6.i686

# rpm -qa rpcbind
rpcbind-0.2.0-8.el6.i686

3. Make all these services auto start at boot :

# chkconfig vsftpd on
# chkconfig xinetd on
# chkconfig rpcbind on

4. Check the xinetd and rpcbind status :

# service xinetd status
xinetd (pid  1326) is running...

# service rpcbind status
rpcbind (pid  1178) is running...

5. Create the a new user named ftpuser and set password :

# useradd ftpuser
# passwd ftpuser
Changing password for user ftpuser.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

6. Login as ftpuser on other terminal and create a new files named “files”.

# su - ftpuser
[ftpuser@rhel6 ~]$ cat > files
This is file created on RHEL 6 ftp server

7. Start the vsftpd service :

# service vsftpd start
Starting vsftpd for vsftpd:                                [  OK  ]

8. Stop the iptables linux firewall and disabled selinux :

# service ip6tables stop
ip6tables: Flushing firewall rules:                        [  OK  ]
ip6tables: Setting chains to policy ACCEPT: filter         [  OK  ]
ip6tables: Unloading modules:                              [  OK  ]

# service iptables stop
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Unloading modules:                               [  OK  ]
# setenforce 0
setenforce: SELinux is disabled

How to Configure FTP Server in Linux ?

9. It’s good to make backup of your original configuration file.

[root@rhel6 ~]# cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf-bak

10. login from user account and download the files :

D:\>ftp 192.168.1.43
Connected to 192.168.1.43.
220 (vsFTPd 2.2.2)
User (192.168.1.43:(none)): ftpuser
331 Please specify the password.
Password:
230 Login successful.
ftp> get files
200 PORT command successful. Consider using PASV.
150 Opening BINARY mode data connection for files (42 bytes).
226 Transfer complete.
ftp: 42 bytes received in 0.00Seconds 42000.00Kbytes/sec.
ftp> quit
221 Goodbye.

11. Check the contain of downloaded files :

D:\>type files
This is file created on RHEL 6 ftp server

12. By default root account is not allowed to login the vsftpd server as it’s exist in /etc/vsftpd/ftpusers.

D:\>ftp 192.168.1.43
Connected to 192.168.1.43.
220 (vsFTPd 2.2.2)
User (192.168.1.43:(none)): root
530 Permission denied.
Login failed.
ftp>

13. Open /etc/vsftpd/ftpusers file. Remove or comment out the line for user “root” and add “ftpuser” instead. Users whose name are set in this file will not allowed to login from ftp.

[root@rhel6 ~]# vi /etc/vsftpd/ftpusers
# Users that are not allowed to login via ftp
#root
ftpuser
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody

14. Open /etc/vsftpd/user_list file. Remove or comment out entry in /etc/vsftpd/user_list files. Remove or comment out the line for user “root” and add “ftpuser” instead. Users whose names are set in this file are also not allowed to login from ftp even they are not prompt for password.

# vi /etc/vsftpd/user_list
# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.
#root
ftpuser
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody

15. Root now allowed to access ftp server :

D:\>ftp 192.168.1.43
Connected to 192.168.1.43.
220 (vsFTPd 2.2.2)
User (192.168.1.43:(none)): root
331 Please specify the password.
Password:
230 Login successful.
ftp> quit
221 Goodbye.

16. ftpuser now not allowed to access ftp server :

D:\>ftp 192.168.1.43
Connected to 192.168.1.43.
220 (vsFTPd 2.2.2)
User (192.168.1.43:(none)): ftpuser
530 Permission denied.
Login failed.
ftp>

17. How to set login banner for ftp server :
Open /etc/vsftpd/vsftpd.conf look for “ftpd_banner” :

# vi /etc/vsftpd/vsftpd.conf

Uncomment ftpd_banner and customize the login banner string as below :

# You may fully customise the login banner string:
ftpd_banner=Welcome to eHowStuff.com RHEL6 FTP server
#

18 Restart the ftp service :

# service vsftpd restart
Shutting down vsftpd:                                      [  OK  ]
Starting vsftpd for vsftpd:                                [  OK  ]

19. Try login to ftp server. Check the banner, it will appear before user login as below :

D:\>ftp 192.168.1.43
Connected to 192.168.1.43.
220 Welcome to eHowStuff.com RHEL6 FTP server
User (192.168.1.43:(none)):

If you encounter any issues on how to configure ftp server in linux, you can put a few questions in the comments below.

How to Install FTP Server Linux using ProFTPd

FTP Server Linux

Proftpd is one of the most popular FTP server, secure and reliable for the Linux operating system. Proftpd using a single configuration file and it is very easy to set up. The purpose of this article is to show you how easy it is to install FTP Server Linux ProFTPd server in CentOS 6 Linux.

What is FTP Server Linux?

FTP, which stands for File Transfer Protocol is a standard for exchanging program and data files across a network. The network could be the World Wide Web or simply a local area network (LAN).

Prerequisite :
How to Add the RPMforge Repository on CentOS 6/RHEL 6 Linux Server

1. Simply run this command to install FTP server linux, ProFTPd on CentOS 6 :

# yum install proftpd -y

2. How to start proftpd service :

# /etc/init.d/proftpd start

3. How to stop proftpd service :

# /etc/init.d/proftpd stop

4. How to restart proftpd service :

# /etc/init.d/proftpd restart

5. Configure proftpd start at boot :

[root@centos62 ~]# chkconfig proftpd on

If you encountered any issues while installing FTP Server Linux using proftpd, you can put a few questions in the comments below.

 

How to Install Linux FTP Server using Vsftpd

Vsftpd stands for Very Secure FTP Daemon. Vsftpd is not just another popular Unix / Linux FTP Server, but vsftpd delivering outstanding performance by taking less memory. It is running under xinetd and allows you run one process less because xinetd is shared among various other small services. For those webmasters or blogger who intend to run web server on Virtual Private Server (VPS) or Dedicated Server, Vsftpd would be the best choice. It is easy to install and can perform all that we expect from an FTP daemon while maintaining a higher level of security if configured properly. This article focuses on and covers the installation and configuration of the FTP server Vsftpd on CentOS Linux VPS.

1. Installing Linux FTP Server, vsftpd using yum command :

# yum install vsftpd -y

2. Makesure that xinetd has been installed :

# rpm -qa xinetd

If not installed, execute the following command :

# yum install xinetd -y

3. Make xinetd and Vsftpd daemon start at boot :

# chkconfig vsftpd on
# chkconfig xinetd on

4. It is recommended to do backup of your original configuration file, before do changes :

# cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf-bak

5. Configure Vsftpd :

# vi /etc/vsftpd/vsftpd.conf

a) Uncomment ftpd_banner and customize the login banner string as below :

# You may fully customise the login banner string:
ftpd_banner=Welcome to Linux FTP service.
#

b) This step is to configure not allowed users. By default root account is not allowed to login the vsftpd server as it’s existed on /etc/vsftpd/ftpusers. To allow it, open /etc/vsftpd/ftpusers files and remove or comment on the line of a user “root”. Users whose name are set in this file will not allow to login from ftp.

# cat /etc/vsftpd/ftpusers
# Users that are not allowed to login via ftp
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody

6. Test root login from windows command prompt at client PC using user, ehowstuff :

C:\>ftp 192.168.2.54
Connected to 192.168.2.54.
220 Welcome to Linux CentOS FTP service.
User (192.168.2.54:(none)): ehowstuff
331 Please specify the password.
Password:
230 Login successful.
ftp>

If you encounter any issues when setting up linux ftp server, you can put a few questions in the comments below.

linux ftp server

Credit : www.unixmen.com

 

How to a Add and Remove User Account on RHEL 6/7, CentOS 6/7, Oracle Linux 6/7

This article will explain and share how to add and remove user account with useradd(add) and userdel (remove) from the command-line on linux RHEL 6/7, CentOS 6/7, Oracle Linux 6/7 server.

1. Adding a New User to an Linux System.

a) Get the useradd manual :

# man useradd
useradd - create a new user or update default new user information

b) To creates the new account and the /home/john home directory :

# useradd --home /home/ehowstuff ehowstuff

c) useraddd command does not set any valid password by default, and user cannot log in until a password is set.To set the password user the following command :

# passwd ehowstuff
Changing password for user ehowstuff.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

d) Verify the values in /etc/password :

# cat /etc/passwd | grep ehowstuff
ehowstuff:x:501:501::/home/ehowstuff:/bin/bash

e) Verify the values in /etc/group :

# cat /etc/group | grep ehowstuff
ehowstuff:x:501:

f) Verify email user created for id ehowstuff :

# ls /var/spool/mail | grep ehowstuff
ehowstuff

More useradd options :

-c, –comment COMMENT
Add a value, such as a full name, to the GECOS field.

-g, –gid GROUP
Specify the primary group for the user account.

-G, –groups GROUPS
Specify a list if supplementary groups for the user account.

-a, –append
Used with the -G option to append the user to the supplemental groups mentioned without removing the user from other groups.

-d, –home HOME_DIR
Specify a new home directory to a new location. Must be used with the -d option.

-m, –move-home
Move a user home directory to a new location. Must be used with the -d option.

-s, –shell SHELL
Specify a new login shell for the user account.

-L, –lock
Lock a user account.

-U, –unlock
Unlock a user account.

2. Deleting a User from an Linux System.

a) Get userdel manual :

# man userdel
userdel - delete a user account and related files

b) userdel username removes the user from /etc/passwd, but leaves the home directory intact by default. Proper command to remove the user’s account, user’s home directory and mail spool as part of the deletion process :

# userdel --remove ehowstuff

or

# userdel -r ehowstuff

Warning :
When a user is removed with userdel without the -r option specified, the system will have files that are owned by an unassigned user ID number. This can also happen when files created by a deleted user exist outside their home directory. This situation can lead to information leakage and other security issues.

 

How to Increase PHP File Upload Size Limit

Q. When you try to update the blog post in WordPress or any php application, you might notice that the application such as WordPress has a prohibitive maximum PHP file upload size. How to increase this limit in PHP ? In the below screenshot, i configured my PHP upload size to 50MB.

PHP file upload

A. If you own the virtual private server of dedicated web server, it is very easy to increase this parameter or option. The options can be set in php.ini configuration file, this configuration apply to all your applications. Many shared hosting server allows a maximum PHP file upload size is very low. This method may not work for most shared hosting because you do not give root access. If you plan to receive larger files, you should consider to purchase virtual private server (VPS) or dedicated server hardware.

What is default PHP File Upload Size (upload_max_filesize)?

The default values for PHP will restrict you to a maximum 2 MB upload file size.

Note : Below require you to access the server using root access from the linux server console. The steps has been tested on PHP 5.3 and PHP 5.4.

a) Login to your server via ssh connection.

b) Open php.ini file using vi editor :

# vi /etc/php.ini

There are two PHP configuration options that control the maximum PHP file upload size which are “upload_max_filesize” and “post_max_size”.

By default post_max_size = 8M and upload_max_filesize = 2M. You can update this value to the following :

c) Update this value from 8M to 60M :

post_max_size = 60M

d) Update this value from 2M to 50M :

upload_max_filesize = 50M

Note : Technically, post_max_size should always be greater than upload_max_file size . But for such a large number 150M you can safely make them the same size.

e) After you have made a changes, Then restart your web server to take effect of new PHP file upload size (e.g Apache or Nginx).

You can read more on these posts which explains PHP file upload article.

How to Install and Configure TigerVNC Server on CentOS 7.1 / RHEL 7.1 / Oracle Linux 7

The following article explain how to Install and configure TigerVNC Server on CentOS 7.1 or Red Hat Enterprise Linux (RHEL 7.1) or Oracle Linux 7. TigerVNC (Tiger Virtual Network Computing) is a remote access utility that allows you to control other computers that running graphical desktop sharing in separate sessions in parallel. It is works on the client-server principle: a server shares its output (vncserver) and a client (vncviewer) connects to the server. TigerVNC in RHEL 7 or CentOS 7 or Oracle Linux 7 uses the systemd system management daemon for its configuration. The /etc/sysconfig/vncserver configuration file has been replaced by /etc/systemd/system/vncserver@.service.

Install and Configure TigerVNC Server on Linux

1. Install tigervnc-server

# yum install tigervnc-server -y

2. Copy this file to /etc/systemd/system/vncserver@:.service :

# cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service

3. Edit and vncserver parameters appropriately

# vi /etc/systemd/system/vncserver@:1.service

Replace with actual user hat exist on the linux (e.g ehowstuff)

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service]
Type=forking
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l ehowstuff -c "/usr/bin/vncserver %i"
PIDFile=/home/ehowstuff/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'

[Install]
WantedBy=multi-user.target

4. Run `systemctl daemon-reload` to make the changes take effect immediately :

# systemctl daemon-reload

5. Set the password for the user or users defined in the configuration file. Note that you need to switch from root to USER first.

# su - ehowstuff
$ vncpasswd
Password:
Verify:

6. To start the service, specify the display number directly in the command :

# systemctl start vncserver@:1.service

7. Enable the service to start automatically at system start

# systemctl enable vncserver@:1.service

8. Add firewall rules to allow the VNC connection :

# firewall-cmd --permanent --zone=public --add-port 5901/tcp
# systemctl restart firewalld.service

9. Run VNC viewer :
Configure TigerVNC Server

How to Change RunLevel on CentOS 7 / RHEL 7

Old method to change the runlevel via /etc/inittab in Redhat Enterprise Linux version and CentOS server has become obsolete on RHEL 7 and CentOS 7. This latest Linux operating system uses systemd system management daemon and relies on systemctl command in order to change the runlevel. RunLevel is set with linking to /etc/systemd/system/default.target. Please make sure you have already install Gnome GUI before you proceed to change runlevel.

1. Check the current runlevel :

# runlevel
N 3

or

# systemctl get-default
multi-user.target

2. We can display the default.target by using list command :

# ll /etc/systemd/system/default.target
lrwxrwxrwx. 1 root root 37 Sep  1  2014 /etc/systemd/system/default.target -> /lib/systemd/system/multi-user.target

3. For example to list all currently loaded targets :

# systemctl list-units -t target
UNIT                LOAD   ACTIVE SUB    DESCRIPTION
basic.target        loaded active active Basic System
cryptsetup.target   loaded active active Encrypted Volumes
getty.target        loaded active active Login Prompts
local-fs-pre.target loaded active active Local File Systems (Pre)
local-fs.target     loaded active active Local File Systems
multi-user.target   loaded active active Multi-User System
network.target      loaded active active Network
paths.target        loaded active active Paths
remote-fs.target    loaded active active Remote File Systems
slices.target       loaded active active Slices
sockets.target      loaded active active Sockets
swap.target         loaded active active Swap
sysinit.target      loaded active active System Initialization
timers.target       loaded active active Timers

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

14 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

4. Type the following command to change the RunLevel to Graphical-login :

# systemctl set-default graphical.target
rm '/etc/systemd/system/default.target'
ln -s '/usr/lib/systemd/system/graphical.target' '/etc/systemd/system/default.target'

5. Verify the changed runlevel :

# runlevel
N 5

or

# systemctl get-default
graphical.target

6. Reboot the server to login to GNOME gui.

redhat-banner

How to Fix GNOME License Not Accepted Issue on CentOS 7

This post assume that you have just finished the Gnome GUI installation on CentOS 7 by using “yum groupinstall “GNOME Desktop” “Graphical Administration Tools” -y” command. Previously you are running a minimum CentOS 7, only with command line via terminal. But after you reboot the server you get the following screen.

Initial setup of CentOS Linux 7 (core)
1) [x] Creat user 2) [!] License information
(no user will be created) (license not accepted)
Please make your choice from above ['q' to quit | 'c' to continue | 'r' to refresh]:

Gnome-Gui-License-1

To fix the issue, you have to perform the following :

a) Press 1
b) Press 2 in order to change [ ] to [x] in front of 2) I accept the license agreement
c) Press q
d) Accept license menu does not prompt anymore at boot.

Gnome-Gui-License-2

How to Install and Setup Apache Tomcat 8 on CentOS 7 / RHEL 7

What is Tomcat Server and What is Apache Tomcat used for ?

Apache Tomcat version 8 is an open source web server and servlet container developed by the Apache Software Foundation (ASF).

It provides a web server environment for Java based source code and used to deploy Java Servlets and JSPs.

Basically Apache is an HTTP Server, serving HTTP. Tomcat is a Servlet and JSP Server serving Java technologies.

Tomcat 8 is the first Apache Tomcat release to support the Servlet 3.1, JSP 2.3, EL 2.3, and WebSocket specifications.

This article will describes how to install and configure Tomcat 8 on CentOS 7, RHEL 7 and Oracle Linux 7.

1. Install Oracle java :

2. How to download Apache Tomcat 8 :

To download Apache tomcat 8, go to the apache tomcat mirror

# cd /opt
# wget http://apache.arvixe.com/tomcat/tomcat-8/v8.0.22/bin/apache-tomcat-8.0.22.tar.gz

3. Extract the downloaded files :

# tar xzvf apache-tomcat-8.0.22.tar.gz

4. Create tomcat8 group and add user tomcat8 to that group:

# groupadd tomcat8
# useradd -s /bin/bash -g tomcat8 tomcat8

5. Create a symbolic link of tomcat directory to /opt/tomcat and assign permission :

# ln -s /opt/apache-tomcat-8.0.22 /opt/tomcat
# chown -R tomcat8:tomcat8 /opt/tomcat /opt/apache-tomcat-8.0.22

6. Create a Systemd Setting file :

# vi /usr/lib/systemd/system/tomcat8.service

Add the following :

[Unit]
Description=Apache Tomcat 8
After=network.target

[Service]
Type=oneshot
ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh
RemainAfterExit=yes
User=tomcat8
Group=tomcat8

[Install]
WantedBy=multi-user.target

7. How to start tomcat server and make it auto start at boot :

# systemctl start tomcat8
# systemctl enable tomcat8

8. Tomcat server works on port 8080 default. You can access from your browser using the url :

http://serverURL:8080

setup-tomcat-centos7-1

9. There are changes on the user roles on Tomcat 8. By default, no users or passwords are created for the Tomcat manager roles. To set roles, user name(s) and password(s), we need to configure the tomcat-users.xml file located at $CATALINA_HOME/conf/tomcat-users.xml.

# vi /opt/tomcat/conf/tomcat-users.xml

Add the following :

<!-- user manager can access only manager section -->
<role rolename="manager-gui"></role>
<user username="manager" password="password" roles="manager-gui"></user>

<!-- user admin can access manager and admin section both -->
<role rolename="admin-gui"></role>
<user username="admin" password="password" roles="manager-gui,admin-gui"></user>

Read here on the different between Apache Web Server and Apache Tomcat server.

How to Install JAVA 8 (JDK 8u45) on CentOS 6 / CentOS 7

The JDK is a development tool for building applications, applets, and components using the Java programming language . It includes a useful tool for developing and testing programs written in the Java programming language and runs on the Java platform. You can go through this document to know more about new enhancement of Java JDK 8. This post describe how to install JAVA 8 (JDK 8u45) on CentOS 6 and CentOS 7 from rpm package.

1. Download Oracle Java 8 rpm from official website (64 bit):

# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.rpm"

2. Install Oracle Java 8 :

# rpm -ivh jdk-8u45-linux-x64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:jdk1.8.0_45-2000:1.8.0_45-fcs    ################################# [100%]
Unpacking JAR files...
        rt.jar...
        jsse.jar...
        charsets.jar...
        tools.jar...
        localedata.jar...
        jfxrt.jar...
        plugin.jar...
        javaws.jar...
        deploy.jar...

3. Verify the Oracle Java version :

# java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

How to Check Software or Packages Version in Linux

versionThere are a variety of software installed on linux and windows servers. In particular time, we are required to review and check the version of the software or packages that we have installed on any operating system. I have prepared a list command line on how to check the software and packages versions of linux CentOS operating system.

1. How to check postfix MTA version :

# postconf -d | grep mail_version
mail_version = 2.10.1
milter_macro_v = $mail_name $mail_version

2. How to check PHP version. The result will also shows ionCube loader if any :

# php -v
PHP 5.4.16 (cli) (built: Oct 31 2014 12:59:36)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with the ionCube PHP Loader v4.7.5, Copyright (c) 2002-2014, by ionCube Ltd.

3. How to check PHP fast CGI version :

# php-fpm -v
PHP 5.4.37 (fpm-fcgi) (built: Jan 21 2015 11:13:07)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with the ionCube PHP Loader v4.7.5, Copyright (c) 2002-2014, by ionCube Ltd.

4. How to check Nginx version :

# nginx -v
nginx version: nginx/1.8.0

5. How to check Nginx version and configuration options :

# nginx -V
nginx version: nginx/1.8.0
built by gcc 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_spdy_module --with-cc-opt='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'

6. How to check Apache version :

# httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built:   Mar 12 2015 15:07:19

7. How to check Apache version and configuration options :

# httpd -V
Server version: Apache/2.4.6 (CentOS)
Server built:   Mar 12 2015 15:07:19
Server's Module Magic Number: 20120211:24
Server loaded:  APR 1.4.8, APR-UTIL 1.5.2
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture:   64-bit
Server MPM:     prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="/run/httpd/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

8. How to check 389 Directory version :

# /usr/sbin/ns-slapd -v
389 Project
389-Directory/1.3.3.1 B2015.118.1941

9. How to check installed packages :

# rpm -qa | grep 389
389-adminutil-devel-1.1.21-2.el7.x86_64
389-ds-base-libs-1.3.3.1-16.el7_1.x86_64
389-admin-1.1.38-1.el7.x86_64
389-ds-base-devel-1.3.3.1-16.el7_1.x86_64
389-adminutil-1.1.21-2.el7.x86_64
389-ds-base-1.3.3.1-16.el7_1.x86_64

10. How to check Bind named server version :

# /usr/sbin/named -v
BIND 9.9.4-RedHat-9.9.4-18.el7_1.1 (Extended Support Version)

11. How to check zimbra collaboration suites version :

# su - zimbra
$ zmcontrol -v
Release 8.5.0_GA_3042.RHEL6_64_20140828192005 RHEL6_64 FOSS edition.

12. How to check vsftp server version :

# /usr/sbin/vsftpd -v
vsftpd: version 3.0.2

13. To check OpenSSH client version :

# /usr/bin/ssh -V
OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013

14. How to check mysql Client version :

# /usr/bin/mysql -V
/usr/bin/mysql  Ver 15.1 Distrib 5.5.41-MariaDB, for Linux (x86_64) using readline 5.1

15. How to check varnishd version :

# /usr/sbin/varnishd -V
varnishd (varnish-4.0.3 revision b8c4a34)
Copyright (c) 2006 Verdens Gang AS
Copyright (c) 2006-2014 Varnish Software AS

16. How to check logical volume manager (LVM) version :

# lvm version
  LVM version:     2.02.115(2)-RHEL7 (2015-01-28)
  Library version: 1.02.93-RHEL7 (2015-01-28)
  Driver version:  4.29.0