Saturday, August 10, 2019

Running Multiple Instances of MySql in ubuntu 16.04

Hi,

In this post we will discuss about having multiple instances of mysql on a server machine.

I am trying  to establish the objective here using MySql-5.7.25 on Ubuntu, you can do the same with other version of MySql as well

If you do not have one, you can refer an other article of mine to install MySql Server, the link to it is given below

MySql Server Installation in Ubuntu

1. Disabling mysqld in AppArmor 
The first and foremost is disabling mysqld using AppArmor tool, Ubuntu is shipped with this tool by default and if not you can install the same using the following web page as reference...

Installation of AppArmor

Create a link to "usr.sbin.mysqld" in disable folder as follows...

Move to folder "/etc/apparmor.d/disable" and provide the command below to have mysql daemon disabled at the start up
> sudo ln -s ../usr.sbin.mysqld usr.sbin.mysqld

RESTART YOUR MACHINE

2. Creating Directories and Files

The second step is to create required directories for each instances of mysql, the following commands would help to create those directories for you.

I have chosen "/opt" directory as my location to put the directories in but, you can choose to have your convenient location to create directories...

The below commands would ask to provide the password before the execution, provide the one associated with the account.

Creating directories for Instance One
> sudo mkdir -p /opt/mysql/one/data
> sudo mkdir -p /opt/mysql/one/log
> sudo touch /opt/mysql/one/log/mysql.log
> sudo chown -R mysql:mysql /opt/mysql/one
> sudo /usr/sbin/mysqld --initialize --explicit_defaults_for_timestamp --user=mysql --basedir=/opt/mysql/one --datadir=/opt/mysql/one/data

Creating directories for Instance Two
> sudo mkdir -p /opt/mysql/two/data
> sudo mkdir -p /opt/mysql/two/log
> sudo touch /opt/mysql/two/log/mysql.log
> sudo chown -R mysql:mysql /opt/mysql/two
> sudo /usr/sbin/mysqld --initialize --explicit_defaults_for_timestamp --user=mysql --basedir=/opt/mysql/two --datadir=/opt/mysql/two/data

Creating directories for Instance Three
> sudo mkdir -p /opt/mysql/three/data
> sudo mkdir -p /opt/mysql/three/log
> sudo touch /opt/mysql/three/log/mysql.log
> sudo chown -R mysql:mysql /opt/mysql/three
> sudo /usr/sbin/mysqld --initialize --explicit_defaults_for_timestamp --user=mysql --basedir=/opt/mysql/three --datadir=/opt/mysql/three/data

3. Editing my.cnf file (/etc/mysql/my.cnf)

The third step is to update the file called "my.cnf" file which you can locate under the folder "/etc/mysql"

The following are the details to be provided for each instance of MySql in "my.cnf", these entries are called group entries where each entry corresponds to an instance of mysql

[mysqld_multi]
mysqld = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
user = multi_admin
password = password
log = /var/log/mysqld_multi.log
[mysqld1]
skip-grant-tables
user = mysql
port = 3306
datadir = /opt/mysql/one/data
socket = /opt/mysql/one/one-mysql.sock
pid-file = /opt/mysql/one/one-mysql.pid
log-error = /opt/mysql/one/log/mysql.log
[mysqld2]
skip-grant-tables
user = mysql
port = 4406
datadir = /opt/mysql/two/data
socket = /opt/mysql/two/two-mysql.sock
pid-file = /opt/mysql/two/two-mysql.pid
log-error = /opt/mysql/two/log/mysql.log
[mysqld3]
skip-grant-tables
user = mysql
port = 5506
datadir = /opt/mysql/three/data
socket = /opt/mysql/three/three-mysql.sock
pid-file = /opt/mysql/three/three-mysql.pid
log-error = /opt/mysql/three/log/mysql.log

Start the Instances

After the configuration update is finished at "my.cnf", the immediate next step is to start the instance to check its function.

The command given below would help you to achieve starting an instance, if you are successful please perform the same actions for other instances as well...

NOTE: do not forget to change the socket file parameter...

> sudo mysqld_multi start
> mysql -u root -S /opt/mysql/default/default-mysql.sock -p
mysql> use mysql
mysql> UPDATE user SET authentication_string=PASSWORD('admin') WHERE User='root';
mysql> FLUSH PRIVILEGES;

