×

Configure WordPress on Ubuntu Server with Apache - Step by step process to do it ?

This article covers setup WordPress — including Apache, MySQL, and PHP, on the Ubuntu Linux server. WordPress is the most popular CMS (content management system) on the internet. It allows you to easily set up flexible blogs and websites on top of a MySQL backend with PHP processing. WordPress has seen incredible adoption and is a great choice for getting a website up and running quickly. After setup, almost all administration can be done through the web frontend.


How to install PHP Extensions on Ubuntu?

1. You can download and install some of the most popular PHP extensions for use with WordPress by executing the commands:

$ sudo apt update
$ sudo apt install php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip

2. Then restart Apache to load these new extensions in the next section. 

If you are returning here to install additional plugins, you can restart Apache now by running:

$ sudo systemctl restart apache2


To install WordPress on Ubuntu:

1. Change into a writable directory and then download the compressed release by typing:

$ cd /tmp
$ curl -O https://wordpress.org/latest.tar.gz

2. Extract the compressed file to create the WordPress directory structure:

$ tar xzvf latest.tar.gz

3. Add a dummy .htaccess file so that this will be available for WordPress to use later.

Create the file by typing:

$ touch /tmp/wordpress/.htaccess

4. Copy over the sample configuration file to the filename that WordPress actually reads:

$ cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php

5. Create the upgrade directory, so that WordPress won't run into permissions issues when trying to do this on its own following an update to its software:

$ mkdir /tmp/wordpress/wp-content/upgrade

6. Copy the entire contents of the directory into our document root:

$ sudo cp -a /tmp/wordpress/. /var/www/wordpress


Install and Configure Apache Kafka on Ubuntu 20.04 - Step by Step process to implement this task ?

This article covers how to install and configure Apache Kafka on your Ubuntu 20.04 LTS machine. Apache Kafka is a distributed events streaming platform which has the ability to handle the high-performance data pipelines. It was originally developed by Linkedin then to be public as an open-source platform and used by many IT companies in the world.


Terms related to Apache Kafka Infrastructure:

1. Topic: A topic is a common name used to store and publish a particular stream of data. For example if you would wish to store all the data about a page being clicked, you can give the Topic a name such as "Added Customer".


2. Partition: Every topic is split up into partitions ("baskets"). When a topic is created, the number of partitions need to be specified but can be increased later as need arises. Each message gets stored into partitions with an incremental id known as its Offset value.


3. Kafka Broker: Every server with Kafka installed in it is known as a broker. It is a container holding several topics having their partitions.


4. Zookeeper: Zookeeper manages Kafka's cluster state and configurations.


Main advantages of using Apache Kafka:

1. Message Broking: In comparison to most messaging systems Kafka has better throughput, built-in partitioning, replication, and fault-tolerance which makes it a good solution for large scale message processing applications


2. Website Activity Tracking


3. Log Aggregation: Kafka abstracts away the details of files and gives a cleaner abstraction of log or event data as a stream of messages.


4. Stream Processing: capturing data in real-time from event sources; storing these event streams durably for later retrieval; and routing the event streams to different destination technologies as needed


5. Event Sourcing: This is a style of application design where state changes are logged as a time-ordered sequence of records.


6. Commit Log: Kafka can serve as a kind of external commit-log for a distributed system. The log helps replicate data between nodes and acts as a re-syncing mechanism for failed nodes to restore their data.


7. Metrics: This involves aggregating statistics from distributed applications to produce centralized feeds of operational data.


To install Apache Kafka on Ubuntu:

1. Update your fresh Ubuntu 20.04 server and get Java installed as illustrated below.

$ sudo apt update && sudo apt upgrade
$ sudo apt install default-jre wget git unzip -y
$ sudo apt install default-jdk -y

2. Fetch Kafka on Ubuntu 20.04.

$ cd ~
$ wget https://downloads.apache.org/kafka/2.6.0/kafka_2.13-2.6.0.tgz
$ sudo mkdir /usr/local/kafka-server && cd /usr/local/kafka-server
$ sudo tar -xvzf ~/kafka_2.13-2.6.0.tgz --strip 1

