Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Saukkis
May 16, 2003

Unless I'm on the inside curve pointing straight at oncoming traffic the high beams stay on and I laugh at your puny protest flashes.
I am Most Important Man. Most Important Man in the World.
Your cron seems to have surprisingly complete environment, I wouldn't have expected those commands to work without full paths.

Adbot
ADBOT LOVES YOU

jaegerx
Sep 10, 2012

Maybe this post will get me on your ignore list!


Why don’t you just use sar?

General_Failure
Apr 17, 2005

waffle iron posted:

Anti-aliasing and sub-pixel font rendering was useful for LCD screens with a low PPI/DPI. These days it's mostly not needed.

Ok. Glad to know I'm not shooting myself in the foot in some unforeseen way.

Alpha Mayo
Jan 15, 2007
hi how are you?
there was this racist piece of shit in your av so I fixed it
you're welcome
pay it forward~
in TYOOL 2019 what is the most 'polished' Linux Desktop distro? something that wont break itself and just works with minimal configuration? Linux Mint Cinnamon a good choice or is something better?

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!
Fedora. Either stock GNOME or KDE.

Just wish they'd sort out the time it takes DNF to scan repos these days. Perhaps I'm in need of a firm wipe and reinstall when F30 KDE is out.

Volguus
Mar 3, 2009

apropos man posted:

Fedora. Either stock GNOME or KDE.

Just wish they'd sort out the time it takes DNF to scan repos these days. Perhaps I'm in need of a firm wipe and reinstall when F30 KDE is out.

I have a few machines that had a fresh install of Fedora and I have my home machine that has been upgraded to each release for about 10 years now. They all work the same. DNF is just slow if the mirrors are slow and some mirrors are slower than others. Lately I have found that the "find-fastest-mirror" had actually a significant and positive effect on both refreshing the repos and downloading the rpms. A bunch of years back when I first tried it, it was quite slow and useless.

Zapf Dingbat
Jan 9, 2001


I always have weird problems with KDE, especially with monitors. I might be a dumb dumb but I'm liking the Fedora+Cinnamon combo I've got right now.

kiwid
Sep 30, 2013

Is there a way I can allow a specific command to run without sudoing?

For example, I want to run the built-in PHP server without requiring my sudo password.

I have an alias setup like so:

code:
alias serve="sudo php -S localhost:80 -t public/"
I'd like for this specific command to run without sudoing.

I've tried messing around with "visudo" but can't get it to work.

e.g.

code:
%admin ALL=(root) NOPASSWD: /usr/bin/php -S localhost\:80 -t public/

kiwid fucked around with this message at 16:32 on Apr 25, 2019

Volguus
Mar 3, 2009
Do you have to listen on port 80? Try a port higher than 1024 (8080 for example). You then could use a reverse proxy (nginx) to forward 80 to 8080.

kiwid
Sep 30, 2013

Volguus posted:

Do you have to listen on port 80? Try a port higher than 1024 (8080 for example). You then could use a reverse proxy (nginx) to forward 80 to 8080.

No I don't have to use 80. Wow I didn't realize that was the reason it was requiring sudo.

php -S localhost:8080 works fine.

Interesting... maybe I'll just leave it there, though it would be nice to also use port 80 without sudoing and without installing nginx.

Truga
May 4, 2014
Lipstick Apathy
Yeah, the port problem is correctly solved by installing your favourite reverse proxy, you don't want to be running php as root :v: It's not a big deal on a dev box, but it's just good to be consistent imo.

For your sudo problem, make sure your command things is *after* all the other lines that could match your user, or it'll get overridden by that particular line. pseudocode:
code:
%admin NOPASSWD: blabla
%admin something else
if you're a part of the admin group you'll still need password for blabla, because the first line gets overridden. That's probably what's wrong?

Volguus
Mar 3, 2009

kiwid posted:

No I don't have to use 80. Wow I didn't realize that was the reason it was requiring sudo.

php -S localhost:8080 works fine.

Interesting... maybe I'll just leave it there, though it would be nice to also use port 80 without sudoing and without installing nginx.

