Setting Up WordPress in your own Server

Download and extract WordPress

wget https://wordpress.org/latest.tar.gz

tar -xzvf latest.tar.gz

Create a database and a user and link that to your WordPress

You can use either MySQL database or MariaDB as a backend for your WordPress. In this tutorial, I'll show using MySQL.

# . Install mysql

sudo apt-get install mysql-server

# Note: the root password can be found in /etc/mysql/debian.cnf in Ubuntu

Next, log into your mysql-server using mysql-client and create a database and a user for wordpress

mysql -u root -p root_password

mysql> CREATE DATABASE wordpressdb1;
mysql> GRANT ALL PRIVILEGES ON databasename.* TO "wordpressdb1user"@"%"
-> IDENTIFIED BY "wordpressdb1user_pass"; 

Now, link the database to wordpress by copying wp-config-sample.php to wp-config.php and editing it as follows:

define( 'DB_NAME', 'wordpressdb1' );

/** MySQL database username */
 define( 'DB_USER', 'wordpressdb1user' );

/** MySQL database password */
define( 'DB_PASSWORD', 'wordpressdb1user_pass' );

Install Php and Apache2

sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql

sudo apt-get install apache2

Install WordPress

When you have apache2 server, the http files are served from /var/www/html/ folder. Move all the files and folder of wordpress to this folder and restart apache2 server by running the command sudo service apache2 restart

Now, point your browser to http://ip-address-of-your-machine/wp-admin/install.php and the wordpress installation will start.

Create a Maven Project For JAVA and Scala

Scala

mvn archetype-generate

And type in the number for the highlighted one as shown below. We are looking for the archetype org.scala-tools.archetypes:scala-archetype-simple

The following prompts will ask you for the group-id and artifact-id and may be some other things, but when you are done, maven will create a sample pom.xml file and directory structure with src/main/scala, src/test/scala.

That's it. Now you can start coding in Scala and compile and build your code using Maven.

JAVA

mvn archetype-generate

And type in the number for the highlighted one as shown below. We are looking for the archetype org.apache.maven.archetypes:maven-archetype-quickstart

The following prompts will ask you for the group-id and artifact-id and may be some other things, but when you are done, maven will create a sample pom.xml file and directory structure with src/main/java, src/test/java.

That's it. Now you can start coding in JAVA and compile and build your code using Maven.