3. Create Kafka and Zookeeper Systemd Unit Files

i. Let us begin with Zookeeper service.

$ sudo vim /etc/systemd/system/zookeeper.service
[Unit]
Description=Apache Zookeeper Server
Requires=network.target remote-fs.target
After=network.target remote-fs.target
[Service]
Type=simple
ExecStart=/usr/local/kafka-server/bin/zookeeper-server-start.sh /usr/local/kafka-server/config/zookeeper.properties
ExecStop=/usr/local/kafka-server/bin/zookeeper-server-stop.sh
Restart=on-abnormal
[Install]
WantedBy=multi-user.target


ii. Then for Kafka service. Make sure your JAVA_HOME configs are well inputted or Kafka will not start.

$ sudo vim /etc/systemd/system/kafka.service
[Unit]
Description=Apache Kafka Server
Documentation=http://kafka.apache.org/documentation.html
Requires=zookeeper.service
After=zookeeper.service
[Service]
Type=simple
Environment="JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64"
ExecStart=/usr/local/kafka-server/bin/kafka-server-start.sh /usr/local/kafka-server/config/server.properties
ExecStop=/usr/local/kafka-server/bin/kafka-server-stop.sh
Restart=on-abnormal
[Install]
WantedBy=multi-user.target


iii. Reload the systemd daemon to apply changes and then start the services. 

$ sudo systemctl daemon-reload
$ sudo systemctl enable --now zookeeper
$ sudo systemctl enable --now kafka
$ sudo systemctl status kafka zookeeper


4. Install Cluster Manager for Apache Kafka (CMAK) | Kafka Manager.

$ cd ~
$ git clone https://github.com/yahoo/CMAK.git


5. Configure CMAK on Ubuntu.


Install Apache Web Server on CentOS 8 - Step by Step process to do it ?

This article covers how to install Apache web server on CentOS 8 distribution. With Apache we server, you can host web pages over the network. Apache is available within CentOS's default software repositories, which means you can install it with the dnf package manager.


To install Apache on CentOS:

1. Execute the command below to install the Apache package:

$ sudo dnf install httpd

After confirming the installation, dnf will install Apache and all required dependencies.

2. If you also plan to configure Apache to serve content over HTTPS, you will also want to open up port 443 by enabling the https service:

$ sudo firewall-cmd --permanent --add-service=https

3. Next, reload the firewall to put these new rules into effect:

$ sudo firewall-cmd --reload

After the firewall reloads, you are ready to start the service and check the web server.


To check your Apache Web Server:

1. Apache does not automatically start on CentOS once the installation completes, so you will need to start the Apache process manually:

$ sudo systemctl start httpd

2. Verify that the service is running with the following command:

$ sudo systemctl status httpd

You will receive an active status when the service is running.


To manage the Apache Process on CentOS:

Now that the service is installed and running, you can now use different systemctl commands to manage the service.

1. To stop your web server, type:

$ sudo systemctl stop httpd

2. To start the web server when it is stopped, type:

$ sudo systemctl start httpd

3. To stop and then start the service again, type:

$ sudo systemctl restart httpd

4. If you are simply making configuration changes, Apache can often reload without dropping connections. To do this, use this command:

$ sudo systemctl reload httpd

5. By default, Apache is configured to start automatically when the server boots. If this is not what you want, disable this behavior by typing:

$ sudo systemctl disable httpd

6. To re-enable the service to start up at boot, type:

$ sudo systemctl enable httpd

Apache will now start automatically when the server boots again.


Install and Configure Apache Web Server with Virtual Host on Debian 10 - Do it now ?

This article covers how to perform installation and configuration of Apache web server on Debian 10.

Also, you will learn how to create virtual hosts on an Apache server and troubleshoot errors. These steps are almost the same for Ubuntu and LinuxMint distributions.