you can do port forwarding with iptables too. nginx just provides additional features. As for why the port limitation is there...it's historical (as is with anything): https://www.staldal.nu/tech/2007/10/31/why-can-only-root-listen-to-ports-below-1024/

kiwid
Sep 30, 2013

Truga posted:

Yeah, the port problem is correctly solved by installing your favourite reverse proxy, you don't want to be running php as root :v: It's not a big deal on a dev box, but it's just good to be consistent imo.

For your sudo problem, make sure your command things is *after* all the other lines that could match your user, or it'll get overridden by that particular line. pseudocode:
code:
%admin NOPASSWD: blabla
%admin something else
if you're a part of the admin group you'll still need password for blabla, because the first line gets overridden. That's probably what's wrong?

This is the entire file:

code:
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

%admin ALL=(root) NOPASSWD: /usr/bin/php -S localhost\:80 -t public/

kiwid
Sep 30, 2013

Volguus posted:

you can do port forwarding with iptables too. nginx just provides additional features. As for why the port limitation is there...it's historical (as is with anything): https://www.staldal.nu/tech/2007/10/31/why-can-only-root-listen-to-ports-below-1024/

Interesting, thanks. I'm good with just using 8080 I suppose.

ItBurns
Jul 24, 2007

Alpha Mayo posted:

in TYOOL 2019 what is the most 'polished' Linux Desktop distro? something that wont break itself and just works with minimal configuration? Linux Mint Cinnamon a good choice or is something better?

Ubuntu is also good but there's nothing wrong with Fedora. Ubuntu is the de-facto choice for a lot of ML/programming stuff so you'll find good documentation/troubleshooting in that area.

F4rt5
May 20, 2006

I hear good things about Pop! OS but haven't tried it. I run Mint 19.1 Cinnamon and it works how I like it personally.

Yaoi Gagarin
Feb 20, 2014

Bit of a strange question but, if I built a computer without a GPU what could I do to actually install and configure Linux on it? Obviously once the network is up you can ssh in and do whatever but how do you get it to that point? On an embedded board with no screen I would connect to a serial port to use the shell, can I do something similar on a PC?

Context being I want to set up a server at home and it seems silly to spend money on a GPU just to run the installer. I know some motherboards have IPMI that solves this problem completely but I don't know if I'll actually end up getting one of those.

CommieGIR
Aug 22, 2006

The blue glow is a feature, not a bug


Pillbug

VostokProgram posted:

Bit of a strange question but, if I built a computer without a GPU what could I do to actually install and configure Linux on it? Obviously once the network is up you can ssh in and do whatever but how do you get it to that point? On an embedded board with no screen I would connect to a serial port to use the shell, can I do something similar on a PC?

Context being I want to set up a server at home and it seems silly to spend money on a GPU just to run the installer. I know some motherboards have IPMI that solves this problem completely but I don't know if I'll actually end up getting one of those.

http://www.sundby.com/index.php/install-ubuntu-16-04-with-usb-stick-and-serial-console/

Built out PfSense boxes via this method. As long as your BIOS is set to boot off whatever is plugged in, it should work.

xzzy
Mar 5, 2009

It's actually pretty hard these days to find any computer that doesn't have some kind of video output.. even all those SBC hobby systems are likely to have an hdmi out. An embedded graphics chip is pretty much standard equipment.

But if you do manage to find one, yes, you can install using a serial port as your primary interface, we still do it regularly at my place of work and life is good. You might have issues tweaking anything in the bios but the actual running an OS installer will work fine.

Yaoi Gagarin
Feb 20, 2014

xzzy posted:

It's actually pretty hard these days to find any computer that doesn't have some kind of video output.. even all those SBC hobby systems are likely to have an hdmi out. An embedded graphics chip is pretty much standard equipment.

But if you do manage to find one, yes, you can install using a serial port as your primary interface, we still do it regularly at my place of work and life is good. You might have issues tweaking anything in the bios but the actual running an OS installer will work fine.

I was looking at using AMD Ryzen CPUs, those don't have an integrated GPU and the motherboards don't provide one either.

Volguus
Mar 3, 2009

VostokProgram posted:

I was looking at using AMD Ryzen CPUs, those don't have an integrated GPU and the motherboards don't provide one either.

