Monday, September 26, 2022
How to change Folder and File Permission in Linux
sudo find /var/www/html -type d -exec chmod 755 {} \;
sudo find /var/www/html -type f -exec chmod 644 {} \;
sudo chmod 644 /var/www/html/textbook.php
sudo chmod 644 /var/www/html/textbook.php
sudo systemctl restart httpd
Wednesday, September 21, 2022
Debian/Ubuntu Linux Specific Commands to Start/Stop/Restart Apache Engine
Debian Linux version 7.x or Ubuntu Linux version Ubuntu 14.10 or older:
sudo /etc/init.d/apache2 restart
sudo service apache2 restart
Stop
/etc/init.d/apache2 stop
sudo /etc/init.d/apache2 stop
sudo service apache2 stop
/etc/init.d/apache2 start
sudo /etc/init.d/apache2 start
sudo service apache2 start
sudo systemctl start apache2.service
sudo systemctl stop apache2.service
sudo systemctl restart apache2.service
sudo systemctl status apache2.service
Restart:
/etc/init.d/apache2 restartsudo /etc/init.d/apache2 restart
sudo service apache2 restart
Stop
/etc/init.d/apache2 stop
sudo /etc/init.d/apache2 stop
sudo service apache2 stop
/etc/init.d/apache2 start
sudo /etc/init.d/apache2 start
sudo service apache2 start
Debian Linux version 8.x+ or Ubuntu Linux version Ubuntu 15.04+ or above:
sudo systemctl stop apache2.service
sudo systemctl restart apache2.service
sudo systemctl status apache2.service
CentOS/RHEL (Red Hat) Linux version 4.x/5.x/6.x:
## Start ##
service httpd start
## Stop ##
service httpd stop
## Restart ##
service httpd restart
CentOS/Fedora/RHEL (Red Hat) Linux version 7.x or newer:
## Start command ##
sudo systemctl start httpd.service
## Stop command ##
sudo systemctl stop httpd.service
## Restart command ##
sudo systemctl restart httpd.service
Alpine Linux:
service apache2 start
service apache2 stop
service apache2 status
service apache2 restart
Tuesday, September 20, 2022
Two-Factor Authentication (2FA) for Webmin with Google Authenticator
First install Perl Modules :
Then follow the instructions as given through the URL:
https://blog.olineit.com/2022/09/install-perl-cpan-module-in-centos-8.html
https://devtutorial.io/how-to-install-two-factor-authentication-2fa-for-webmin-p2845.html
Install Perl CPAN Module in CentOS 8
dnf install perl-CPAN
dnf install "@Development Tools"
perl -MCPAN -e 'install Authen::OATH'
cpan -i Geo::IP OR
cpan
OR
You need gcc.:
Get CPAN:
Configure CPAN ( just run CPAN ):
After CPAN is configured:
When Authen::OATH is successfully installed, configure 2FA in WebMin.
perl -MCPAN -e 'install Authen::OATH'
cpan -i Geo::IP OR
cpan Geo::IP
cpan[1]> install Log::Log4perl
You need gcc.:
yum install gcc
Get CPAN:
yum install CPAN
Configure CPAN ( just run CPAN ):
CPAN
After CPAN is configured:
install Authen::OATH [module in CPAN shell, which takes a long time to complete.]
When Authen::OATH is successfully installed, configure 2FA in WebMin.
Monday, September 19, 2022
How to use multiple SSH key for same user by adding to ssh agent
Generate you ssh public key
Friday, September 16, 2022
Installing PHP 7.4 on macOS Sierra without brew?
sudo port install php74
sudo port install php74-cgi php74-gd php74-curl php74-intl php74-iconv php74-gettext php74-mbstring php74-imap php74-mcrypt php74-xmlrpc php74-mysql php74-openssl php74-sockets php74-zip php74-tidy php74-opcache php74-xsl php74-sqlite
sudo port select php php74
Subscribe to:
Posts (Atom)
How to get Ranking of the Students in Excel using RANK Function
=RANK(number,ref,[order]) To rank in descending order, we will use the formula =RANK(B2,($C$5:$C$10),0) If we want unique ranks, we can use...
-
Put the following code in a TXT file and save as "file.cmd" then run the cmd file as administrator. @echo off title Activate Micr...
-
We can install PowerMTA on the server. rpm -ivh /home/PowerMTA-4.0r6.x86_64.rpm You will see the output like this Preparing... #############...
-
# $Id: config 2015-03-24 16:00:00 Jack $ # Sample PowerMTA configuration file # PowerMTA Multiple Virtual PMTA config file sample # # E-mai...