4. Granting SHUTDOWN privilege to multi_admin USER

This step discuss granting shutdown privileges to multi_admin user, to provide the same kill the running mysql instances using "ps-aux | grep mysql"

remove "skip-grant-tables" parameter from every group in my.cnf file

now your my.cnf file should look something as below

[mysqld_multi]
mysqld = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin
user = multi_admin
password = password
log = /var/log/mysqld_multi.log
[mysqld1]
user = mysql
port = 3306
datadir = /opt/mysql/one/data
socket = /opt/mysql/one/one-mysql.sock
pid-file = /opt/mysql/one/one-mysql.pid
log-error = /opt/mysql/one/log/mysql.log
[mysqld2]
user = mysql
port = 4406
datadir = /opt/mysql/two/data
socket = /opt/mysql/two/two-mysql.sock
pid-file = /opt/mysql/two/two-mysql.pid
log-error = /opt/mysql/two/log/mysql.log
[mysqld3]
user = mysql
port = 5506
datadir = /opt/mysql/three/data
socket = /opt/mysql/three/three-mysql.sock
pid-file = /opt/mysql/three/three-mysql.pid
log-error = /opt/mysql/threelog/mysql.log

5. Start an instance

After removing the "skip-grant-tables" parameter from the group in "my.cnf" each instance of MySql will be identified by numbers based  on the position they appear in the configuration file.

To start the first instance, issue the following command
> sudo mysqld_multi start 1
login as root using the following command on instance 1 to check whether the connection establishment is fine.
> mysql -u root -S /opt/mysql/default/default-mysql.sock -p
provide the password of the root user

We can conclude the connection is fine, the the terminal window appears with mysql prompt.

6. Reset the password of root

This is final step and also an optional step to have, If you want to reset the root users password you can perform resetting the password using the following commands.
mysql> SET PASSWORD = PASSWORD('admin');
mysql> GRANT SHUTDOWN ON *.* TO 'multi_admin'@'localhost' IDENTIFIED BY '<password-provided-in-my.cnf-for-multi_admin>';

Thursday, August 8, 2019

Xeams : The Extended Mail and Messaging Server Installation in Ubuntu 16.04

Hi,

In this blog article, we are going to see how to install Xeams extended mail and messaging server in ubuntu 16.04

There would not be much deviation from the installation procedure between version of Opertating System, the same procedure can be adopted for other OSes with little bit or no tweaks...

So, lets start the show....

Prerequisites
Name Version Download Page Direct Link
Java 1.7 N/A N/A
Xeams 7.0 Xeams Downloads Page Click to Download Directly

From the above prerequisite section we are going to discuss only about the installation of Xeams but not Java.

To Install Java, there are plenty of resource available online, Please refer the one appropriate to you.

1. Installation of Xeams Mail Server
Form the downloads page or using the direct link, download the Xeams extended Mail and Messaging server and put it in a preferred location you like. What you download would be a .tar file, please extract the same

Open a terminal and navigate to the folder where you have extracted the package.

At the prompt, fire the following command to install the Mail Server
> ./Install.sh
The execution of the above command would ask certain questions, If you like you can answer those or leave it blank to have the server configured with default values....

Please sit back and relax till the execution completes, which would hardly take a minute.

This installation would also install a service, which takes care of starting the service at the machine startup.

You can find the service at the below mentioned location...

/etc/init.d/xeams

Well this concludes the installation of Xeams extended Mail and Messaging server.

2.  Server Configuration

In order to configure the server, open a browser and hit the following address in the address bar

http://localhost:5272

The server configuration requires certain details in order to function correctly, which would also ask you to set the administrator account to maintain the server.

Administrator Details
The first page asks you the details for a administrator, provide the same and click next to proceed.



Server Type
The next configuration item is the server type, select the one appropriate to you, In my case I have selected the standalone type and click next to proceed.



Domain Setup
The third items is the domain setup, you can key in the domain name if you have one and click next to proceed.



Verification
The last part is the verification page, Please check the details which you have provided are correct



Logout from the application using logout menu item in Home Menu and Log back in.

You would see the administrator control panel page like the one given in the image below...



There are plenty other options to configure, have a walk thru if you want to configure the required features for the installation

Well this concludes the article

Hope you liked it, Thanks.

Wednesday, August 7, 2019

How to set up DevNull SMTP Server for your development and testing environment

Hi,

In this post we are going to see how to install a DevNull SMTP server for our development/testing environment...

Many of us as developers would always encounter a situation during development/testing, the mailing feature of the application. We have different ways of setting up SMTP Server locally but those are very time consuming or the server package would require a lot of configuration to be done.

But with DevNull it will be like a cake walk to have SMTP server installed locally with minimal or no configurations.

For details you can refer the following site to have more details about DevNull

Official Site of DevNull

Let us go straight into the business of installing DevNull SMTP server in our development/testing environment

1. Installation
1. Please download DevNull SMTP server package using the link given below and hold it in your preferred location.

Direct Link : Download DevNull SMTP Server

2. Open an terminal and navigate to the folder where you have downloaded DevNull server package

3. At the prompt, fire the command as given below...
> java -jar DevNullSmtp.jar

2. Usages

Graphical User Interface Option
If you want the Graphical User Interface along with SMTP server, then fire the command below
> java -jar DevNullSmtp.jar

the result of the command execution would result something like the image given below...


the GUI has three important parts to be talked about....

1. The Listening PORT
2. Control to start the server
3. Place holder to save  the mail messages

The port and place holder items are configurable and we can change that anytime according to our needs.

The default port is "25", in order to have the server run make sure you do not have any service running at port 25, if you have then change the port value of DevNull SMTP Server to any other value other than "25" eg "2025"

Console Option

DevNull provides another option to have the server run as console application, to achieve that run the following command at the prompt..
> java -jar DevNullSmtp.jar -console

The above command comes with a variety of switches whose discription is given below...

'-d' switch : Holds domain names from where the email comes

'-p' switch : Holds the port value of the server

'-s' switch : Holds the location where mail messages are stored.

'-h' switch : List the options with its descriptions.

Command with '-d' Switch
> java -jar DevNullSmtp.jar -console -d first.com, second.com

Command with '-p' Switch
> java -jar DevNullSmtp.jar -console -p 2025

the '-h' option would list down all the options that server contains...
> java -jar DevNullSmtp.jar -h

Well this concludes the installation of DevNull SMTP Server

Hope you had good time reading it.

Thanks.

How to set up FakeSMTP Server for your development and testing environment

Hi,

In this post we are going to see how to install a fake SMTP server for our development/testing environment...

Many of us as developers would always encounter a situation during development/testing, the mailing feature of the application. We have different ways of setting up SMTP Server locally but those are very time consuming or the server package would require a lot of configuration to be done.

But with FakeSMTP it will be like a cake walk to have SMTP server installed locally with minimal or no configurations.

For details you can refer the following site to have more details about FakeSMTP

Official Site of Fake SMTP

Let us go straight into the business of installing FakeSMTP server in our development/testing environment

1. Installation
1. Please download FakeSMTP server package using the link given below and hold it in your preferred location.

Direct Link : Download FakeSMTP Server

2. Extract the package

3. Open an terminal and navigate to the folder where you have extracted FakeSMTP server package

4. At the prompt, fire the command as given below...
> java -jar fakeSMTP-2.0.jar
This article was written at the time when FakeSMTP was at version 2.0, please change the name of the jar file accordingly in case if you have different version of FakeSMTP

2. Usages

Graphical User Interface Option
If you want the Graphical User Interface along with SMTP server, then fire the command below
> java -jar fakeSMTP-2.0.jar

the result of the command execution would result something like the image given below...



the GUI has three important parts to be talked about....

1. The PORT
2. Control to start the server
3. Place holder to save  the mail messages

The port and place holder items are configurable and we can change that anytime according to our needs.

The default port is "25", in order to have the server run make sure you do not have any service running at port 25, if you have then change the port value of FakeSMTP to any other value other than "25" eg "1024"

Background Task Option

FakeSMTP provides another option to have the server run as back ground task, to achieve that run the following command at the prompt..
> java -jar fakeSMTP-2.0.jar -b -p 2525 -a 127.0.0.1
Let us discuss the command line arguments of the above command...

'-b' switch : Indicates that the server should run as background task

'-p' switch : Holds the port value of the server

'-a' switch : Holds the IP Address, in this case the IP address is the loopback address.

You can also specify the place holder to save the mail messages with the following command.
> java -jar fakeSMTP-2.0.jar -b -o <NAME-OF-THE-FOLDER> -p 2525 -a 127.0.0.1
the switch '-o' stands for Output Folder 

If you do not want to save the mail messages in a folder you could also do that via a switch as given below...
> java -jar fakeSMTP-2.0.jar -b -m -p 2525 -a 127.0.0.1

the --help option would list down all the options that server contains...
> java -jar fakeSMTP-2.0.jar --help

Well this concludes the installation of FakeSMTP Server

Hope you had good time reading it.

Thanks.

Tuesday, August 6, 2019

Installing SonarQube - 4.5.7 and Generating PDF Reports of the Analysis For an Ant Based Project in Ubuntu

Hi,

In this post, I am going to talk about how to perform static code analysis of any java project based on ANT build.

The Prerequisites section lists the items that we should have in place to preform the source code analysis and sonarqube is depending on.

Prerequisites
Name Version Download Page Direct Link
SonarQube 4.5.7 SonarQube Download Page Click to Download Directly
SonarQube Ant Task 2.5 SonarQube Ant Task Download Page Click to Download Directly
SonarQube Scanner API 2.8 SonarQube Scanner API Download Page Click to Download Directly
jsr305 3.0.0 jsr305-3.0.0.jar Download Page Click to Download Directly
Sonar PDF Report Plugin 1.4 Sonar PDF Report Plugin Download Page Click to Download Directly
Apache Ant 1.9.14 Apache Ant Click to Download Directly
MySql 5.7.26 MySql N/A

From the prerequisites section... I will be discussing the installation of first three items and for the last two, you can refer online for the installation of same.

1. Installation of MySql Server
If you have one already you can skip this section else you can check an other post of mine, the link to the post is given below. .

Installation of MySql Server on Ubutu

2. Creating Database for SonarQube
Login into mysql server, make sure you have the administrator privileges, In my case I am going to use the root account. Open up a Terminal and fire fire the command below
> mysql -u root -p
the above command would prompt you for password to key in, provide the password associated with the account, if the login is successful, then the mysql prompt would appear on the terminal.

At the mysql prompt, create a database using any name of your choice....
mysql> create database sonarqube;
create a user to access the database that we just created and grant full access to the user, the root account is sufficient to access the database, but it is not advisable to share or use the administrator account....

command to create a user
mysql> create user sonarqube identified by 'password';

command to give full access on the database 'sonarqube'
mysql> grant all privileges on sonarqube.* to 'sonarqube' identified by 'password'

2. Installation of SonarQube
Download SonarQube using the direct link given at the prerequisite section, and extract it to one of your favourite locations, make sure the location where you extract sonarqube has write permissions...

2.1 Updating SonarQube's Configuration File
Inside the extracted folder, you would find a folder named 'conf', navigate to that sub-directory and open the file 'sonar.properties' in your favourite text editor....

In my case I was using VI
> vi sonar.properties
In this file you would find three properties namely
1. sonar.jdbc.username
2. sonar.jdbc.password
3. sonar.jdbc.url

Un comment the above mentioned properties and update these as dictated below....

FROM:
sonar.jdbc.username=sonar

TO:
sonar.jdbc.username=sonarqube
FROM:
sonar.jdbc.password=sonar

TO:
sonar.jdbc.password=password
FROM:
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance

TO:
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonarqube?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance

3. Installing SonarQube Ant Task
Download the SonarQube Ant Task from the location given in the prerequisite section and extract it to your favourite location.

4. Installing SonarPDF Report Plugin
Download Sonar PDF Report Plugin from the location given in the prerequisites section and drop in the sonarqube server at the location given below....

<INSTALLATION-DIRECTORY-OF-SONARQUBE>/extensions/plugins

5. Start SonarQube Server
Open a terminal and navigate to the bin directory of sonarqube i.e <INSTALLATION-DIRECTORY-OF-SONARQUBE>/bin and fire the command below at the prompt...
> sonarqube/linux-x86-64/sonar.sh start
Pick the appropriate directory according to the Operation System you are working with.

After you start your sonarqube server... you could see the server writing tables required to generate the reports on the database... when you open your database and list the tables you should see similar to the image given below...


This concludes the sonarqube server setup...

6.Updating Ant's build.xml of the Project
Let us start updating the Ant's build.xml file of the project, assuming the build.xml file is like the one given below....
<project name="hello-world" basedir="." default="deploy">
<import file="build-common.xml" />
</project>
This build.xml file explains, the name of the project is 'hello-world' and the default task is deploy... along with that, the file imports other tasks from the file named 'build-common.xml'...

Now let us update the file build.xml in order to have the source code analysed for the project...

As a first step let us introduce "xmlns:sonar", this is one of the attributes of xml element <project>, after you introduce this attribute the build.xml file should like the one given below...
<project name="hello-world" basedir="." default="deploy" xmlns:sonar="antlib:org.sonar.ant">
<import file="build-common.xml" />
</project>

Next we are going to introduce new task definition to the project

<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
<classpath path="<SONAR-ANT-JARS-INSTALLATION-PATH>/jsr305-3.0.0.jar" />
<classpath path="<SONAR-ANT-JARS-INSTALLATION-PATH>/sonarqube-ant-task-2.5.jar" />
<classpath path="<SONAR-ANT-JARS-INSTALLATION-PATH>/sonar-scanner-api-2.8.jar" />
</taskdef>

Now the build.xml file should appear something like the one given below....

<project name="fiera-messaging-portlet" basedir="." default="deploy" xmlns:sonar="antlib:org.sonar.ant">
 
    <import file="../build-common.xml" />
 
    <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
        <classpath path="/home/ravaneswaran/sonar-ant-jars/jsr305-3.0.0.jar" />
        <classpath path="/home/ravaneswaran/sonar-ant-jars/sonarqube-ant-task-2.5.jar" />
        <classpath path="/home/ravaneswaran/sonar-ant-jars/sonar-scanner-api-2.8.jar" />
    </taskdef>
 
</project>

The next job is to introduce the sonar task, in order to do that update the build.xml file with the following lines

<target name="sonar" depends="compile">
     
        <property name="sonar.jdbc.url" value="jdbc:mysql://localhost:3306/sonarqube?useUnicode=true&amp;characterEncoding=utf8" />
        <property name="sonar.jdbc.username" value="sonarqube" />
        <property name="sonar.jdbc.password" value="password" />
     
        <property name="sonar.projectKey" value="hello-world" />
        <property name="sonar.projectName" value="Hello World" />
        <property name="sonar.projectVersion" value="1.0" />
        <property name="sonar.language" value="java" />
        <property name="sonar.sources" value="docroot" />
        <property name="sonar.binaries" value="docroot/WEB-INF/classes" />
        <property name="sonar.sourceEncoding" value="UTF-8" />
     
     
        <property name="sonar.exclusions" value="**/com/test/base/**/*,**/com/test/persistence/**/*,**/com/test/impl/**/*" />
        <echo>Sonar Report is Executing</echo>
        <echo>Sonar Report is Executing on Source Directory docroot/WEB-INF/src,docroot/html</echo>
     
        <!-- Execute SonarQube Scanner for Ant Analysis -->
        <sonar:sonar/>
    </target>

To brief some about the above target, this is nothing but the configurations that sonar ant would be looking for

if you look closely you can see  properties holding the values required to connect to database and to communicate to sonarqube server....

The final build.xml file would be like the one given below....

<project name="fiera-messaging-portlet" basedir="." default="deploy" xmlns:sonar="antlib:org.sonar.ant">
 
    <import file="../build-common.xml" />
 
    <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
        <classpath path="/home/fiera-mm/Downloads/sonar-ant-jars/jsr305-3.0.0.jar" />
        <classpath path="/home/fiera-mm/Downloads/sonar-ant-jars/sonarqube-ant-task-2.5.jar" />
        <classpath path="/home/fiera-mm/Downloads/sonar-ant-jars/sonar-scanner-api-2.8.jar" />
    </taskdef>
 
    <target name="sonar" depends="compile">
     
        <property name="sonar.jdbc.url" value="jdbc:mysql://localhost:3306/sonarqube?useUnicode=true&amp;characterEncoding=utf8" />
        <property name="sonar.jdbc.username" value="sonarqube" />
        <property name="sonar.jdbc.password" value="password" />
     
        <property name="sonar.projectKey" value="hello-world" />
        <property name="sonar.projectName" value="Hello World" />
        <property name="sonar.projectVersion" value="1.0" />
        <property name="sonar.language" value="java" />
        <property name="sonar.sources" value="docroot" />
        <property name="sonar.binaries" value="docroot/WEB-INF/classes" />
        <property name="sonar.sourceEncoding" value="UTF-8" />
     
     
        <property name="sonar.exclusions" value="**/com/test/base/**/*,**/com/test/persistence/**/*,**/com/test/impl/**/*" />
        <echo>Sonar Report is Executing</echo>
        <echo>Sonar Report is Executing on Source Directory docroot/WEB-INF/src,docroot/html</echo>
     
        <!-- Execute SonarQube Scanner for Ant Analysis -->
        <sonar:sonar/>
    </target>
 
    <target name="all" depends="clean,compile,sonar"/>
 
</project>


7 Generating the Reports
Now we are all set to generate the sonarqube analysis for our project "hello-world"

Make sure the sonarqube server is up and running.

Open up a terminal and navigate to the project directory and fire the command below to generate the analysis...
> ant sonar

8 Viewing the Reports
Now open up a browser and hit the following address on the address bar

http://localhost:9000

You can see the result of the analysis of sonarqube as the one given below...



Well this concludes this post, hope you have enjoyed it

Thanks.

Wednesday, July 10, 2019

Liferay Database Migration from 6.2.0.1-CE to 7.1.0-CE-GA1

Hi All,

This post details the steps to be taken care when you do the migration/upgrade process of database of liferay from 6.2.0.1-CE to 7.1.0-CE-GA1

1. Backing up the Database.
The first and the foremost one is to back up you old data... this can be achieved by taking the database dump of the portal, In my case I was using MYSQL as my back end, you can check the respective sites on How to take the database dump? if you use any other database server.

For MySql, the command given below would take the DB Dump of the data.
> mysqldump --routines --add-drop-table --disable-keys --extended-insert --host=localhost --port=3306 --user=root --verbose lportal --password > serverdump-of-database-lportal.sql
The above command takes the database dump and store it in a file named serverdump-of-database-lportal.sql (Assuming lportal is the database that liferay portal uses)

The above file can be used in case if there is a need to restore the database.

2. Creating a new database for the migration/upgrade
you can use the existing database or create a new one for the migration/upgrade, In the sense.... the database lportal database that liferay portal uses can be used, if you want the old database to be untouched, you can create a new one and restore the data that we dumped from the previous step.

Well, I am going to use the later one that is, a new database will be created and then the rest of the upgrade process would be continued....

To create a new database use the following command after login to the database server.

To login to the MySql Database Server
> mysql -u root -p
the above command would ask you to provide the password, provide the one associated with the root user account.

At the mysql prompt, fire the command to create a new database.
mysql> create database lportal_migration;
Now we have a empty database, the next step is to dump this database with the file that we have created in the previous step.

exit from mysql prompt, and fire the command below to populate the data...
> mysql -u root -D lportal_migration -p < serverdump_of_database-lportal.sql
the above command would take some time to complete the operation, relax till then.

Once the above operation is completed, you can the check the database by logging back in to the database server.

3. Installation of new liferay portal - 7.1.0-CE-GA1
You can download the said portal at the below mentioned location and unpack it to your favourite locaiton.

The next important step is to move the document_library of the old portal instance to the new portal instance

Just copy paste the document_library folder available at <liferay-portal-6.2.0.1-installation-path>/data/document_library to the location <liferay-portal-7.1.0-CE-GA1-installation-path>/data folder

if you find any other folder along with document_library, please move them too...

4. Creating portal-setup-wizard.properties File
You have to create a file named "portal-setup-wizard.properties" at the home location of the portal i,e <liferay-portal-7.1.0-CE-GA1-installation-path>/

Open the file in your favourite text editor and append the file with the lines given below...
jdbc.default.url=jdbc:mysql://localhost:3306/lportal_migration?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.username=root
jdbc.default.password=admin
setup.wizard.enabled=true
liferay.home=<installation-path-of-liferay-ce-portal-7.1.0-ga1>

5. Creating com.liferay.portal.upgrade.internal.configuration.ReleaseManagerConfiguration.config file
At the location <liferay-portal-7.1.0-CE-GA1-installation-path>/osgi/configs, create a file named "com.liferay.portal.upgrade.internal.configuration.ReleaseManagerConfiguration.config".

Open the file in a text editor and append the file with the following line
autoUpgrade="false"

6. Creating com.liferay.portal.search.configuration.IndexStatusManagerConfiguration.config file
At the location <liferay-portal-7.1.0-CE-GA1-installation-path>/osgi/configs, create a file named "com.liferay.portal.search.configuration.IndexStatusManagerConfiguration.config".

Open the file in a text editor and append the file with the following line
indexReadOnly="true"

7. Updating appserver.properties file
At the location <liferay-portal-7.1.0-CE-GA1-installation-path>/tools/portal-tools-db-upgrade-client/ you would find a file named "appserver.properties"

Open the file in a text editor and uncomment the lines you find under "Tomcat" and save the file.

8. Updating portal-upgrade-database.properties
At the location <liferay-portal-7.1.0-CE-GA1-installation-path>/tools/portal-tools-db-upgrade-client/ you would find a file named "portal-upgrade-database.properties"

Open the file in a text editor and replace the lines under ##MySql section as said below...
FROM :
#jdbc.default.driverClassName=com.mysql.jdbc.Driver
#jdbc.default.url=jdbc:mysql://localhost/lportal?characterEncoding=UTF-8&dontTrackOpenResources=true&holdResultsOpenOverStatementClose=true&useFastDateParsing=false&useUnicode=true
#jdbc.default.username=
#jdbc.default.password=

TO :
jdbc.default.url=jdbc:mysql://localhost:3306/lportal_migration?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.username=root
jdbc.default.password=admin
Save the file.

9. Updating portal-upgrade-ext.properties file.
At the location <liferay-portal-7.1.0-CE-GA1-installation-path>/tools/portal-tools-db-upgrade-client/ you would find a file named "portal-upgrade-ext.properties"

Open the file in a text editor and edit the file as said below
FROM :
#liferay.home=../../

TO :
liferay.home=<liferay-portal-7.1.0-CE-GA1-installation-path>
module.framework.base.dir=../../osgi

10. Running the "db_upgrade.sh" file.
This is the last step in the process, open up a terminal and navigate the folder <liferay-portal-7.1.0-CE-GA1-installation-path>/tools/portal-tools-db-upgrade-client/ and run the file at the file terminal
> ./db_upgrade.sh
In Case of windows operation system use the file "db_upgrade.bat"

During the upgrade process, if you encounter any error, you have to repeat the steps from the beginning.

Well that is it hope this post helped you in upgrading the database from 6.2.0.1 to 7.1.0

Thanks.


Monday, June 3, 2019

systemctl : Service Manager

In this post we will be discussing about systemctl service manager

the general syntax of the command takes the format as given below....
> sudo systemctl <status> <service-name.service>
the status from the above format can be different, I would like to mention some of them here
  • start
  • stop
  • enable
  • disable


  • and so on....
for eg... if you want to start mysql service in your linux box, you can use the following command to start the service.
> sudo systemctl start mysql

Similarly you can replace the status with the values furnished above....

The following is the command to stop the service
> sudo systemctl stop mysql
To enable the service, use the following command
> sudo systemctl enable mysql
To disable the service, the command takes the following format...
> sudo systemctl disable mysql
The mentioned above are some of the options included in SYSTEMCTL service manager tool....

If you would like to know the entire details of systemctl manager... you can use the command line....
> systemctl --help

Installing Python and Creating Virtual Environment for Pip for package installations in Ubuntu

Hi, In this post we are going to look at how to install Python and PIP and installing packages in virtual environments.. Without wasting...