Get a 20$ card and save yourself a headache. As others have mentioned, it is possible to install without vga, but is it worth it? Get the cheapest vga junk.

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!

Volguus posted:

Get a 20$ card and save yourself a headache. As others have mentioned, it is possible to install without vga, but is it worth it? Get the cheapest vga junk.

Seconded. Even a pretty decent Nvidia 710 passively-cooled GPU can be had for 20 or 30 bucks and is a handy tool to have on the shelf if you're a serial tinkerer. I have one of these:



It often gets popped into a machine, configure the OS enough to enable SSH, then power down, pull the card and it goes back on the shelf for next time. Hell, even the one I have is overkill. A second hand one will do.

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!

VostokProgram posted:

I was looking at using AMD Ryzen CPUs, those don't have an integrated GPU and the motherboards don't provide one either.

Last week I bought my first Ryzen rig (well, mobo and CPU). I wanted more cores, as I've recently been getting more interested in running a variety of OSes in ESXi and remotely accessing the desktop. I already have a home-made Linux server which is used for keeping important/personal stuff, which is purely a command line environment.

Anyway, I decided to get a B450 motherboard so that I can upgrade to Zen2 when it comes out and I figured I'd start off with a Ryzen 1700. I was gonna get the motherboard brand-new and go second-hand for the 1700 but when I saw that I could get an 8core/16thread CPU for £150 brand-new with Wraith Spire cooler I just bought the lot brand new.

I already had 32G of cheap 2400MHz Corsair DDR4 which I may replace further down the line with something faster but it's fine for now.

First impressions are very positive. I still need to tinker with the clocks and get the 1700 running at close to 4Ghz on all cores this weekend but I'm really pleased that I have 16 threads to provision to VM's. The Wraith Spire cooler is really nice: barely audible with the case open.

I wish I'd got a Ryzen box earlier and the 1700 is such a nice price at the moment for what you get.

What sort of thing are you thinking of building?

SoftNum
Mar 31, 2011

VostokProgram posted:

I was looking at using AMD Ryzen CPUs, those don't have an integrated GPU and the motherboards don't provide one either.

It's also worth noting that you can't do any BIOS tuning on traditional motherboards without VGA. Server grade components have dedicated serial terminals you can use for a wide variety of purposes, but hobbiest ryzen boards aren't going to have that. (Like my taichi won't post without VGA)

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!

SoftNum posted:

It's also worth noting that you can't do any BIOS tuning on traditional motherboards without VGA. Server grade components have dedicated serial terminals you can use for a wide variety of purposes, but hobbiest ryzen boards aren't going to have that. (Like my taichi won't post without VGA)

Really? I've got the ASRock B450 Pro4 and it's currently got a GTX1060 plugged in (I was thinking about doing passthrough in ESXi to a Windows box and then gamestream it to my TV).

I'm doing some maintenance on ESXi it at the moment and will be powering it down soon. I'll try running it without the GPU and see if it boots.

Yaoi Gagarin
Feb 20, 2014

apropos man posted:

Last week I bought my first Ryzen rig (well, mobo and CPU). I wanted more cores, as I've recently been getting more interested in running a variety of OSes in ESXi and remotely accessing the desktop. I already have a home-made Linux server which is used for keeping important/personal stuff, which is purely a command line environment.

Anyway, I decided to get a B450 motherboard so that I can upgrade to Zen2 when it comes out and I figured I'd start off with a Ryzen 1700. I was gonna get the motherboard brand-new and go second-hand for the 1700 but when I saw that I could get an 8core/16thread CPU for £150 brand-new with Wraith Spire cooler I just bought the lot brand new.

I already had 32G of cheap 2400MHz Corsair DDR4 which I may replace further down the line with something faster but it's fine for now.

First impressions are very positive. I still need to tinker with the clocks and get the 1700 running at close to 4Ghz on all cores this weekend but I'm really pleased that I have 16 threads to provision to VM's. The Wraith Spire cooler is really nice: barely audible with the case open.

I wish I'd got a Ryzen box earlier and the 1700 is such a nice price at the moment for what you get.

What sort of thing are you thinking of building?

