Open Source Commerce (osCommerce) is a solution for online store software and alternative to Magento. It is indeed a complete software, easily installed and configured through a web-based installation procedure. It can be used on any web server with PHP and MySQL as the basic software. In this article, I will show you how to install osCommerce on CentOS 7.1 virtual private server (VPS). Before we proceed with step osCommerce installation, this tutorial assumes CentOS 7.1 server has been installed and LAMP or LEMP software also has been setup. The steps maybe similar to RHEL 7.1 and Oracle Linux 7.
Install osCommerce software on CentOS 7.1, RHEL 7.1 and Oracle Linux 7 via command line
1. Download osCommerce Online Merchant v2.3.4 Full Package and store it on web server root directory. This post use httpd web server and /var/www/html/ as the default root directory :
# cd /var/www/html/ # wget http://www.oscommerce.com/files/oscommerce-2.3.4.zip # unzip oscommerce-2.3.4.zip
2. The webserver is not able to save the installation parameters to its configuration files. The following files need to have their file permissions set to world-writeable (chmod 777):
# cp -Rp oscommerce-2.3.4 oscommerce # chmod 777 /var/www/html/oscommerce/catalog/includes/configure.php # chmod 777 /var/www/html/oscommerce/catalog/admin/includes/configure.php
3. Setup database :
# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 11 Server version: 5.5.40-MariaDB MariaDB Server Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> CREATE DATABASE oscommercedb; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> CREATE USER oscommerceuser@localhost IDENTIFIED BY 'oscommercepassword'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES on oscommercedb.* to oscommerceuser@localhost; Query OK, 0 rows affected (0.01 sec) MariaDB [(none)]> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> exit Bye
osCommerce Web Installation via Browser
4. Start osCommerce Web installation by browse the osccomerce URL as below :
Note : Replace IP address your own server IP address :
a. Press Start:
b. Enter database information :
c. You will notice that there is a message “The database structure is now being imported. Please be patient during this procedure.”. Just wait untill it proceed to next page below. Click continue to proceed.
d. Enter online store information :
e. If you see this page, you already have a working osCommerce installed in CentOS 7.0.
I hope this article gives you some ideas and essential guidance on how to install osCommerce on linux / CentOS 7.1 / RHEL 7.1 / Oracle Linux 7.
Virtualmin is an advanced web hosting control panel that is very flexible and powerful for Linux and UNIX systems. It is based on the well-known Open Source web-based system management, Webmin. It is a Webmin module for managing multiple virtual hosts, multiple virtual domains, mailboxes, databases, applications, and the entire server, from one comprehensive and single friendly web interface. Virtualmin is an excellent alternative to cPanel and Plesk, with the same administrative structure based on user root, resellers, and customers. Virtualmin supports the account creation and management of Apache virtual hosts, BIND DNS domains, MySQL database. VirtualMin also provides functions for non-root users to manage their hosting account. In this article, i will show the steps to install Virtualmin on CentOS 7 / RHEL 7 / Oracle Linux 7. Steps maybe similar to older version of linux distribution.
There are two versions of Virtualmin exist:
- Virtualmin GPL is a free and the open source version. (Discussed in this article)
- Virtualmin Pro is a the commercial version of Virtualmin.
This tutorial assumes the following:
- You have setup minimal installation for CentOS 7 / RHEL 7 / Oracle Linux 7.
- You are running with root access.
- If you are running as a normal user, you must have privileged access (sudo).
Install Virtualmin on CentOS 7 / RHEL 7 / Oracle Linux 7
1. It is recommended to install Virtualmin on the fresh server to avoid conflict when you start the installation. You need to update the system to ensure that we have all the latest software installed.
To update, run the following command :
# yum update -y
2. Download the VirtualMin installer into current directory:
# wget http://software.virtualmin.com/gpl/scripts/install.sh
3. Make the install.sh file executable :
# chmod +x install.sh
4. start the installation :
The systems currently supported by install.sh are: CentOS/RHEL/Scientific Linux 7 on x86_64 CentOS and RHEL 5-6 on i386 and x86_64 Scientific Linux 6 on i386 and x86_64 Debian 6, 7, and 8 on i386 and amd64 Ubuntu 10.04 LTS, 12.04 LTS, and 14.04 LTS on i386 and amd64 Amazon Linux 2012.03 on i386 and x86_64 FreeBSD 7.0 and 8 on i386 and amd64
If your OS is not listed above, this script will fail. More details about the systems supported by the script can be found here:
# ./install.sh Checking for Perl found Perl at /usr/bin/perl Welcome to the Virtualmin GPL installer, version 1.1.2 WARNING: The installation is quite stable and functional when run on a freshly installed supported Operating System. If you have existing websites, email users, or if you manually installed Virtualmin via a Webmin 'wbm' module, you are likely to run into problems. Please read the Virtualmin Administrators Guide before proceeding if your system is not a freshly installed and supported OS. This script is not intended to update your system! It should only be used to perform your initial Virtualmin installation. If you have previously run the Virtualmin installer, you can perform upgrades and updates from within Virtualmin itself, or using your system's package manager. Once Virtualmin is installed, you never need to run this script again. The systems currently supported by install.sh are: CentOS/RHEL/Scientific Linux 7 on x86_64 CentOS and RHEL 5-6 on i386 and x86_64 Scientific Linux 6 on i386 and x86_64 Debian 6, 7, and 8 on i386 and amd64 Ubuntu 10.04 LTS, 12.04 LTS, and 14.04 LTS on i386 and amd64 Amazon Linux 2012.03 on i386 and x86_64 FreeBSD 7.0 and 8 on i386 and amd64 If your OS is not listed above, this script will fail. More details about the systems supported by the script can be found here: http://www.virtualmin.com/os-support.html Continue? (y/n) y Checking for HTTP client...found /usr/bin/curl -s -O Checking for perl...found /usr/bin/perl Loading log4sh logging library... INFO - Started installation log in /root/virtualmin-install.log INFO - Checking for fully qualified hostname... INFO - Hostname OK: fully qualified as centos71.ehowstuff.local INFO - Installing serial number and license key into /etc/virtualmin-license INFO - Loading OS selection library... INFO - Download of http://software.virtualmin.com/lib/oschooser.pl Succeeded. INFO - Loading OS list... INFO - Download of http://software.virtualmin.com/lib/os_list.txt Succeeded. INFO - Operating system name: CentOS Linux INFO - Operating system version: 7.1.1503 INFO - Configuring package manager for CentOS Linux 7.1.1503... INFO - Disabling SELinux during installation... /usr/sbin/setenforce: SELinux is disabled INFO - setenforce 0 failed: 1 INFO - Download of http://software.virtualmin.com/gpl/rhel/7.1.1503/x86_64/virtualmin-release-latest.noarch.rpm Succeeded. warning: virtualmin-release-latest.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID a0bdbcf9: NOKEY INFO - Succeeded. INFO - Installing dependencies using command: /usr/bin/yum -y -d 2 install bind bind-utils caching-nameserver httpd postfix spamassassin procmail perl-DBD-Pg perl-DBD-MySQL quota iptables openssl python mailman subversion mysql mysql-server mysql-devel mariadb mariadb-server postgresql postgresql-server rh-postgr esql rh-postgresql-server logrotate webalizer php php-xml php-gd php-imap php-mysql php-odbc php-pear php-pgsql php-snmp php-xmlrpc php-mbstring mod_perl mod _python cyrus-sasl dovecot spamassassin mod_dav_svn cyrus-sasl-gssapi mod_ssl ruby ruby-devel rubygems perl-XML-Simple perl-Crypt-SSLeay mlocate perl-LWP-Pro tocol-https .. .. ..
5. Once the install.sh script complete, you have to login to web management console :
The following are the summaries for the Post Setup Wizard task :
a) Once you login you will be prompted with a Post Setup Wizard. Click Next.
b) You will be prompted if you would like to pre-load certain libraries. Click Yes and then Next.
c) You will be prompted if you would like to run ClamAV virus scanner on your server. It is suggested that you select Yes and click Next.
d) You will be prompted if you would like to run the SpamAssassin e-mail spam scanner. If you are not running e-mail services it is not necessary to run this. However if you are hosting e-mail it is highly advised. Click Yes and Next if you are going to use SpamAssassin, otherwise click Next.
e) Next you will be prompted if you would like to run MySQL and/or PostgreSQL servers. This is entirely up to you as to which database servers you will provide to your customers (if any). Select your options and click Next. You will be prompted on the following screens for password information.
f) Once finished, you will be presented with an ‘All Done’ page. Click Next.
g) Once the main page loads you will need to reload your configuration. Click the Re-check and refresh configuration button in the yellow box.
I hope this article gives you some ideas and essential guidance on how to install Virtualmin on CentOS 7 / RHEL 7 / Oracle Linux 7.
Linux kernel includes powerful network filtering subsystem called Netfilter. It allows kernel modules to inspect each packet crossing the linux system such as to allow or drop incoming and outgoing network packet. In older Red Hat Enterprise Linux (RHEL) release such as RHEL 5 and RHEL 6, iptables was the main method of interacting with the kernel netfilter subsystem. The firewall capabilities were provided by the iptables utility, and configured either at the command line or through the graphical configuration tool, system-config-firewall.
In RHEL 7, firewalld has been introduced as a new method of interacting with netfilter. It is a default method for managing host-level firewalls. Basically the firewall capabilities are still provided by iptables. But linux administrators now interact with iptables through the dynamic firewall daemon, firewalld, and its configuration tools: firewall-config, firewall-cmd, and firewall-applet, which is not included in the default installation of Red Hat Enterprise Linux 7. Traffic management becomes easier after firewalld classifies all network traffic into a specific zone. Based on criteria such as source IP address of packets through the network, traffic was diverted into the firewall rules for approriate zone.
How to Configure Firewalld in Linux
There are three main ways for system administrators to interact with firewalld.
- By directly editing congfiguration files in /etc/firewalld
- By using the graphical firewall-config tool
- By using firewalld-cmd from the command line (will be discussed in this article)
This article will discuss how to configure firewalld in linux CentoS 7, RHEL 7 and Oracle linux 7 by using firewalld-cmd command line. Please take note that the firewalld daemon is installed from the firewalld package. It is part of a base install, but not part of a minimal installation.
1. How to install Firewalld :
Firewalld package is installed by default in RHEL 7.1 and CentOS 7.1. If you noticed it is not installed, you can install it using the following YUM command.
# sudo yum install firewalld -y
2. How to disable or enable Firewalld at boot :
a) To disable start at boot :
# sudo systemctl disable firewalld rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service' rm '/etc/systemd/system/basic.target.wants/firewalld.service'
b) To enable start at boot :
# sudo systemctl enable firewalld
3. Verify that firewalld is enabled and running on your server system :
# sudo systemctl status firewalld.service
# sudo systemctl status firewalld.service firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled) Active: active (running) since Wed 2015-09-09 21:26:25 MYT; 1 weeks 0 days ago Main PID: 2348 (firewalld) CGroup: /system.slice/firewalld.service ??2348 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid Sep 09 21:26:25 centos71.ehowstuff.local systemd: Started firewalld - dynamic firewall daemon.
4. How to query the current default zone ?
# sudo firewall-cmd --get-default-zone public
In this case, the default zone is public.
5. How to list all available zones ?
# sudo firewall-cmd --get-zones block dmz drop external home internal public trusted work
This will display all available zones.
6. Open up incoming http,https and mysql traffic for public zone :
# sudo firewall-cmd --permanent --zone=public --add-service=http # sudo firewall-cmd --permanent --zone=public --add-service=https # sudo firewall-cmd --permanent --zone=public --add-service=mysql
7. Activate the changes to your server firewall :
# sudo firewall-cmd --reload
8. Check the configuration of the running firewall on your system :
a) Query active zone :
# sudo firewall-cmd --get-active-zones
b) Display all running firewall configuration :
# sudo firewall-cmd --zone=public --list-all
# sudo firewall-cmd --zone=public --list-all public (default, active) interfaces: ens32 sources: services: dhcpv6-client http https mysql ssh ports: masquerade: no forward-ports: icmp-blocks: rich rules:
I hope that this gives you some ideas and essential guidance on how to configure firewalld in linux RHEL 7 / CentOS 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 :
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 :
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.
In this article, I will show you how to import and export MySQL database command line in Linux. In this case, export is to backup while import is to restore. The syntax are very simple and easy to understand and suitable for all levels of users including beginners. This MySQL command line is useful for those who want to migrate their WordPress blog from shared hosting to virtual private server (VPS) hosting or from current VPS hosting to new VPS hosting. This MySQL Database Import and Export command has been tested on CentOS 6 and CentOS 7 and Oracle Linux either on MySQL or MariaDB database.
How to Export MySQL Database Command line in Linux
1. Syntax to Export:
mysqldump -u USERNAME -p DATABASE_NAME > filename.sql
How to Export MySQL Database Command line in Linux
2. Syntax to Import:
mysql -u USERNAME -p DATABASE_NAME < filename.sql
Export WordPress_DB :
[root@vps ~]# mysqldump -u WordPress_User -p WordPress_DB > WordPress_DB.sql
Import WordPress_DB :
[root@vps ~]# mysql -u WordPress_User -p WordPress_DB < WordPress_DB.sql
I hope this article gives you some ideas and essential guidance on how to import and export MySQL database command line in Linux.
Webmin is a free software that is used by system administrators for system administration and configuration of the system where it is web based. Through Webmin, the system administrator can perform their daily tasks such as system administration and server administration through the graphical web-based interface where it is very easy to use while reducing errors. Webmin very suitable for beginners who do not know much about the unix or linux command line. For future reference, I will show how to install Webmin on CentOS 7/RHEL 7/Oracle Linux 7. Current Webmin version is 1.720.
Install Webmin on CentOS 7/RHEL 7/Oracle Linux 7
1. Enabling Yum repository for Webmin. Create the /etc/yum.repos.d/webmin.repo file containing :
[root@centos7 ~]# vi /etc/yum.repos.d/webmin.repo
[Webmin] name=Webmin Distribution Neutral #baseurl=http://download.webmin.com/download/yum mirrorlist=http://download.webmin.com/download/yum/mirrorlist enabled=1
2. Install my GPG key :
[root@centos7 ~]# rpm --import http://www.webmin.com/jcameron-key.asc
3. Run “yum install” command to install Webmin software and all required dependencies :
[root@centos7 ~]# yum install webmin -y
4. Start Webmin :
[root@centos7 ~]# /etc/init.d/webmin start
5. Webmin by default works on port 10000. Access your server on port 10000 using FQDN or IP.
http://192.168.0.x:10000/ or http://FQDN:10000/