How To Install Mail Server With PostfixAdmin on CentOS 7

Mail Server With PostfixAdmin on CentOS 7

Postfixadmin is a web frontend to the mysql or mariaDB database used by Postfix. With Postfixadmin we can easily manage from a web browser our Postfix service, adding and removing mail users and domains, mail aliases, disk quotas, etc.

Prerequisites

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Seafile Secure Cloud Storage on a CentOS 7 server.
Install Mail Server With PostfixAdmin on CentOS 7

Step 1. First, let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Install LAMP server.

A CentOS 7 LAMP stack server is required. If you do not have a LAMP installed, you can follow our guide here. Also install required PHP modules:

yum install php70w-cli php70w-gd php70w-xml php70w-curl php70w-mysql php70w-zip php70w-mbstring php70w-mcrypt

Step 3. Configuring MariaDB for PostfixAdmin.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. You should read and below each step carefully which will set the root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Next we will need to log in to the MariaDB console and create a database for the PostfixAdmin. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for PostfixAdmin installation:

CMariaDB [(none)]> CREATE DATABASE postfixadmin;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON postfixadmin.* TO 'postfixadmin'@'localhost' IDENTIFIED BY 'strong_password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

Step 4. Installing PostfixAdmin.

The first thing to do is to go to PostfixAdmin’s download page and download the latest stable version of PostfixAdmin:

wget -q -O - "https://downloads.sourceforge.net/project/postfixadmin/postfixadmin/postfixadmin-3.0.2/postfixadmin-3.0.2.tar.gz" | tar -xzf - -C /var/www/html

Open the mail configuration file:

nano /var/www/html/postfixadmin-3.0.2/config.inc.php

Edit the following values:

$CONF['configured'] = true;
$CONF['database_type'] = 'mysqli';
$CONF['database_host'] = 'localhost';
$CONF['database_user'] = 'postfixadmin';
$CONF['database_password'] = 'strong_password';
$CONF['database_name'] = 'postfixadmin';
$CONF['domain_path'] = 'NO';
$CONF['domain_in_mailbox'] = 'YES';

Now you need to assign the ownership of the files and folders to Apache’s user and group. To do so, the command is:

chown -R apache: /var/www/html/postfixadmin-3.0.2

To populate the database go to https://Your_IP_Address/postfixadmin-3.0.2/setup.php and you should see something like below:

Testing database connection - OK - mysqli://postfixadmin:xxxxx@localhost/postfixadmin
Everything seems fine... attempting to create/update database structure

Create a new admin user:

bash /var/www/html/postfixadmin-3.0.2/scripts/postfixadmin-cli admin add admin@your_domain_wpcademy.com --password strong_password22 --password2 strong_password22 --superadmin 1 --active 1
<.pre>

Step 5. Installing and configure Postfix.

Install postfix with the following command:
yum -y install postfix

Once the installation is completed, we need to create configuration files:

mkdir -p /etc/postfix/sql/
nano /etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf

Edit the following values:

user = postfixadmin
password = strong_password
hosts = localhost
dbname = postfixadmin
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
nano /etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf

Edit the following values:

user = postfixadmin
password = strong_password
hosts = localhost
dbname = postfixadmin
query = SELECT maildir FROM mailbox,alias_domain WHERE alias_domain.alias_domain = '%d' and mailbox.username = CONCAT('%u', '@', alias_domain.target_domain) AND mailbox.active = 1 AND alias_domain.active='1'
nano /etc/postfix/sql/mysql_virtual_alias_domain_maps.cf

Edit the following values:

user = postfixadmin
password = strong_password
hosts = localhost
dbname = postfixadmin
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('%u', '@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
nano /etc/postfix/sql/mysql_virtual_alias_maps.cf

Edit the following values:

user = postfixadmin
password = strong_password
hosts = localhost
dbname = postfixadmin
query = SELECT goto FROM alias WHERE address='%s' AND active = '1'
#expansion_limit = 100
nano /etc/postfix/sql/mysql_virtual_domains_maps.cf

Edit the following values:

user = postfixadmin
password = strong_password
hosts = localhost
dbname = postfixadmin
query = SELECT domain FROM domain WHERE domain='%s' AND active = '1'
#query = SELECT domain FROM domain WHERE domain='%s'
#optional query to use when relaying for backup MX
#query = SELECT domain FROM domain WHERE domain='%s' AND backupmx = '0' AND active = '1'
#expansion_limit = 100
nano /etc/postfix/sql/mysql_virtual_mailbox_limit_maps.cf

Edit the following values:

user = postfixadmin
password = strong_password
hosts = localhost
dbname = postfixadmin
query = SELECT quota FROM mailbox WHERE username='%s' AND active = '1'
nano /etc/postfix/sql/mysql_virtual_mailbox_maps.cf

Edit the following values:

user = postfixadmin
password = strong_password
hosts = localhost
dbname = postfixadmin
query = SELECT maildir FROM mailbox WHERE username='%s' AND active = '1'
#expansion_limit = 100

Next, edit the main.cf file:

postconf -e "myhostname = $(hostname -f)"

postconf -e "virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf"
postconf -e "virtual_alias_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf"
postconf -e "virtual_mailbox_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf"
postconf -e "smtpd_tls_cert_file = /etc/pki/tls/certs/localhost.crt"
postconf -e "smtpd_tls_key_file = /etc/pki/tls/private/localhost.key"
postconf -e "smtpd_use_tls = yes"
postconf -e "smtpd_tls_auth_only = yes"
postconf -e "smtpd_sasl_type = dovecot"
postconf -e "smtpd_sasl_path = private/auth"
postconf -e "smtpd_sasl_auth_enable = yes"
postconf -e "smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination"
postconf -e "mydestination = localhost"
postconf -e "mynetworks = 127.0.0.0/8"
postconf -e "inet_protocols = ipv4"
postconf -e "inet_interfaces = all"
postconf -e "virtual_transport = lmtp:unix:private/dovecot-lmtp"

Open the master.cf file, find submission inet n and smtps inet n sections and edit as follows:

nano /etc/postfix/master.cf

Edit the following values:

submission inet n - n - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
# -o smtpd_reject_unlisted_recipient=no
# -o smtpd_client_restrictions=$mua_client_restrictions
# -o smtpd_helo_restrictions=$mua_helo_restrictions
# -o smtpd_sender_restrictions=$mua_sender_restrictions
# -o smtpd_recipient_restrictions=
-o smtpd_relay_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
smtps inet n - n - - smtpd
-o syslog_name=postfix/smtps
# -o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
# -o smtpd_reject_unlisted_recipient=no
# -o smtpd_client_restrictions=$mua_client_restrictions
# -o smtpd_helo_restrictions=$mua_helo_restrictions
# -o smtpd_sender_restrictions=$mua_sender_restrictions
# -o smtpd_recipient_restrictions=
-o smtpd_relay_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING

Finally, enable the postfix service:

systemctl enable postfix
systemctl restart postfix

Step 6. Installing and Configure Dovecot.

Install dovecot using the command bellow:

yum install dovecot dovecot-mysql

Open the /etc/dovecot/conf.d/10-mail.conf file:

nano /etc/dovecot/conf.d/10-mail.conf

Change the following values:

mail_location = maildir:/var/vmail/%d/%n
mail_privileged_group = mail
mail_uid = vmail
mail_gid = mail
first_valid_uid = 150
last_valid_uid = 150

Open the /etc/dovecot/conf.d/10-auth.conf file:

nano /etc/dovecot/conf.d/10-auth.conf

Change the following values:

auth_mechanisms = plain login
#!include auth-system.conf.ext
!include auth-sql.conf.ext

Create a new dovecot-sql.conf.ext file:

nano /etc/dovecot/dovecot-sql.conf.ext

Edit the following values:

driver = mysql
connect = host=localhost dbname=postfixadmin user=postfixadmin password=strong_password
default_pass_scheme = MD5-CRYPT
password_query = SELECT username as user, password, '/var/vmail/%d/%n' as userdb_home, 'maildir:/var/vmail/%d/%n' as userdb_mail, 150 as userdb_uid, 8 as userdb_gid FROM mailbox WHERE username = '%u' AND active = '1'
user_query = SELECT '/var/vmail/%d/%u' as home, 'maildir:/var/vmail/%d/%u' as mail, 150 AS uid, 8 AS gid, concat('dirsize:storage=', quota) AS quota FROM mailbox WHERE username = '%u' AND active = '1'

In the /etc/dovecot/conf.d/10-ssl.conf file enable SSL support:

ssl = yes

Open the /etc/dovecot/conf.d/15-lda.conf file and set the postmaster_address email address:

postmaster_address = postmaster@your_domain_name.com

Open the /etc/dovecot/conf.d/10-master.conf file, find the service lmtp section and change it to:

service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
mode = 0600
user = postfix
group = postfix
}
}

Find the service auth section and change it to:

service auth {
unix_listener /var/spool/postfix/private/auth {
mode = 0666
user = postfix
group = postfix
}
unix_listener auth-userdb {
mode = 0600
user = vmail
#group = vmail
}
user = dovecot
}

Change the service auth-worker section to the following:

service auth-worker {
user = vmail
}

Now you need to assign the ownership of the files and folders. To do so, the command is:

chown -R vmail:dovecot /etc/dovecot
chmod -R o-rwx /etc/dovecot

Finally, enable and restart the dovecot service:

systemctl enable dovecot
systemctl restart dovecot

Step 7. Installing and configure Spamassassin.

Install spamassassin using the command bellow:

yum -y install spamassassin

Create a spamassassin system user:

groupadd spamd
useradd -g spamd -s /bin/false -d /var/log/spamassassin spamd
chown spamd:spamd /var/log/spamassassin

Next, configure Postfix to use SpamAssassin:

nano /etc/postfix/master.cf

Change values:

smtp inet n - n - - smtpd

With:

smtp inet n - n - - smtpd -o content_filter=spamassassin

Add the following line at the end of the file:

systemctl enable spamassassin
systemctl restart spamassassin

Finally, restart the postfix service:

systemctl restart postfix

Step 8. Accessing PostfixAdmin.

If everything is set up correctly now you should be able to log in to your PostfixAdmin backend by going to http://Your_IP_Address/postfixadmin-3.0.2.2 and create your first virtual domain and mailbox.

Congratulation’s! You have successfully installed PostfixAdmin. Thanks for using this tutorial for installing Mail Server With PostfixAdmin on CentOS 7 system. For additional help or useful information, we recommend you to check the official PostfixAdmin web site.

How To Install PowerDNS on CentOS 7

PowerDNS on CentOS 7

PowerDNS is a MySQL-based DNS server, written in C++ and licensed under the GPL. PowerDNS can be managed through a web interface (PowerAdmin). Unlike Bind, PowerDNS can be setup using a multitude of backends such as Bind Zone Files, or various Databases.

Prerequisites

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation PowerDNS on a CentOS 7 server.
Install PowerDNS on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Installing PowerDNS and backend.

First, you need to enable EPEL repository and all required packages on your system:

yum install epel-release
yum install bind-utils pdns pdns-recursor pdns-backend-mysql mariadb mariadb-server

Enable PowerDNS on boot and start PowerDNS server:

systemctl enable mariadb
systemctl enable pdns
systemctl enable pdns-recursor

Step 3. Configuring MariaDB.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB.

mysql_secure_installation

Step 4. Create PowerDNS Database and User in MariaDB.

Login as a MariaDB root and create a new database and tables:

### mysql -uroot -p

create user 'powerdns'@'localhost' identified by 'password';
grant all privileges on powerdns.* to 'powerdns'@'localhost';
flush privileges;
use powerdns;

CREATE TABLE domains (
id INT AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
master VARCHAR(128) DEFAULT NULL,
last_check INT DEFAULT NULL,
type VARCHAR(6) NOT NULL,
notified_serial INT DEFAULT NULL,
account VARCHAR(40) DEFAULT NULL,
PRIMARY KEY (id)
) Engine=InnoDB;

CREATE UNIQUE INDEX name_index ON domains(name);

CREATE TABLE records (
id INT AUTO_INCREMENT,
domain_id INT DEFAULT NULL,
name VARCHAR(255) DEFAULT NULL,
type VARCHAR(10) DEFAULT NULL,
content VARCHAR(64000) DEFAULT NULL,
ttl INT DEFAULT NULL,
prio INT DEFAULT NULL,
change_date INT DEFAULT NULL,
disabled TINYINT(1) DEFAULT 0,
ordername VARCHAR(255) BINARY DEFAULT NULL,
auth TINYINT(1) DEFAULT 1,
PRIMARY KEY (id)
) Engine=InnoDB;

CREATE INDEX nametype_index ON records(name,type);
CREATE INDEX domain_id ON records(domain_id);
CREATE INDEX recordorder ON records (domain_id, ordername);

CREATE TABLE supermasters (
ip VARCHAR(64) NOT NULL,
nameserver VARCHAR(255) NOT NULL,
account VARCHAR(40) NOT NULL,
PRIMARY KEY (ip, nameserver)
) Engine=InnoDB;

CREATE TABLE comments (
id INT AUTO_INCREMENT,
domain_id INT NOT NULL,
name VARCHAR(255) NOT NULL,
type VARCHAR(10) NOT NULL,
modified_at INT NOT NULL,
account VARCHAR(40) NOT NULL,
comment VARCHAR(64000) NOT NULL,
PRIMARY KEY (id)
) Engine=InnoDB;

CREATE INDEX comments_domain_id_idx ON comments (domain_id);
CREATE INDEX comments_name_type_idx ON comments (name, type);
CREATE INDEX comments_order_idx ON comments (domain_id, modified_at);

CREATE TABLE domainmetadata (
id INT AUTO_INCREMENT,
domain_id INT NOT NULL,
kind VARCHAR(32),
content TEXT,
PRIMARY KEY (id)
) Engine=InnoDB;

CREATE INDEX domainmetadata_idx ON domainmetadata (domain_id, kind);

CREATE TABLE cryptokeys (
id INT AUTO_INCREMENT,
domain_id INT NOT NULL,
flags INT NOT NULL,
active BOOL,
content TEXT,
PRIMARY KEY(id)
) Engine=InnoDB;

CREATE INDEX domainidindex ON cryptokeys(domain_id);

CREATE TABLE tsigkeys (
id INT AUTO_INCREMENT,
name VARCHAR(255),
algorithm VARCHAR(50),
secret VARCHAR(255),
PRIMARY KEY (id)
) Engine=InnoDB;

CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm);

Step 5. Configure PowerDNS.

Open the /etc/pdns/pdns.conf file and add the following lines:
allow-axfr-ips=
allow-recursion=
launch=gmysql
gmysql-host=127.0.0.1
gmysql-user=
gmysql-password=
gmysql-dbname=powerdns
local-address=
local-port=53
master=yes
recursor=127.0.0.1:5353
setgid=pdns
setuid=pdns
webserver=yes
webserver-address=
webserver-password=
webserver-port=8081

Finally, restart the Power DNS service:

systemctl restart pdns.service
systemctl enable pdns.service

Step 6. Configure Recursor.

Open the /etc/pdns-recursor/recursor.conf file and add the following lines:

setuid=pdns-recursor
setgid=pdns-recursor
allow-from=127.0.0.0/8
local-address=127.0.0.1
local-port=5353

Start the Recursor service:

systemctl restart pdns-recursor

Test Recursor:

host ping.wpcademy.com 127.0.0.1

Using domain server:
Name: 127.0.0.1
Address: 127.0.0.1#53
Aliases:

ping.wpcademy.com has address 194.109.46.8
ping.wpcademy.com has IPv6 address 2001:888:0:25:169:109:21:66

Congratulation’s! You have successfully installed PowerDNS. Thanks for using this tutorial for installing PowerDNS on CentOS 7 system. For additional help or useful information, we recommend you to check the official PowerDNS web site.

How To Install MyCollab Project Management Software on CentOS 7

MyCollab Project Management Software on CentOS 7

MyCollab is the free and open source collaboration tools, it has three existing modules: Project Management, CRM and Document Management. Intuitive UI, rich features, high performance and stability are the advantages compared with various popular tools in the market such as Redmine, Bugzilla, Mantis etc. This open source is included in a trusted commercial product that is deployed on hundreds of companies’ servers.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Install LAMP server.

Step 3. Installing Java.

Step 3. Installing MyCollab Project Management Software.

Step 4. Configuring MariaDB for Concrete5.

Step 5. Configure Firewall for MyCollab.

Step 6. Accessing MyCollab.

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation MyCollab Project Management Software on a CentOS 7 server.
Install MyCollab Project Management Software on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Install LAMP server.

A CentOS 7 LAMP stack server is required. If you do not have LAMP installed, you can follow our guide here.

Step 3. Installing Java.

You will also need the Java Runtime Environment (JRE) version 8 or higher. You can install it by running the following command:

yum install java-1.8.0-openjdk

Step 3. Installing MyCollab Project Management Software.

First thing to do is to go to MyCollab Project Management Software’s download page and download the latest stable version of MyCollab:

wget https://github.com/MyCollab/mycollab/releases/download/Release_5.4.10/MyCollab-All-5.4.10.zip

After downloading Concrete5 you will need to unzip master.zip. To do this, run:

unzip MyCollab-All-5.4.10.zip

You can install MyCollab by running the provided startup.sh installation script:

cd MyCollab-5.4.10/bin
sudo ./startup.sh

Step 4. Configuring MariaDB for Concrete5.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Next we will need to log in to the MariaDB console and create a database for the Concrete5. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for Concrete5 installation:

MariaDB [(none)]>CREATE USER 'mcuser'@'localhost' IDENTIFIED BY 'password';
MariaDB [(none)]>GRANT ALL PRIVILEGES ON mycollab.* TO 'mcuser'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
MariaDB [(none)]>FLUSH PRIVILEGES;
MariaDB [(none)]>exit;

Step 5. Configure Firewall for MyCollab.

Next step, we should allow HTTP traffic on port 8080 through firewalld. You can do this by running the following command:

firewall-cmd --zone=public --permanent --add-port=8080/tcp
firewall-cmd --reload

Step 6. Accessing MyCollab.

MyCollab will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com:8080 or http://server-ip:8080 and complete the required the steps to finish the installation.
mycollab-setup-wizard
Congratulation’s! You have successfully installed MyCollab. Thanks for using this tutorial for installing MyCollab Project Management Software on CentOS 7 system. For additional help or useful information, we recommend you to check the official MyCollab Project Management Software web site.

How To Install Live Helper Chat on CentOS 7

Live Helper Chat on CentOS 7

Live helper chat is a free, flexible, and open-source live support chat for your website. It is written in PHP and uses MySQL/MariaDB to store its data. It provides lots of features such as online user tracking, multiple chats, archive chat, user screenshots, file upload and much more. It provides desktop clients for operators and also supports XMPP. It is widely used on many websites.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Install LAMP server.

Step 3. Installing Live Helper Chat.

Step 4. Configuring MariaDB for Live Helper Chat.

Step 5. Configuring Apache web server for Live Helper Chat.

Step 7. Accessing Live Helper Chat.

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Live Helper Chat on a CentOS 7 server.
Install Live Helper Chat on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Install LAMP server.

A CentOS 7 LAMP stack server is required. If you do not have LAMP installed, you can follow our guide here. Also install required PHP modules:

yum -y install php-gd php-imap php-ldap php-pear php-xml php-xmlrpc php-mbstring php-mcrypt curl curl-devel

Step 3. Installing Live Helper Chat.

First thing to do is to go to Live Helper Chat’s download page and download the latest stable version of Live Helper Chat:

wget https://github.com/remdex/livehelperchat/archive/master.zip

After downloading Concrete5 you will need to unzip master.zip. To do this, run:

unzip master.zip
mv livehelperchat-master /var/www/html/livechat

We will need to change some folders permissions:

chown -R apache:apache /var/www/html/livechat

Step 4. Configuring MariaDB for Live Helper Chat.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Next we will need to log in to the MariaDB console and create a database for the Live Helper Chat. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for Concrete5 installation:

MariaDB [(none)]>CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
MariaDB [(none)]>GRANT ALL PRIVILEGES ON livechatdb.* TO 'user'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
MariaDB [(none)]>FLUSH PRIVILEGES;
MariaDB [(none)]>exit;

Step 5. Configuring Apache web server for Live Helper Chat.

We will create Apache virtual host for your Live Helper Chat website. First create ‘/etc/httpd/conf.d/vhosts.conf’ file with using a text editor of your choice:

nano /etc/httpd/conf.d/vhosts.conf
IncludeOptional vhosts.d/*.conf

Next, create the virtual host:

mkdir /etc/httpd/vhosts.d/
nano /etc/httpd/vhosts.d/yourdomain.com.conf

Add the following lines:

ServerAdmin [email protected]
DocumentRoot "/var/www/html/livechat/lhc_web"
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ErrorLog "/var/log/httpd/yourdomain.com-error_log"
CustomLog "/var/log/httpd/yourdomain.com-access_log" combined

<Directory "/var/www/html/livechat/lhc_web">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted

Save and close the file. Restart the Apache service for the changes to take effects:

systemctl restart httpd.service

Next step, we should allow HTTP traffic on port 80 through firewalld. You can do this by running the following command:

firewall-cmd --zone=public --add-service=http --permanent
firewall-cmd --reload

Step 7. Accessing Live Helper Chat.

Live Helper Chat will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com or http://server-ip and complete the required the steps to finish the installation.

Congratulation’s! You have successfully installed Live Helper Chat. Thanks for using this tutorial for installing Live Helper Chat on CentOS 7 system. For additional help or useful information, we recommend you to check the official Live Helper Chat web site.

How To Install PimCore on CentOS 7

PimCore on CentOS 7

Pimcore is a free and open-source web content management platform for creating and managing web applications and digital presences released under the terms of the BSD Licence. The pimcore platform contains various integrated applications for web content management, product information management, multi-channel publishing, e-commerce and various other marketing-specific applications like digital asset management, marketing management and an integrated behavioral targeting engine for personalizing content.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Install LAMP server.

Step 3. Installing PimCore.

Step 4. Configuring MariaDB for Pimcore.

Step 5. Configuring Apache web server for Pimcore.

Step 6. Configuring the ports in firewall for Pimcore.

Step 7. Accessing Pimcore.

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation PimCore CMS on a CentOS 7 server.
Install PimCore on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Install LAMP server.

A CentOS 7 LAMP stack server is required. If you do not have LAMP installed, you can follow our guide here. Also install required PHP modules:

yum -y install php-gd php-imap php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp curl curl-devel

Step 3. Installing PimCore.

Download the latest stable release of Pimcore to your server:

wget https://www.pimcore.org/download/pimcore-data.zip

Unpack the Pimcore archive to the document root directory on your server:

mkdir /var/www/html/pimcore/
unzip pimcore-data.zip -d /var/www/html/pimcore/

We will need to change some folders permissions:

chown apache:apache -R /var/www/html/pimcore

Step 4. Configuring MariaDB for Pimcore.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Next we will need to log in to the MariaDB console and create a database for the Pimcore. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for Pimcore installation:

MariaDB [(none)]> CREATE DATABASE pimcore DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON pimcore.* TO 'pimcore'@'localhost' IDENTIFIED BY 'strong_password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

Step 5. Configuring Apache web server for Pimcore.

We will create Apache virtual host for your Pimcore website. First create ‘/etc/httpd/conf.d/vhosts.conf’ file with using a text editor of your choice:

nano /etc/httpd/conf.d/vhosts.conf
IncludeOptional vhosts.d/*.conf

Next, create the virtual host:

mkdir /etc/httpd/vhosts.d/
nano /etc/httpd/vhosts.d/yourdomain.com.conf

Add the following lines:

ServerAdmin [email protected]
DocumentRoot "/var/www/html/pimcore/"
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ErrorLog "/var/log/httpd/yourdomain.com-error_log"
CustomLog "/var/log/httpd/yourdomain.com-access_log" combined

<Directory "/var/www/html/pimcore/">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted


Save and close the file. Restart the apache service for the changes to take effects:

systemctl restart httpd.service
systemctl enable httpd.service

Step 6. Configuring the ports in firewall for Pimcore.

Modify firewall rules in order to allow access for visitors:

firewall-cmd --permanent --zone=public --add-port=80/tcp
firewall-cmd --reload

Step 7. Accessing Pimcore.

Pimcore will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com or http://server-ip and complete the required the steps to finish the installation.

Congratulation’s! You have successfully installed Pimcore. Thanks for using this tutorial for installing Pimcore on your CentOS 7 system. For additional help or useful information, we recommend you to check the official Pimcore web site.

How To Install LiteCart on CentOS 7

LiteCart on CentOS 7

LiteCart is a free e-commerce, feature rich e-commerce solution. The framework is constructed to be lightweight and easy for developers to modify and build upon. LiteCart relies on the latest HyperText standard HTML 5, the latest CSS 3 for styling, the amazing jQuery framework for client-side dynamics, and the popular web scripting language PHP for server-side dynamics.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Install LAMP server.

Step 3. Installing LiteCart.

Step 4. Configuring MariaDB for LiteCart.

Step 5. Configure Apache web server for LiteCart.

Step 6. Accessing LiteCart e-commerce.

 

 

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root accge of Linount, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation LiteCart e-commerce on a CentOS 7 server.
Install LiteCart on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Install LAMP server.

A CentOS 7 LAMP stack server is required. If you do not have LAMP installed, you can follow our guide here. Also install required PHP modules:

yum -y install php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy curl curl-devel

Step 3. Installing LiteCart.

First thing to do is to go to LiteCart’s download page and download the latest stable version of LiteCart, At the moment of writing this article it is version 2.0.2:

unzip litecart-2.0.2.zip -d litecart

We will need to change some folders permissions:

chown -R chown apache:apache -R litecart/

Step 4. Configuring MariaDB for LiteCart.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Next we will need to log in to the MariaDB console and create a database for the LiteCart. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for LiteCart installation:

MariaDB [(none)]> CREATE DATABASE lite DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON lite.* TO 'liteuser'@'localhost' IDENTIFIED BY 'strong_password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

Step 5. Configure Apache web server for LiteCart.

We will create Apache virtual host for your LiteCart website. First create ‘/etc/httpd/conf.d/vhosts.conf’ file with using a text editor of your choice:

nano /etc/httpd/conf.d/vhosts.conf
IncludeOptional vhosts.d/*.conf

Next, create the virtual host:

mkdir /etc/httpd/vhosts.d/
nano /etc/httpd/vhosts.d/yourdomain.com.conf

Add the following lines:

ServerAdmin [email protected]
DocumentRoot "/var/www/html/litecart/"
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ErrorLog "/var/log/httpd/yourdomain.com-error_log"
CustomLog "/var/log/httpd/yourdomain.com-access_log" combined

<Directory "/var/www/html/litecart/">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted


Save and close the file. Restart the apache service for the changes to take effects:

systemctl restart httpd.service

Step 6. Accessing LiteCart e-commerce.

LiteCart e-commerce will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com/ or http://server-ip and complete the required the steps to finish the installation. If you are using a firewall, please open port 80 to enable access to the control panel.

Congratulation’s! You have successfully installed LiteCart. Thanks for using this tutorial for installing LiteCart e-commerce on CentOS 7 systems. For additional help or useful information, we recommend you to check the official LiteCart web site.

How To Install Akaunting on CentOS 7 Step by Step

Install Akaunting on CentOS 7

Akaunting is a free and online accounting software designed for small businesses to manage their finances and stay on top of their cash flow. Invoicing, accepting online payments and keeping track of expenses couldn’t be simpler. Akaunting is built with modern technologies such as Laravel, Bootstrap, jQuery, Swift Mailer, API etc. In this tutorial we will learn how to Install Akaunting on CentOS 7 step by step.

Prerequisites

This tutorial assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root accge of Linount, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Akaunting online accounting software on a CentOS 7 server.

Install Akaunting on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Install LAMP server.

A CentOS 7 LAMP stack server is required. If you do not have LAMP installed, you can follow our guide here. Also install required PHP modules:

yum -y install php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy curl curl-devel

Step 3. Installing Akaunting on CentOS 7.

First thing to do is to go to Akaunting’s download page and download the latest stable version of Akaunting,:

cd /var/www/akaunting
curl -O -J -L https://akaunting.com/download.php?version=latest
unzip Akaunting_1.1.15-Stable.zip

We will need to change some folders permissions:

chown -R chown apache:apache -R /var/www/akaunting

Step 4. Configuring MariaDB for Akaunting.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Next we will need to log in to the MariaDB console and create a database for the Akaunting. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for Akaunting installation:

MariaDB [(none)]> CREATE DATABASE dbname;
MariaDB [(none)]> GRANT ALL ON dbname.* TO 'username' IDENTIFIED BY 'password';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

Step 5. Configure Apache web server for Akaunting.

We will create Apache virtual host for your Akaunting website. First create ‘/etc/httpd/conf.d/vhosts.conf’ file with using a text editor of your choice:

nano /etc/httpd/conf.d/vhosts.conf
IncludeOptional vhosts.d/*.conf

Next, create the virtual host:

mkdir /etc/httpd/vhosts.d/
nano /etc/httpd/vhosts.d/yourdomain.com.conf

Add the following lines:

ServerAdmin [email protected]
DocumentRoot "/var/www/akaunting"
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ErrorLog "/var/log/httpd/yourdomain.com-error_log"
CustomLog "/var/log/httpd/yourdomain.com-access_log" combined

<Directory "/var/www/akaunting/">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted


Save and close the file. Restart the apache service for the changes to take effects:

systemctl restart httpd.service

Step 6. Accessing Akaunting.

Akaunting will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com/ or http://server-ip and complete the required the steps to finish the installation. If you are using a firewall, please open port 80 to enable access to the control panel.

Congratulation’s! You have successfully installed Akaunting. Thanks for using this tutorial for installing Akaunting online accounting software on CentOS 7 systems. For additional help or useful information, we recommend you to check the official Akaunting web site.