Going to build a combination nas/application server, and also use it for occasional video encoding. It'll run Plex, backup my Windows PC, and maybe host that whole suite of programs for getting stuff off Usenet automatically. And I'm sure over time I will find more uses for it. Running a local dns server and doing the steam caching thing maybe?

Basic plan is:
- 8 core Ryzen (probably 1700 like you)
- some sweet spot of ram capacity vs price, if I can get 64 GB that would be perfect
- probably a used SAS HBA of some kind?
- a whole lot of hard drives in either zfs or md raid
- little nvme boot ssd

I haven't decided what distro to use, but it'll probably be either fedora or Debian. I haven't had a Linux computer at home since college so it should be a fun project.

apropos man
Sep 5, 2016

You get a hundred and forty one thousand years and you're out in eight!
1700 is such a good price at the moment the only downside I can think of is that the price may slip when Zen2 comes out. You may want to try out Proxmox (https://en.wikipedia.org/wiki/Proxmox_Virtual_Environment). It's based on Debian and is similar to a free version of ESXi. I tried it the other week and, while I find ESXi a bit easer to use, Proxmox has ZFS built into it. There's a decent amount of documentation and forum advice for running it, too. I wish ESXi had native ZFS.

I've got an LSI HBA in my other machine (this one: https://www.servethehome.com/lsi-9207-9217-hbas-sas2308-6gbs-sas-sata-pcie-30/). It's running a ZFS mirror on CentOS. They run quite hot so I bolted a small fan to the heatsink on mine. I only have two WD reds on it at the moment but when 2TB SSD's are cheap enough I plan to gradually add more ZFS mirrors.

I'd say it's a pretty sound plan that you have. I went with a B450 motherboard over one of the X series ones because it's a virtualisation host and I'm not looking to get bleeding edge speeds out of it. I've got 3.7Ghz on all cores and I'm about to tweak it to 4GHz. If it's stable at 4 that's pretty awesome considering the core count.

One thing about the B450 that I bought is that it's got a Realtek network interface and initially didn't play nicely with ESXi but it was absolutely fine on Linux (I tried Fedora first to make sure everything was working, then tinkered with Proxmox for a while and that was fine, too.

I didn't try setting up a ZFS array in Proxmox but I did have a quick look though the ZFS menus and ZFS config looks really nicely set up.

Ryzen 1700 + Proxmox would be a really useful multi-purpose setup. And the possibility of upgrading the CPU to 7nm in a few months could ne killer. If AMD get it right then the performance/watt ratio at 7nm could be amazing. There's always the possibility of Zen2 not quite delivering but the first-gen 1700 is still a fine CPU.

apropos man fucked around with this message at 22:34 on Apr 26, 2019

Buttcoin purse
Apr 24, 2014

kiwid posted:

No I don't have to use 80.

Yet another option is to grant a "capability" to php, stored in an extended attribute in the filesystem, allowing use of low port numbers: https://stackoverflow.com/a/414258 I admit I've never followed this advice: "Read this long and hard if you're going to use capabilities in a production environment. There are some really tricky details of how capabilities are inherited across exec() calls that are detailed here."

That SO link probably has some other options not mentioned here too.

RoastBeef
Jul 11, 2008


mike12345 posted:

it's basically all I ever wanted from a personal information manager, from personal finance via ledger-babel to project management, appointments, contacts.... it's the best.

Vomik
Jul 29, 2003

This post is dedicated to the brave Mujahideen fighters of Afghanistan
this is a really stupid small thing that I don't think is affecting anything, but I want to know if there is anyway to get rid of it.

Basically, I have 2 SSD in Raid0 - one has efi, swap, and ext4 lvm, the second one has ext4 lvm.

They are /dev/nvme[01]n1

When I check blkid, I get the correct information for nvme0n1p[123] and nvme1n1p1.

The base drive (e.g., nvme0n1) shows just a PTUUID and PTTYPE, but for some reason the other base drive (nvme1n1) shows it as having a LABEL="sys", UUID, UUID_SUB, and TYPE="btrfs"

Is there anyway to remove those items from nvme1n1 (they aren't used) without having to reformat everything?

pseudorandom name
May 6, 2007

wipefs does exactly that.

jaegerx
Sep 10, 2012

Maybe this post will get me on your ignore list!


ibm contractors deleted the nobody user

other people
Jun 27, 2004
Associate Christ

jaegerx posted:

ibm contractors deleted the nobody user

Allowing nobody to log in is bad. obviously.

Vomik
Jul 29, 2003

This post is dedicated to the brave Mujahideen fighters of Afghanistan

pseudorandom name posted:

wipefs does exactly that.

ahh - thank you

Kamrat
Nov 27, 2012

Thanks for playing Alone in the dark 2.

Now please fuck off
I've been thinking of maybe switching to Manjaro but I heard that some people that run that end up with bricked systems after a while, is there something I should think about so that doesn't happen to me? Should I avoid AUR when I can?

ToxicFrog
Apr 26, 2008


VostokProgram posted:

Bit of a strange question but, if I built a computer without a GPU what could I do to actually install and configure Linux on it? Obviously once the network is up you can ssh in and do whatever but how do you get it to that point? On an embedded board with no screen I would connect to a serial port to use the shell, can I do something similar on a PC?

Context being I want to set up a server at home and it seems silly to spend money on a GPU just to run the installer. I know some motherboards have IPMI that solves this problem completely but I don't know if I'll actually end up getting one of those.

SUSE allows you to boot the installer with usessh=1, which will DHCP-configure the network and then wait for you to ssh in and perform the rest of the installation that way. NixOS doesn't have it as a kernel option but allows you to do something similar by editing the configuration.nix for the install USB to enable sshd. Other distros may have something similar.

That said, as others have pointed out and I myself have experienced, having a cheap VGA card on hand can save you a lot of headaches, and no modern consumer-grade system will let you gently caress around in the BIOS without a video output and, often, at least a 1024x768 screen attached to it.

Vomik
Jul 29, 2003

This post is dedicated to the brave Mujahideen fighters of Afghanistan

pseudorandom name posted:

wipefs does exactly that.

Out of curiosity... what should a device have if it has no excess fs on the device?

Both nvme0n1 and nvme1n1 have:

gpt at 0x200
gpt at 0x773c255e00
pmbr at 0x1fe

Super-NintendoUser
Jan 16, 2004

COWABUNGERDER COMPADRES
Soiled Meat
So I have a little python script that I'd like to put on an NGINX server, and then have some clients do a PUT of an image file, have the webserver process the image, and do a response to the client.

I have an nginx server setup, I can PUT a file to it, and I have the python script that can process the image and return some data, but I'm not sure how to connect the process to a python script. Are there any good guides on how to do that? I figure there are some nginx module that will do that, but a lot of the google responses aren't really helpful.

Volguus
Mar 3, 2009

Jerk McJerkface posted:

So I have a little python script that I'd like to put on an NGINX server, and then have some clients do a PUT of an image file, have the webserver process the image, and do a response to the client.

I have an nginx server setup, I can PUT a file to it, and I have the python script that can process the image and return some data, but I'm not sure how to connect the process to a python script. Are there any good guides on how to do that? I figure there are some nginx module that will do that, but a lot of the google responses aren't really helpful.

You may want to take a look at setting up CGI in NGinx (https://www.howtoforge.com/serving-cgi-scripts-with-nginx-on-debian-squeeze-ubuntu-11.04-p3 for example, but any guides would do). This should work and would give you what you want. Another way would be to make the python code be a server itself (using flask for example) and use nginx as a reverse proxy (basically just passing requests to your python server, with optional caching). A guide i found : https://www.patricksoftwareblog.com/how-to-configure-nginx-for-a-flask-web-application/

Adbot
ADBOT LOVES YOU

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Jerk McJerkface posted:

So I have a little python script that I'd like to put on an NGINX server, and then have some clients do a PUT of an image file, have the webserver process the image, and do a response to the client.

I have an nginx server setup, I can PUT a file to it, and I have the python script that can process the image and return some data, but I'm not sure how to connect the process to a python script. Are there any good guides on how to do that? I figure there are some nginx module that will do that, but a lot of the google responses aren't really helpful.

Look into flask and just forward the request from nginx to flask

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply