CentOS 8 – TecAdmin https://tecadmin.net How to guide for System Administrator's and Developers Wed, 25 May 2022 09:39:33 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.1 How To Install Security Updates on CentOS 8 (Manual + Automatic) https://tecadmin.net/how-to-install-security-updates-on-centos-8/ https://tecadmin.net/how-to-install-security-updates-on-centos-8/#respond Wed, 09 Jun 2021 08:38:35 +0000 https://tecadmin.net/?p=25705 Updates are essential in any operating system environment because it allows application, processes and the operating system itself to be in a consistent working condition. That’s also the reason that most of the updates include security compatibility and enhancements. Why are security updates so important to install? Your computer’s vulnerabilities are fixed with the help [...]

The post How To Install Security Updates on CentOS 8 (Manual + Automatic) appeared first on TecAdmin.

]]>
Updates are essential in any operating system environment because it allows application, processes and the operating system itself to be in a consistent working condition. That’s also the reason that most of the updates include security compatibility and enhancements.

Why are security updates so important to install?

Your computer’s vulnerabilities are fixed with the help of security updates. These updates protect your system from local and remote threats. When developers found any vulnerability, they try to fix it quickly and then distribute the “quick fix” as a security update for you to install it as soon as possible. As those vulnerabilities become public, permitting the potential attackers to exploit them. This statement declares that an outdated system is vulnerable, but it is also recognized as a vulnerable system for attackers.

Security updates also play a significant role in the Linux environment since they give the administrator complete control over performance expectations. Therefore, it’s usually a good idea to keep your Linux software up to date, especially when we talk about its security. Users should generally install security updates in Linux systems within 30 days of their release date. This post will demonstrate the manual and automatic installation method of security update on your CentOS 8. So let’s head towards this journey!

Manual Installation Method of Security Updates:

Now you will look at the procedure of checking and installing security updates manually. Additionally, this section comprises checking system updates and manually updating a particular package on your system.

1. First of all, open up your terminal and write out the below-given command to note down your current kernel version of CentOS 8.

uname -r 

Check Kernal Version on CentOS 8

2. Next, we will check for the security updates on the system. For that, execute the following command:

dnf check-update 

DNF Check Packages Update CentOS 8

3. To install the available security updates for installed packages on your CentOS 8, utilize this command:

sudo dnf update --security 

DNF Check Security Update CentOS 8

4. The output declares that the system doesn’t need any security updates. In other cases, execute the below-given commands:

sudo dnf upgrade --security 

DNF Upgrade Security Packages CentOS 8

5. You can also verify if there exists any notice related to security updates.

$ sudo dnf updateinfo 

DNF Check Update Info CentOS 8

6. To manually a single package, specify the name of the package in the “check-update” command. For instance, we will try to update the “firewalld.noarch” package manually.

sudo dnf check-update firewalld.noarch 

DNF Upgrade Specific Package Manually CentOS 8

Automatic Installation method of Security Updates:

Although security updates can be checked and installed manually, the automatic way is safer. Unfortunately, sometimes, we may forget about the security updates, making our system vulnerable to inadvertent attacks.

1. In this regard, “dnf-automatic” is utilized to run automatic security updates and regularly using cron tasks and system timers. This also minimizes the need for ongoing engagement by the system administrator.
Write out the following command to install “dnf-automatic” on your CentOS 8.

sudo dnf install dnf-automatic  

Install dnf-automatic Package on CentOS 8

Enter “y” for giving permission to the installation process.

2. Execute the below-given command to verify if everything is correctly installed or not.

rpm -qi dnf-automatic  

The output will provide you lots of information about the installed “dnf-automatic” which includes its version, group, size, packager, architecture, etc.

3. Now, we will update the configuration file of dnf-automatic.

sudo nano /etc/dnf/automatic.conf 

On your system, the dnf-configuration file will be edited:

4. In the commands section modify the “upgrade_type” as follows:

upgrade_type = security

DNF Set Automatic Upgrade to Security

5. Also, you have to add your system name in the “emitters” section and set its mode to “motd”.

system_name = CentOS 8

emit_via = motd

DNF Automatical Upgrade Settings on CentOS 8

6. To begin the execution of the whole procedure, start and enable the “dnf-automatic” on your CentOS 8 system.

sudo systemctl enable --now dnf-automatic.timer 

DNF enable automatic timer service CentOS 8

7. Check the “dnf-automatic” service status.

sudosystemctl list-timers * dnf- * 

You will see the “no timer listed” output if you haven’t created any timer task. Otherwise, the output will let you know the details about the assigned tasks and their specific time.

Conclusion

Always be aware of the procedures to protect your system against threats and vulnerabilities. The first step is to keep your Linux-based system up-to-date. In this post, we have shared the methods of manual and automatic installation of security updates on your CentOS 8.

The post How To Install Security Updates on CentOS 8 (Manual + Automatic) appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-install-security-updates-on-centos-8/feed/ 0
How to Install PHP 8 on CentOS/RHEL 8 https://tecadmin.net/how-to-install-php-8-on-centos-rhel-8/ https://tecadmin.net/how-to-install-php-8-on-centos-rhel-8/#respond Mon, 15 Feb 2021 15:50:01 +0000 https://tecadmin.net/?p=24627 PHP 8.0 is a major update released by the PHP team on Nov 26, 2020. It contains a large number of new features and optimizations over previous versions. To read more about read the PHP 8 change log. REMI and EPEL are the most popular repositories contains latest RPM packages for installation. It also contains [...]

The post How to Install PHP 8 on CentOS/RHEL 8 appeared first on TecAdmin.

]]>
PHP 8.0 is a major update released by the PHP team on Nov 26, 2020. It contains a large number of new features and optimizations over previous versions. To read more about read the PHP 8 change log.

REMI and EPEL are the most popular repositories contains latest RPM packages for installation. It also contains the PHP 8 RPM packages to be install on CentOS/RHEL 8 systems.

This article will describe you to how to install PHP 8 on CentOS 8 or RHEL 8 Linux system.

Before we Begin

Login to the CentOS 8 system with sudo privileged account.

Optionally, you can upgrade the current packages on your system by executing command.

dnf upgrade  

Step 1 – Enable PHP Repository

The CentOS/RHEL default repositories don’t contain latest PHP 8 packages. In order to install PHP 8 on CentOS 8 system, enable EPEL and REMI yum repositories on your system.

Open a terminal and execute below commands to configure REMI and EPEL repositories:

sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm 
sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm  

Once you installed both the above packages, Use dnf command line tool to active php:remi-8.0 repository, which contains PHP 8 packages.

sudo dnf module enable php:remi-8.0 -y  

Verify the active repository for the php packages on your system.

sudo dnf module list php  

Make sure the remi-8.0 steam is active for the php packages. It will have [e] just after the repository name. See the below screenshot:

Enable PHP 8 Repository on CentOS/RHEL 8

Step 2 – Installing PHP 8 on CentOS

Your system is ready for the PHP 8 installation. Run the following command from terminal.

sudo dnf install php php-cli php-common  

Press ‘y’ for any confirmation prompted during installation.

Once the installation succeeded, execute the below command to view installed PHP version on your syste.

php -v  

Install PHP 8 on CentOS 8

At this stage, you have successfully install PHP 8 on CentOS 8 and RHEL 8 systems.

Step 3 – Install Apache with PHP 8 on CentOS

This is the optional step for you, if you just need PHP CLI to running php scripts.

But in most cases, we use Apache for deploying PHP based web application. Just execute the following command to Apache web server on your system.

sudo dnf install httpd -y  

Now, verity that Apache is read to serve php files over the web. Lets create php info file on your CentOS server. The default virtulhost uses /var/www/html as document root. So create a file under this directory:

echo "<?php phpinfo(); ?>" >  /var/www/html/info.php  

Next access info.php file using the server ip address as below:

Installing PHP 8 on CentOS/RHEL 8

Step 4 – Installing PHP Extension

Generally the web application depends on multiple PHP extension. A PHP extension is a specially formed library for the specific tasks.

View the available PHP extensions, type:

sudo dnf search php-* 

Now, install all the required PHP extension for your application.

sudo dnf install php-gd php-mbstring php-mysqlnd 

Use -m option to view currently enabled php extensions.

php -m 
php -m | grep extension-name 

Conclusion

This tutorial helped you to install PHP 8.0 including the required extension on CentOS/RHEL 8 Linux system.

The post How to Install PHP 8 on CentOS/RHEL 8 appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-install-php-8-on-centos-rhel-8/feed/ 0
How to Install Python 3.9 on CentOS/RHEL 8 https://tecadmin.net/install-python-3-9-on-centos-8/ https://tecadmin.net/install-python-3-9-on-centos-8/#comments Mon, 30 Nov 2020 17:59:09 +0000 https://tecadmin.net/?p=23473 Recently, the Python development team released the latest stable version of Python 3.9. You can download it from its official pages. The new version comes with multiple new features and security updates. Python 3.9 uses a new more flexible parser, based on PEG, which replaces the LL parser. In the next Python versions, the old [...]

The post How to Install Python 3.9 on CentOS/RHEL 8 appeared first on TecAdmin.

]]>
Recently, the Python development team released the latest stable version of Python 3.9. You can download it from its official pages. The new version comes with multiple new features and security updates. Python 3.9 uses a new more flexible parser, based on PEG, which replaces the LL parser. In the next Python versions, the old parser will be deleted.

This tutorial describes how to install Python 3.9 on CentOS 8 and RHEL 8 systems. In this tutorial, we will install Python from the source code.

Prerequisites

This Python installation required the GCC compiler on your system. Login to your server using ssh or shell access. Now, use the following command to install prerequisites for Python before installing it.

sudo dnf install wget yum-utils make gcc openssl-devel bzip2-devel libffi-devel zlib-devel 

Step 1 – Download Python 3.9

Visit the official download site https://www.python.org/ftp/python to download the latest or required version of the Python.

Command line users can download Python 3.9 via command line:

wget https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz 

Then, extract the archive file on your system

tar xzf Python-3.9.6.tgz 

This will create a directory named Python-3.9.6 in the current directory containing all source files for Python 3.9.

Step 2 – Install Python on CentOS 8

Change directory to Python-3.9.6. Then prepare the source code with the required values before compiling it.

cd Python-3.9.6 
sudo ./configure --with-system-ffi --with-computed-gotos --enable-loadable-sqlite-extensions 

Next, compile the source code with make. Here nproc will provide the number of CPU cores available on system. So that make can perform well.

sudo make -j ${nproc} 
sudo make altinstall 
make altinstall is used to prevent replacing the default python binary file /usr/bin/python.

Now, we don’t need the downloaded archive file, so delete it to free space.

sudo rm Python-3.9.6.tgz 

Step 3 – Test Python Version

At this step, you have successfully installed Python 3.9 on CentOS/RHEL system. Now, check the installed versions of Python and PIP.

Check Python Version:

python3.9 -V  

Python 3.9.6

Check PIP Version:

pip3.9 -V  

pip 20.2.3 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)

Step 4 – Create Virtual Environment

It is a good idea to create a separate virtual environment for each Python application. Which provides an isolated environment where the Python project has its own modules and set of dependencies.

To create Python virtual environment, run:

sudo /usr/local/bin/python3.9 -m venv /home/rahul/python-app/venv 

All the files will be generated under /home/rahul/python-app/venv directory. You can active the environment by running command:

source /home/rahul/python-app/venv/bin/activate 

Do your stuff with isolated environment here. Once you finish with your work, deactivate the environment by typing:

deactivate 

This will return you back to the main system prompt.

Conclusion

This tutorial described you to install Python 3.9 on CentOS 8 and RHEL 8 systems using source code.

The post How to Install Python 3.9 on CentOS/RHEL 8 appeared first on TecAdmin.

]]>
https://tecadmin.net/install-python-3-9-on-centos-8/feed/ 3
How To Install Memcached on CentOS/RHEL 8 https://tecadmin.net/how-to-install-memcached-on-centos-8/ https://tecadmin.net/how-to-install-memcached-on-centos-8/#respond Sat, 08 Aug 2020 09:20:41 +0000 https://tecadmin.net/?p=22144 Memcached is a distributed memory object caching system which stored data in memory on key-value basis. It is very useful for optimizing dynamic websites and enabled speed by caching objects in memory. Read more about Memcache. This article will help you to install Memcached and PHP Memcache extension on CentOS 8 and RHEL 8 Linux [...]

The post How To Install Memcached on CentOS/RHEL 8 appeared first on TecAdmin.

]]>
Memcached is a distributed memory object caching system which stored data in memory on key-value basis. It is very useful for optimizing dynamic websites and enabled speed by caching objects in memory. Read more about Memcache.

This article will help you to install Memcached and PHP Memcache extension on CentOS 8 and RHEL 8 Linux systems.

Prerequisites

You must have a running CentOS 8 or RHEL 8 Linux system with sudo privileged account access.

Step 1 – Install Memcached Server

The Memcached rpm packages are available under the default packages repository on CentOS/RHEL 8 systems.

First, update the DNF cache on your system. After that install Memcached using the following commands. This will also install required libraries on your system.

sudo dnf update -y
sudo dnf install memcached libmemcached -y

Above commands will install Step 2 – Memcached Configuration

You have successfully installed Memcached server. Now configure your Memcache server for various options.

Memcached service configuration file is /etc/sysconfig/memcached, Edit the configuration file in your favorite text editor:

sudo  vi /etc/sysconfig/memcached

Now update the following values as per your requirements.

PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS="-l 127.0.0.1,::1"

Here the options are:

  • PORT – Define the port number to Memcahe service listen on. The default Memcached port is 11211.
  • USER – Set the username under which the Memcached service run
  • MAXCONN – Set the maximum connection to accept at any time
  • CACHESIZE – Set the cache limit
  • OPTIONS – You an pass additional options to service. The -l option is used to define ip address to which application listen for. You can change this value to LAN/WAN IP to allow Memcache to listen for remote addresses.

Save your file and close it.

Step 3 – Manage Memcached Service

Now start Memcached service by running the following command.

sudo systemctl start memcached

You also need to enable Memcached service to start on system boot. Run below command to do this:

sudo systemctl enable memcached

The Memcached service is up and running now. To view the stats of the Memcached service, execute following command from terminal. This will provide all details about the Memcached service.

echo "stats settings" | nc localhost 11211 

Output:

STAT maxbytes 67108864
STAT maxconns 1024
STAT tcpport 11211
STAT udpport 0
STAT inter 127.0.0.1,::1
STAT verbosity 0
STAT oldest 0
STAT evictions on
STAT domain_socket NULL
STAT umask 700
STAT growth_factor 1.25
STAT chunk_size 48
STAT num_threads 4
STAT num_threads_per_udp 1
STAT stat_key_prefix :
...
...
END

Step 4 – Adjust Firewall Rules

Additionally, we need to allow traffic to the Memcached server by opening the default port ( port 11211) on the firewall.

Therefore, run the commands below:

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

Step 5 – Install PHP Memcached Extension

To connect Memcache service from a PHP based applications, you need to install Memcache PHP extension. This extension must be installed on the same server where PHP application is running on. If your PHP application also running with CentOS/RHEL 8 system, follow below instructions to enable Memcached extension.

There are two type of extensions available for PHP. First is Memcache is used by earlier version of PHP applications. The latest PHP Application’s uses “Memcached” extension. The below commands will install both (Memcache and Memcached) extension on your CentOS 8 and RHEL 8 system.

sudo dnf install epel-release -y
sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm -y
sudo dnf module reset php
sudo dnf module enable php:remi-7.4 -y
sudo dnf install php-pecl-memcached php-pecl-memcache -y

Restart Apache service to enable extension

sudo systemctl restart httpd.service

Now check if memcache PHP extension is enabled and working properly. Create a phpinfo.php file using following code

sudo vi /var/www/html/phpinfo.php

<?php
  phpinfo();
?>

Now access phpinfo.php on web interface and search for Memcache or Memcached, You will get result like below.

http://server-ip-addr/phpinfo.php

Installing Memcached CentOS 8

Conclusion

In this tutorial you have learned to install Memcached caching server on CentOS/RHEL 8 system. Also installed PHP Memcached extension.

The post How To Install Memcached on CentOS/RHEL 8 appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-install-memcached-on-centos-8/feed/ 0
How To Install Apache Solr 9.0 on CentOS/RHEL 8 https://tecadmin.net/how-to-install-apache-solr-on-centos-8/ https://tecadmin.net/how-to-install-apache-solr-on-centos-8/#respond Sun, 05 Jul 2020 08:54:53 +0000 https://tecadmin.net/?p=21898 Apache Solr is an open-source search platform written on Java. Solr provides full-text search, spell suggestions, custom document ordering and ranking, Snippet generation, and highlighting. Solr handles a variety of data types out of the box, including JSON, XML, many Office documents, CSV, and more. At the time of writing this tutorial, Solr 8.9.0 is [...]

The post How To Install Apache Solr 9.0 on CentOS/RHEL 8 appeared first on TecAdmin.

]]>
Apache Solr is an open-source search platform written on Java. Solr provides full-text search, spell suggestions, custom document ordering and ranking, Snippet generation, and highlighting. Solr handles a variety of data types out of the box, including JSON, XML, many Office documents, CSV, and more. At the time of writing this tutorial, Solr 8.9.0 is the latest version available for installation.

This tutorial will help you to install Apache Solr 9.0 on CentOS/RHEL 8 systems.

Prerequisites

We assume you already have shell access to your CentOS/RHEL 8 system with a sudo privilege account. For remote systems, log in with the SSH client.

Step 1 – Install Java

Apache Solr 9.0 required Java 11 or greater version to run. Make sure your system fulfills the Java requirements on your system. If not run the following command to install Java.

sudo dnf install java-11-openjdk  

Then check installed Java version:

java -version

openjdk version "11.0.4" 2019-07-16 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.4+11-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.4+11-LTS, mixed mode, sharing)

Step 2 – Install Apache Solr on CentOS/RHEL 8

Now download the required Solr version from its official site or mirrors. You may also use the below command to download Apache Solr 9.0 from its official website. After that extract the installer script.

wget https://dlcdn.apache.org/solr/solr/9.0.0/solr-9.0.0.tgz

In case the download fails with 404 error. Visit the official Solr download page to download the latest available version.

tar xzf solr-9.0.0.tgz solr-9.0.0/bin/install_solr_service.sh --strip-components=2

Then execute the installer script with bash shell followed with downloaded Archive file. The command will be like below:

sudo bash ./install_solr_service.sh solr-9.0.0.tgz 

This will create an account named solr on your system and finish the installation process. After that start the service default Solr port 8983.

Step 3 – Manageing Apache Solr Service

Apache Solr service is managed under the systemd daemon. Use the following commands to Start, Stop and check the status of the Solr service.

sudo systemctl stop solr 
sudo systemctl start solr  
sudo systemctl status solr 

Step 4 – Create a New Collection

A collection is a group of cores that together form a single logical index. A collection has a different set of configuration files and schema definitions than other collections. You can create a collection by running the following command:

sudo su - solr -c "/usr/local/solr/bin/solr create -c mycol1 -n data_driven_schema_configs" 

Sample output:

Created new core 'mycol1'

Step 5 – Access Solr Admin Panel

By default, the Solr server runs on port 8983. Access Solr dashboard in your web browser using server ip address or hostname with 8983 port.

  http://demo.tecadmin.net:8983/

How to Install Solr on CentOS 8

Here you can view statics of created collection in previous steps named “mycol1”. Click on “Core Selector” on the left sidebar and select created collection.

Install Apache Solr on CentOS 8

Conclusion

In this tutorial, you have learned to install Apache Solr on CentOS/RHEL 8 system. Also created a new collection in the Apache Solr server via a command-line utility.

The post How To Install Apache Solr 9.0 on CentOS/RHEL 8 appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-install-apache-solr-on-centos-8/feed/ 0
How to Install Laravel 9 on CentOS 8 https://tecadmin.net/install-laravel-on-centos-8/ https://tecadmin.net/install-laravel-on-centos-8/#comments Wed, 24 Jun 2020 03:33:06 +0000 https://tecadmin.net/?p=21840 Laravel is a powerful, open-source PHP web framework, designed for the faster development of web applications. It is based on the Symfony framework, follows the MVC architectural pattern. During the recent update of this tutorial, Laravel 9 is the latest version available. The Laravel framework also provides a command-line interface (CLI) known as Artisan. It [...]

The post How to Install Laravel 9 on CentOS 8 appeared first on TecAdmin.

]]>
Laravel is a powerful, open-source PHP web framework, designed for the faster development of web applications. It is based on the Symfony framework, follows the MVC architectural pattern. During the recent update of this tutorial, Laravel 9 is the latest version available.

The Laravel framework also provides a command-line interface (CLI) known as Artisan. It provides helpful commands to perform operations for your applications.

This article will help you to install the Laravel PHP Framework on CentOS 8 systems.

Prerequisites

  • The newly installed system’s follow initial server setup.
  • Shell access with sudo privileges account.

Step 1 – Installing LAMP Stack

First of all, Laravel required LAMP stack to be running LAMP stack on your CentOS 8 system. The systems that have already run the LAMP stack can skip this step else use the following commands to install it.

Install Apache2

The Apache packages can be directly installed on default repositories.

sudo dnf install httpd

Once you installed the web server, type curl http://localhost, which will display HTML content on your screen.

Install MySQL

Use the following command to install MySQL on your system. For the detailed instructions visit here.

sudo dnf install @mysql
sudo mysql_secure_installation

Follow the MySQL initial configuration wizard to set a new password.

Install PHP

Laravel required PHP 7.2 or higher version. The official repositories already contains the required version’s of PHP packages. So, we can simply install the PHP by executing the following command:

sudo dnf install php php-curl php-bcmath php-dom php-xml php-mbstring php-json

Step 2 – Installing PHP Composer

Composer is used to creating new Laravel applications or installing dependencies for an existing applications. Run the below commands to download and install PHP composer on your system.

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
chmod +x /usr/local/bin/composer

Step 3 – Create Laravel Application

Next, create a Laravel application using the composer package manager. Switch to your projects directory and create a Laravel application using “composer create-project laravel/laravel” followed by application name.

cd /var/www
composer create-project laravel/laravel myLaravelApp

The above commands will download the Laravel project files and install all the required dependencies on your CentOS system.

Next, set the 32 bit long random number encryption key, which is used by the Illuminate encrypter service.

cd /var/www/myLaravelApp
php artisan key:generate

Application key set successfully.

Step 4 – Access Laravel Application

Run your Laravel application in a development environment using php artisan. After that, I’ll tell you how you should deploy it on Apache.

Run the below command from your Laravel application. You can change the host to your LAN IP or localhost to restrict access.

php artisan serve --host 0.0.0.0 --port=8000

Access Laravel application using localhost (for local systems) or server IP address and specified port.

install Laravel development on CentOS 8

Step 5 – Setup Laravel with Apache

Now add a Virtual Host in your Apache configuration file to access Laravel framework from web browser. To do it create Apache configuration file /etc/httpd/conf.d/laravel.conf and add below code:

sudo vim /etc/httpd/conf.d/laravel.conf
File: /etc/httpd/conf.d/laravel.conf
<VirtualHost *:80>
       ServerName laravel.example.net
       DocumentRoot /var/www/myLaravelApp/public

       <Directory /var/www/myLaravelApp>
              AllowOverride All
       </Directory>
</VirtualHost>

Restart Apache service and access the Laravel framework using your favorite web browser.

sudo systemctl restart httpd.service

Now, set the proper permission for the application files and directories.

chown -R apache.apache /var/www/myLaravelApp
chmod -R 755 /var/www/myLaravelApp
chmod -R 755 /var/www/myLaravelApp/storage

SELinux enabled systems also run the below command to allow write on storage directory.

chcon -R -t httpd_sys_rw_content_t /var/www/myLaravelApp/storage

Finally, access your Laravel application in a web browser.

Conclusion

In this tutorial, you have learned to create a new Laravel application with a composer and run it on a development system. Also deployed laravel on Apache server.

The post How to Install Laravel 9 on CentOS 8 appeared first on TecAdmin.

]]>
https://tecadmin.net/install-laravel-on-centos-8/feed/ 3
How to Install Python 3.8 on CentOS/RHEL 8 https://tecadmin.net/install-python-3-8-on-centos-8/ https://tecadmin.net/install-python-3-8-on-centos-8/#comments Sun, 24 May 2020 12:48:27 +0000 https://tecadmin.net/?p=21625 Python is a powerful, friendly, and easy to learn programming language. At the writing time of this article Python 3.8 latest stable version is available to download and install. This article will help you to install Python 3.8 from the source on your CentOS 8 and RHEL 8 Linux systems. Prerequisites First of all, log [...]

The post How to Install Python 3.8 on CentOS/RHEL 8 appeared first on TecAdmin.

]]>
Python is a powerful, friendly, and easy to learn programming language. At the writing time of this article Python 3.8 latest stable version is available to download and install.

This article will help you to install Python 3.8 from the source on your CentOS 8 and RHEL 8 Linux systems.

Prerequisites

First of all, log in to your CentOS 8 system with a root or sudo privileged account.

Then use the following command to install the required development libraries for Python before installing it.

sudo dnf install gcc openssl-devel bzip2-devel libffi-devel

Downloading Python 3.8

You can download Python using the following command from its official site. We also recommend to visit python ftp directory to check for latest version. To download Python 3.8.5, use the following commands.

cd /opt
wget https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz

Then, extract the downloaded archive on your system.

tar xzf Python-3.8.12.tgz

Install Python on CentOS 8

Switch to the extracted directory. Then configure the source files based on your system environment. After that use the following commands to compile Python source code on your system using altinstall.

cd Python-3.8.12
sudo ./configure --enable-optimizations
sudo make altinstall
make altinstall is used to prevent replacing the default python binary file /usr/bin/python and create separate binary file.

Now remove downloaded source archive file from your system

sudo rm Python-3.8.12.tgz

Test Python

Using the above installation, Python creates a separate binary file on your system. To use Python 3.8, you need to use a specific binary file. To test Python 3.8, execute:

python3.8 -V

Python 3.8.12

Conclusion

In this tutorial, you have learned to install Python 3.8 on CentOS 8 from source code.

The post How to Install Python 3.8 on CentOS/RHEL 8 appeared first on TecAdmin.

]]>
https://tecadmin.net/install-python-3-8-on-centos-8/feed/ 1
How to Install Python 3.7 on CentOS/RHEL 8 https://tecadmin.net/install-python-3-7-on-centos-8/ https://tecadmin.net/install-python-3-7-on-centos-8/#comments Sun, 24 May 2020 12:48:23 +0000 https://tecadmin.net/?p=21642 Python is a friendly, powerful and easy to learn programming language. At the writing time of this article Python 3.8 latest stable version is available to download and install. The default yum repositories provides Python 3.6 packages to install on CentOS 8 systems. So this article will help you to install Python 3.7 by compiling [...]

The post How to Install Python 3.7 on CentOS/RHEL 8 appeared first on TecAdmin.

]]>
Python is a friendly, powerful and easy to learn programming language. At the writing time of this article Python 3.8 latest stable version is available to download and install.

The default yum repositories provides Python 3.6 packages to install on CentOS 8 systems. So this article will help you to install Python 3.7 by compiling source code on CentOS 8 and RHEL 8 Linux systems.

Prerequisites

Login to your CentOS 8 system with root or sudo privileged account. Desktop users open a terminal on your system.

Then use the following command to install required development libraries for Python before installing it.

sudo dnf install gcc openssl-devel bzip2-devel libffi-devel

Download Python 3.7 Archive

You can download Python using following command from its official site. We also recommend to visit python ftp directory to check for latest version. To download Python 3.7.9, use the following commands.

cd /opt
wget https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tgz

Then, extract the downloaded archive on your system.

tar xzf Python-3.7.9.tgz

Install Python 3.7 on CentOS 8

After extracting the archive file, switch to the extracted directory. Then configure the source files based on your system environment. After that use following commands to compile python source code on your system using altinstall.

cd Python-3.7.9
sudo ./configure --enable-optimizations
sudo make altinstall
make altinstall is used to prevent replacing the default python binary file /usr/bin/python and create separate binary file.

Now remove downloaded source archive file from your system

sudo rm Python-3.7.9.tgz

Test Python Version

Using the above installation, Python creates a separate binary file on your system. To use Python 3.8, you need to use the specific binary file. To test the Python 3.7, execute:

python3.7 -V

Python 3.7.9

Conclusion

In this tutorial, you have learned to install Python 3.7 on CentOS 8 from source code.

The post How to Install Python 3.7 on CentOS/RHEL 8 appeared first on TecAdmin.

]]>
https://tecadmin.net/install-python-3-7-on-centos-8/feed/ 6
How to Install Parse Server on CentOS 8 https://tecadmin.net/install-parse-server-centos-8/ https://tecadmin.net/install-parse-server-centos-8/#respond Wed, 13 May 2020 16:54:23 +0000 https://tecadmin.net/?p=21265 Parse Server is an open source application written on node.js. It is used as Backend As A Service (BAAS) platform. It helps developers to build their mobile application’s backend. Parse dashboard is another application built on node.js by the parse developers. It is an frontend web interface for managing backend parse server. You can add [...]

The post How to Install Parse Server on CentOS 8 appeared first on TecAdmin.

]]>
Parse Server is an open source application written on node.js. It is used as Backend As A Service (BAAS) platform. It helps developers to build their mobile application’s backend.

Parse dashboard is another application built on node.js by the parse developers. It is an frontend web interface for managing backend parse server. You can add and manage multiple parse server from single dashboard.

This tutorial will help you to setup parse server and dashboard on CentOS Linux system.

Prerequisites

  • Launched a CentOS 8 instance on Digitalocean.
  • Setup a sudo privileged account and apply initial security by following initial server setup
  • Login to instance via SSH as root account

Step 1 – Install Node.js

Parser server required Node.js to be installed on system. You can install Node.js from the offical yum repository. To configure yum repository execute:

dnf install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash -

The run the following commands to install Node.js on your server.

sudo dnf install -y nodejs

Step 2 – Install Yarn

Yarn package is available to install with NPM repository. You can also install yarn using the dnf package manager utility. Execute below commands to add yarn repository to your system:

sudo rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo

Then install yarn using the dnf command:

sudo dnf install yarn --disablerepo=AppStream 

Step 3 – Install MongoDB

Add the following content in yum repository configuration file mongodb.repo as per your required MongoDB version and system architecture. For this article, we are using MongoDB 4.2 repository.

sudo vi /etc/yum.repos.d/mongodb.repo
[MongoDB]
name=MongoDB Repository
baseurl=http://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.2/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc

Save you file and close.

Now install Mongodb server by running the following command.

sudo dnf install mongodb-org

Step 4 – Install Parse Server

You have installed required packages on your system. The Parse server package is available under the global repository. you can install it using the yarn package manager. To install it type:

yarn global add parse-server

Next create a configuration file for your Parse server. Where you can define attributes of the parse server. Create a configuration file and edit in your favorite text editor:

nano config.json

Then, add the following content to the file:

{
  "appName": "My Parse Server",
  "databaseURI": "mongodb://localhost:27017/dev",
  "appId": "KSDJFKDJ9DKFDJDKF",
  "masterKey": "KJDF89DFJ3H37JHFJDF8DFJDF",
  "serverURL": "https://localhost:1337/parse",
  "publicServerURL": "https://0.0.0.0:1337/parse",
  "port": 1337
}

Configuration details:

  • appName – Set any name for your Parse server.
  • databaseURI – Connection string to the MongoDB database.
  • appID – Set a random string as appID, Which will be used to connect server
  • masterKey – Set a random string for master key
  • serverURL – Set a URL for your parse server
  • publicServerURL – This allow you to access parse server from public network
  • port – Enter a port to run on parse server. Default port is 1337
  • Save your file. Next run the parse server with nohup command. Also run it as background process.

    nohup parse-server config.json &
    

    Your parse server is running now.

    Step 5 – Install Parse Dashboard

    The Parse development team, also provides a web interface to access Parse server called Parse-dashboard. Which is also available as node module. Use below command to install parse-dashboard:

    yarn global add parse-dashboard
    

    Next, create a configuration file for the parse dashboard. Edit file in a text editor:

    nano parse-darshboard-config.json
    

    And add the following content:

    {
      "apps": [
        {
          "serverURL": "http://67.205.146.114:1337/parse",
          "appId": "KSDJFKDJ9DKFDJDKF",
          "masterKey": "KJDF89DFJ3H37JHFJDF8DFJDF",
          "allowInsecureHTTP": "true",
          "appName": "MyApp1"
        }
      ],
     "users": [
        {
          "user":"admin",
          "pass":"password"
        }
      ],
      "iconsFolder": "icons"
    }
    

    You can add multiple parse servers to your Parse dashboard. Add your parse server with serverURL. User the same appID and masterKey as you defined to your parse server.

    Save your file and execute the following command to start parse dashboard.

    nohup parse-dashboard --dev --config parse-darshboard-config.json &
    

    The above command will start your parse server on port 4040.

    Step 6 – Adjust FirewallD Rules

    The systems have enabled firewalld, need to allow access on ports running Parse server. We are using the port 1337 for the parse server and 4040 for the dashboard. Execute the following commands to allow access for public users for Parse server. To open port type:

    sudo firewall-cmd --permanent --zone=public --add-port=1337/tcp
    sudo firewall-cmd --permanent --zone=public --add-port=4040/tcp
    

    Apply the changes by running command:

    firewall-cmd --reload
    

    Step 7 – Access Parse Dashboard

    Now, you can access your parse dashboard web interface by accessing your server on port 4040. Login to the dashboard username and password defined in parse dashboard configuration file (parse-darshboard-config.json).

    Parsh dashboard login

    After login you will see the dashboard.

    Parse server dashboard

    Conclusion

    In this tutorial you learned about the installation of parse server and dashboard on CentOS system.

    The post How to Install Parse Server on CentOS 8 appeared first on TecAdmin.

    ]]>
    https://tecadmin.net/install-parse-server-centos-8/feed/ 0
    How to Install Gradle on CentOS 8 https://tecadmin.net/install-gradle-centos-8/ https://tecadmin.net/install-gradle-centos-8/#respond Sun, 19 Apr 2020 10:55:02 +0000 https://tecadmin.net/?p=21043 Gradle is an open-source build tool for the automation of applications. The Gradle helps developers team to build, automate and deliver software easier and faster. This tutorial will help you to install Gradle on CentOS 8 and RHEL 8 Linux system. You may like: How to Install Apache Maven on CentOS 8 Prerequisites The Gradle [...]

    The post How to Install Gradle on CentOS 8 appeared first on TecAdmin.

    ]]>
    Gradle is an open-source build tool for the automation of applications. The Gradle helps developers team to build, automate and deliver software easier and faster. This tutorial will help you to install Gradle on CentOS 8 and RHEL 8 Linux system.

    You may like:

    Prerequisites

    The Gradle requires Java 8 or higher version installed on system. Generally CentOS system have default installed Java version on it. to run Java 8 or higher version. Make sure you have java installed on your CentOS and RHEL 6 system or use following command to install it.

    sudo dnf install java-11-openjdk
    

    Verify installed Java version on your system.

    java -version
    
    openjdk version "11.0.6" 2020-01-14 LTS
    OpenJDK Runtime Environment 18.9 (build 11.0.6+10-LTS)
    OpenJDK 64-Bit Server VM 18.9 (build 11.0.6+10-LTS, mixed mode, sharing)
    

    Install Gradle on CentOS 8

    Once you installed Java on your system. Download the latest Gradle distribution release binary file from its official download page.

    wget https://downloads.gradle-dn.com/distributions/gradle-6.3-bin.zip
    

    Then extract the downloaded archive and place it to the proper location. Generally, I used /usr/local directory for storing applications. You can use alternative directory like /opt.

    unzip gradle-6.3-bin.zip
    mv gradle-6.3 /usr/local/gradle
    

    Gradle has been configured on your system.

    Setup Environment Variable

    Now, you need to setup Gradle with PATH environment variable, Also make sure the variable is set after system reboot.

    Place a shell script under profile.d directory to set PATH variable on reboot. Create a file like below:

    vim /etc/profile.d/gradle.sh
    

    and add the below line to file

    export PATH=/usr/local/gradle/bin:$PATH
    

    Save file and close it. Now source the script to apply environment for current shell.

    source /etc/profile.d/gradle.sh
    

    And you have done the Grandle installation on CentOS/RHEL 8 system.

    Test Gradle Version

    Once you finished the Gradle installation, let’s check the installed version on your system.

    gradle -v
    

    Output

    ------------------------------------------------------------
    Gradle 6.3
    ------------------------------------------------------------
    
    Build time:   2020-03-24 19:52:07 UTC
    Revision:     bacd40b727b0130eeac8855ae3f9fd9a0b207c60
    
    Kotlin:       1.3.70
    Groovy:       2.5.10
    Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
    JVM:          11.0.6 (Oracle Corporation 11.0.6+10-LTS)
    OS:           Linux 4.18.0-147.3.1.el8_1.x86_64 amd64
    

    If you see the results like above, means Gradle is successfully installed and configured on your CentOS 8 system.

    The post How to Install Gradle on CentOS 8 appeared first on TecAdmin.

    ]]>
    https://tecadmin.net/install-gradle-centos-8/feed/ 0