Apache HTTP Server is a free and open-source web server that delivers web content through the internet. It is commonly referred to as Apache and after development, it quickly became the most popular HTTP client on the web.


On most systems if you installed Apache with a package manager, or it came preinstalled, the Apache configuration file is located in one of these locations: /etc/apache2/httpd. conf. /etc/apache2/apache2.


Debian/Ubuntu Linux Specific Commands to Start/Stop/Restart Apache:

1. Restart Apache 2 web server, enter: # /etc/init.d/apache2 restart. $ sudo /etc/init.d/apache2 restart.

2. To stop Apache 2 web server, enter: # /etc/init.d/apache2 stop.

3. To start Apache 2 web server, enter: # /etc/init.d/apache2 start.


To check running status of LAMP stack:

1. For Ubuntu: # service apache2 status.

2. For CentOS: # /etc/init.d/httpd status.

3. For Ubuntu: # service apache2 restart.

4. For CentOS: # /etc/init.d/httpd restart.

5. You can use mysqladmin command to find out whether mysql is running or not.


Install Linux, Apache, MariaDB, PHP (LAMP) Stack on Debian 10 - Step by step process to do it ?

This guide will help you on how to #install the LAMP stack (Linux, Apache, MariaDB, and PHP ) in your #Debian system. 

LAMP stands for Linux, Apache, MySQL, and PHP. Together, they provide a proven set of software for delivering high-performance web applications.

For a web application to work smoothly, it has to include an operating system, a web server, a database, and a programming language. 

A LAMP Stack is a set of open-source software that can be used to create websites and web applications. 

LAMP is an acronym, and these stacks typically consist of the Linux operating system, the Apache HTTP Server, the MySQL relational database management system, and the PHP programming language.

To Install #LAMP stack on Ubuntu:

1. Update your system. sudo apt-get update.

2. Install Mysql. sudo apt-get install mysql-server mysql-client libmysqlclient-dev.

3. Install #Apache server.

4. Install #PHP (php7.0 latest version of PHP).

5. Install #Phpmyadmin (for #database).


Steps to install Apache web server on Ubuntu 20.04 LTS ?

This article will guide you on steps to #install and configure #Apache on #Linux server.

Apache is one of the most popular web servers that allows you to run a secure website without too much of a headache.

#HTTPD is a program that is (essentially) a program known as Apache Web server. The only difference I can think of is that on Ubuntu/Debian the binary is called apache2 instead of httpd which is generally what it is referred to as on RedHat/CentOS. Functionally they are both 100% the same thing.

Apache server root will be located in /etc/httpd. The path to the apache #program will be /usr/sbin/httpd. In the document root three directories are created: cgi-bin, html and icons.

By default, Apache web server is instructed to listen for incoming connection and bind on port 80. If you opt for the TLS configuration, the server will listen for secure connections on port 443.

To start Apache server on Debian / Ubuntu Linux Specific Commands to Start/Stop/Restart Apache:

1. Restart Apache 2 web server, enter: # /etc/init.d/apache2 restart. $ sudo /etc/init.d/apache2 restart.

2. To stop Apache 2 web server, enter: # /etc/init.d/apache2 stop.

3. To start Apache 2 web server, enter: # /etc/init.d/apache2 start.


Steps to Configure and host an application in Apache web server in Linux ?

This article will guide you on the basics of #Apache configurations on Linux. This includes #firewall configuration, managing Apache services, setting up virtual hosts, changing default listening #ports, and allowing/denying specific IPs from accessing the #sites. For more information about Apache configurations, visit Apache server official documentation at http://httpd.apache.org/docs/. Apache #HTTP Server is a free and open-source web server that delivers web content through the internet. It is commonly referred to as Apache and after development, it quickly became the most popular HTTP client on the web. To Set Up Virtual Hosts in Apache: 1. Set up a #domain name. The server block that is enabled by default is capable of serving documents from /var/www/html. 2. Enable the domain configuration file. 3. Test for errors. 4. Test if Apache is serving your domain name.