Linux Distributions

27K

Solutions

20K

Contributors

A Linux distribution is an operating system made as a software collection based on the Linux kernel and, often, on a package management system and are available for a variety of systems. A typical Linux distribution comprises a Linux kernel, GNU tools and libraries, additional software, documentation, a window system (the most common being the X Window System), a window manager, and a desktop environment. Most Linux systems are open-source software made available both as compiled binaries and in source code form, allowing modifications to the original software. Over three hundred distributions are in active development, including commercially backed distributions (such as Fedora, openSUSE and Ubuntu) and community-driven distributions (such as Debian, Slackware, Gentoo and Arch Linux).

Share tech news, updates, or what's on your mind.

Sign up to Post

Ssh struck on local version string for rhel6
0
Angular Fundamentals
LVL 12
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

Dear Wizards, I setup the ubuntu 16.04 server in vSphere 6.5 with 250 GB hard disk, but days later I increased it to 500 GB, but seems like the VM still had only 250 GB.

How can I claim it back correctly? Many thanks!

ired1.PNG
ired2.PNG
0
how to grep multiple awks

$ awk '{print;}' employee.txt
100  Thomas  Manager    Sales       $5,000
200  Jason   Developer  Technology  $5,500
300  Sanjay  Sysadmin   Technology  $7,000
400  Nisha   Manager    Marketing   $9,500
500  Randy   DBA        Technology  $6,000


$ awk '{print $2,$5;}' employee.txt
Thomas $5,000
Jason $5,500
Sanjay $7,000
Nisha $9,500
Randy $6,000

in above query how to tweak to see  see all records whose name starts with 'S' and Salary greater than '6000'

also
in above query how to tweak to see  see all records whose name starts with 'S' and Salary greater than '6000' and Department Starts with  'T'


100  Thomas  Manager    Sales       $5,000     08/08/1988 6:00:01AM
200  Jason   Developer  Technology  $5,500 08/08/1989 7:00:02AM
300  Sanjay  Sysadmin   Technology  $7,000 08/08/1982 9:00:03AM
400  Nisha   Manager    Marketing   $9,500 08/08/1981 10:00:04AM
500  Randy   DBA        Technology  $6,000 08/08/1981 11:00:5AM
if it has joined date and time as above
in above query how to tweak to see  see all records whose name starts with 'S' and Salary greater than '6000' and Department Starts with  'T' and joined between particular date time to particular date time say  08/08/1982 9:00:03 AM till 08/08/1981 10:00:04AM
i need to use above in a zgrep command

https://www.thegeekstuff.com/2010/01/awk-introduction-tutorial-7-awk-print-examples/
0
This is a follow on question to https://www.experts-exchange.com/questions/29115269/Why-Does-Mysql-Keep-Increasing-Memory-Usage.html

Now it appears that the memory leaks are coming from php-fpm and Apache.

Please tell me how to isolate what is using up the memory so quickly.

In less than an hour I have lost .9 GB.
0
awk query
 unzip -c  xyz.log.20180905.gz| awk '$0>= "2013-Sep-09 18:33" && $0 <="2013-Sep-09 23:15"'| grep '|[1-9][0-9][0-9][0-9][0-9]|0000'|wc -l
Zip file too big (greater than 4294959102 bytes)
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
how to learn awk any good video tutorials on it?
please advise
0
zgrep 'XYZ|AB|MASTER' AAAA.log.20180904.gz | grep '|[1-9][0-9][0-9][0-9][0-9]|0000' | wc -l

can you please advise what is the meaning of above zgrep command

where i can find, practice and learn above kind of commands

how grep and egrep are different

https://ryanstutorials.net/linuxtutorial/grep.php
how to learn regular expressions used in queries

Please advise
0
data no align after i do cat in unix this is my script
cat data*.txt|grep -v ^UNIT_CDE|awk '{print $1,",",$2,",",$3,","$4,",",$5,",",$6,",",$7,",",$8,",",$9,","$10,",",$11,",",$12,",",$13,",",$14,",",$15,","$16,",",$17,",",$18,",",$19,",",$20}' >>  mergetstneg.txt
catfileimg.jpg
0
I need to upgrade fail2ban 0.8.14 to 0.10.3.  I am on a Linux 2 server which prevents me from loading any repositories or using Yum to install it.

So, I need to know the steps to get my fail2ban upgraded.  

Thanks,
0
Logging seems to have stopped.  

I have a DNS server (Slave)...usually go to /var/log/named.log and view the following files:
general.log  lame-servers.log  named.log  named.run  query.log  query.log.0  query.log.1  security.log  transfer.log  update.log

to do a real-time view   i use:

tail -f query.log    to view my current queries.      

Seems to have just stopped....any idea how to get it running again?
0
Fail2ban stopped working.  I have scoured the log files and no errors.  It was working and it seems since my last Yum update for security it quit working.  I can do fail2ban-client status and it shows 7 jails.  I can look in the iptables and it shows the jails.  However, when I run fail2ban-regex it shows many hits but none are getting blocked by the iptables.  The iptables are on.

This is 0.8.14 and I am on a Linux 2 Amazon Ami with PHP 7 and Python 2.7.14.

When it was working  it had over 221 ips banned just in one jail.

Please help me get this going.  The bots overrun my system if it isn't in place.
0
Python 3 Fundamentals
LVL 12
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

I have a php function that I want to call from another php file.  This function creates a button and places a message in Order Notes.  Also, the function isn't the only function in functions.php.

Here is the function
add_action ('woocommerce_before_order_notes', 'member_note', 10); 
function member_note (){
$code = <<< EOT
<button style= "background-color:green; color:white;" onclick="myFunctionMember()">MEMBERSHIP</button>
<script>
function myFunctionMember() {
    document.getElementById("order_comments").innerHTML = "I want membership";
}
</script>
EOT;
echo $code;
}

Open in new window


This function needs to be at the bottom of this yellow box.  https://gyazo.com/fad06970c1cec8be092987e46331a7c3 which is being created with this code.  

<?php if (($val >= 100) && ($val <= 300)) { ?>
<p style="color: black; font-weight:bold; text-align:center; margin:0 auto; background-color: yellow; padding-top:6px; padding-bottom:6px; font-size:16px; font-family:Verdana, Arial, Helvetica, sans-serif;">
		<span class="heading">You've Qualified For FREE SmartStart Membership!</span><br />
		<br />
  $15 product credit for future use, shipping promotions and much more.</span>
	  <br /><br />
	Click The Green Membership Button To Recieve Your Membership Benefits</p>


<?php include('functions.php');
	$returning_value = member_note();								   
echo $returning_value;
 } ?>

Open in new window


This code is at qv_contest.php

You can see my attempt that resulted in this error:

Fatal error: Cannot redeclare member_note() (previously declared in C:\xampp\apps\wordpress\htdocs\wp-content\themes\flatsome-child\functions.php:25) in C:\xampp\apps\wordpress\htdocs\wp-content\themes\flatsome-child\functions.php on line 33

Open in new window

0
My system crashed and I need to find out what caused the crash.  I have atop installed and I can see what process caused the problem by using the log files with atop.  However, I want to know what programs and files were involved in the process.

Is there a way to do this with atop and/or sar?

I am on a Linux 2 AWS instance.
0
Hi,

I'm running CentOS Linux release 7.4.1708 (Core), issue is i'm able to login using local users but not using ldap users, please help me on this.

I've tried restarting services using authconfig-tui command, but still i'm getting authentication failure error for ldap user.

please see the attached doc (ldap issue.docx), and below output commands and let me know if any other details are required.


[root@server01 log]# cat /etc/openldap/ldap.conf
#
SASL_NOCANON    on
URI ldap://<ldap servrer ip>:389/
BASE dc=prod,dc=hclpnp,dc=com
#
[root@server01 log]# getent passwd testuser
testuser:*:123456:7001:testuser:/home/testuser:/bin/bash
[root@server01 log]#


[hubba@servder01 ~]$ su - testuser
Password:
su: Authentication failure



[root@server01 log]# cat /etc/nsswitch.conf
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Valid entries include:
#
#       nisplus                 Use NIS+ (NIS version 3)
#       nis                     Use NIS (NIS version 2), also called YP
#       dns                     Use DNS (Domain Name Service)
#       files              …
0
I installed dietpi today on a Zero w. (did it on a 3B+ and setup as Hotspot no problem). I wanted to setup the zero as a webcam.
I did this 4 times before I started to install or change the configuration and reboot at least 2 times to make sure all was good.
I changed the setup to US. connected to the Wi-Fi.
Updated to the latest version of dietpi. Update the firmware.
Changed drop bear to ssh.
installed REALVNC.
But when I Install RPI WEB CAM it keeps rebooting and I can't stop it.
As I said after the 3rd time I flashed a fresh image again and rebooted at least 2 times after each change or install until I got to the RPI Web CAM issue.
I get "You're in emergency mode. Enter root password for maintenance or CTRL D.
I tried dietpi for the password and root. CTRL D does nothing but reboot back to the same area.
I'm assuming there is am issue with RPI Web Cam.
And Yes I made sure the power supply is good. I replaced the power supply with one used on my Pi3B+. It's 5.2V, 3amps.
I even tested it with my voltmeter. The issue is this pi Zero W setup works fine with a full version of Raspian and the RPI WEB CAM version I had to manually configure. I switched back to that card and all is fine. I just like the small footprint and ease of setup with DietPi. And it only starts to reboot when I add in the Web Cam distro on DietPi. I even tried some other packages after my 4th attempt, on the card, flashed a new image. In fact I added a few distros to the DietPi setup …
0
I have noticed a bot that is using several ip numbers at the same time that I want to block.  This will take a custom filter but all of the tutorials to create a filter take you up to the status code column.  I want the regex to catch HeadlessChrome.

The problem is that the browser name is much further past the status code as you can see below:


1.1.1.1 - - [05/Aug/2018:17:23:51 -0400] "POST /?wc-ajax=get_refreshed_fragments HTTP/1.1" 200 273 "https://www.theherbsplace.com/Fat_Grabbers_120_Capsules_p_189.html" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/64.0.3282.119 Safari/537.36"

Please tell me how to build a regex that goes past the status code and picks up the browser name.
0
We are attempting to install an SSL certificate on a website which already has a sub-domain attached to it. So this is the picture:

The website has been installed on product.domain.com and we have an SSL certificate already installed on that domain URL. The Wordpress site is set to force SSL and it works fine. No problem. If someone types in https://product.domain.com the site comes up fine - all good. If someone types product.domain.com the site comes up perfectly with https://product.domain.com.

If someone types www.product.domain.com without the http or https,  the site works fine - it strips the www and reverts to https://product.domain.com so this is all OK.

However, if someone actually types the full thing - as https://www.product.domain.com the site does not strip the https:// or the www so the browser displays a security exception as if the site was not covered by an SSL certificate.

I've tried various configurations in the .htaccess file but nothing I do seems to work.

Any help with this sincerely appreciated.

Cheers
Chris
0
file create error on below site


https://www.tutorialspoint.com/execute_bash_online.php

please advise how to create some files and practice grep commands there

any other online free tools to practice unix.

please advise
fileCreate.png
0
I have a new installation of woo commerce and I have noticed the urls are inconsistent regarding my products on the site.  Some urls are showing the product id and others aren't.  My preference is to not show the id.

https://www.theherbsplace.com/product/sf_p_1458/[code] - With id

[code]https://www.theherbsplace.com/product/neroli-organic-5-ml-100-pure-essential-oil/

Open in new window

- Without id

It seems when the id is in the url it goes to a category page first rather than the single product page.

I have tried changing the perma-links to something else then saving them.  Then immediately putting them back to their original setting and save again but there was no change.

Please show me how to get the product url's consistent with no id on them.
0
I have installed fail2ban on an Amazon Linux 2 instance running Apache 2.4.  I can't start it up because I am using postfix and the default mta is sendmail.  I don't have sendmail installed and I don't want it.

I use google apps for my smtp server.

How can I change over to postfix or use google apps for my fail2ban mail option?

Thanks,
0
Build an E-Commerce Site with Angular 5
LVL 12
Build an E-Commerce Site with Angular 5

Learn how to build an E-Commerce site with Angular 5, a JavaScript framework used by developers to build web, desktop, and mobile applications.

I built a LInux 2 Amazon Apache 2.4 instance that uses php-fpm.  I have had several segfaults lately and then the server crashes.  I installed atop and noticed when the server crashed I had several php-fpm pools open.  At 1 PM today I had 1.4 GB free memory and now I have 900 mb free memory.

Something seems to be wrong with php-fpm because when I restart it the free memory jumps back up to 1.3 GB.

Here is my current atop screenshot - https://gyazo.com/5028ec3f184ff973409d6cba079d3767 you can see the last column shows only a small percentage of the processes are using memory.  Yet I keep running out of memory does anyone have any suggestions?  I have atop and sar logging.
0
I have created several ipsets broken up by country.  I need to list the names of the ipsets I have built and I need to know how to have the ipsets persist after a reboot.  I am on a Linux 2 Amazon Apache 2.4 instance.
0
I am trying to trace down a segfault error using SAR on a Linux 2 Apache Amazon instance.  I have SAR installed and can see when the memory spikes but how can I find out in the log files what process is causing the memory spike?

Here is what I am seeing using SAR

https://gyazo.com/890b4ab5214fa269a14f3adeec175116

I just need to know what process is causing the memory to increase.  Normally memory usage is in the 40% area.

Thanks,
0
I want to install Fail2Ban on an Apache 2.4 Linux 2 machine.  As a Linux 2 user I can't download the epel repository according to Amazon engineers.

Consequently, I used wget and now have fail2ban-0.8.14 directory in my /etc folder.  I need to install fail2ban but the normal install commands aren't working.  I tried apt-get and it isn't on my server.  So how do I install fail2ban?

Thanks,
0
I need a way to see the dimension of the Woo Commerce product images laid out in a table in this manner. The table would have 4 columns - file name / width / height / link to wordpress media page. And the table would be in order of image size from small to large.

This could be a mysql query or a php program.  Hopefully, tied into a plugin in my wordpress installation. A plugin would be best because I will be referring to this on a regular basis.

I am running php 7.2 and a Maria 10 db.

Thanks,
0
I have a script that reads the access_log files and counts how many times an ip has accessed the site.  This works great and helps me to find bots I want to remove.  My question is, how do I get the access files and error log files to look the same?

I use a vhosts.conf file and in one of the virtual directories we have the following:

<VirtualHost 172.31.8.214:80>
        ServerName www.theherbsplace.com
        ServerAlias theherbsplace.com
        DocumentRoot /data/web/theherbsplace.com

        ErrorLog /data/log/php_errors_thp.log
        CustomLog /data/log/access_thp.log combined

        RewriteEngine On

<Directory /data/web/theherbsplace.com/>
     Require all granted
  </Directory>
</VirtualHost>

Open in new window


When I add the word combined to the error log format line I get the following error:

AH00526: Syntax error on line 7 of /etc/httpd/conf.d/vhosts.conf:
ErrorLog takes one argument, The filename of the error log

Open in new window


The format of the access_log is the one I want the errors log to follow.

So, how can I get the log format the same on both?  This is because it gives me the information I need and also will permit the script to read the error logs too.

Thanks,
0

Linux Distributions

27K

Solutions

20K

Contributors

A Linux distribution is an operating system made as a software collection based on the Linux kernel and, often, on a package management system and are available for a variety of systems. A typical Linux distribution comprises a Linux kernel, GNU tools and libraries, additional software, documentation, a window system (the most common being the X Window System), a window manager, and a desktop environment. Most Linux systems are open-source software made available both as compiled binaries and in source code form, allowing modifications to the original software. Over three hundred distributions are in active development, including commercially backed distributions (such as Fedora, openSUSE and Ubuntu) and community-driven distributions (such as Debian, Slackware, Gentoo and Arch Linux).