Install net-snmp on RHEL without yum (or any other package managing software) - networking

Currently I'm working on installing the net-snmp package on bunch of RHEL servers (versions vary from 5.x ~ 6.x).
To be specific, I need net-snmp.x86_64 and net-snmp-utils.x86_64 to create /etc/snmp/snmpd.conf file.
In normal cases, I'd just use yum to simply install them but the servers I'm working on has a firewall blocking all connections except the ones specified in the firewall.
I'm also not allowed to configure the firewall to enable yum to download the packages online due to security reasons (not sure why, though).
So I downloaded the net-snmp-5.8.tar.gz file to my PC and SCP'd it to the servers and tried to manually install it there.
But since I'm no expert on this, I just couldn't get them installed with the information online.
The files seem to be running but it doesn't create the snmpd.conf file that I need, or any other SNMP configs.
Is there a guide to installing these packages properly using the tar.gz file? Or is there something wrong here?
Thanks in advance :)

Have you run the snmpconf script? If I remember correctly it should have been installed along with net-snmp and it will generate an snmpd.conf file that is at least a good starting point if not the final one you'll want.

Related

How to silently update R for Windows installation

I am aware how to silently install 'R for Windows', but how could I update an existing installation silently to a new version?
Install switches I am currently using:
\\foo\R\R_4.0.5\R-4.0.5-win.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /ALLUSERS /LANGUAGE=en /COMPONENTS="main, x64, translations" /DIR="C:\Program Files\R"
For me, it seems like there is no supported update/upgrade switch. Just installing a new version over an existing one results in just having 2 versions listed in appwiz.cpl.
Forcing the same install dir is not helping either, as you still end up with 2 installations, just in the same folder.
Any hint is appreciated. Thanks in advance.
UPDATE:
I am trying to keep the installations on several machines aligned - therefor it would be helpful to update all machine installations periodically to the latest version and ensure the software inventory solution is not reporting N versions on a single machine.
R is designed so that you can have multiple versions installed simultaneously. This is why each version installs into a different directory.
The canonical way to handle this is to check a registry key for the latest installed version, but if you want to avoid messing with the registry, you can try this:
Install into a custom directory
When it comes to upgrading, move that directory to a temporary location
Install the newer version into the original location
If it works, delete the temp location
If it doesn't, delete the failed install and restore the original
Caveat: untested.

Find installed version of graphite

I have deployed graphite with nginx some time ago, with chef, but didn't froze versions to be installed. Thus now, trying to install with the same recipe i get errors because of missing something related to versions.
I need to find what version of Graphite I have installed on my other CentOS machines, to be able to figure out how to repair recipe.
Thank you.
Gabriel
If you have web access to the Graphite installation, you can also see the currently running version under the /version/ path.
I had the same issue. I solved it running a pip list, which displays every package you installed with pip. You can also run pip show graphite-web or pip show whisper to get more specific information.

How to install spark on windows

I downloaded spark 1.0.2 and run on Cygwin
sbt/sbt assembly
but I got the error message:
Attempting to fetch sbt
You do not have curl or wget installed, please install sbt manually from http://www.scala-sbt.org/
But I already downloaded & installed sbt-0.13.5.msi from the given download-page. So what am I doing wrong?
sbt must use wget or curl to download additional dependencies, so you need to install these. On every single operating system other than windows these utilities usually come pre installed. Trying to get these to work on windows cygwin will be a pain, as with absalutely everything that isnt something to do with a monolithic GUI that costs a fortune.
I suggest if you wish to be at all productive in your future life you pick an operating system that works well for serious work. Windows only really works well for C# and MS office, serious computing? Big data? Hahahahaha, No!

WampServer, client header and library files

WampServer is installed on my computer.
I am wishing to install the RMySQL package.
The online documentation of the latter mentions:
Install a MySQL client library from http://www.mysql.com or http://dev.mysql.com. If you already installed a MySQL server, you may want to re-run the install to ensure that you also installed client header and library files. Note that Xampp doesn't include these.
I am confused I don't know which are these required 'header' and 'library' files. And, how do I know whether they are made available by WampServer? If it is not the case, can I simply add them somewhere to a WampServer folder (instead of uninstalling WampServer and installing Apache and its friends separatedly)?
Thanks,
Édouard
OK so I've just gone through the living hell that is installing RMySQL on Windows. But finally succeeded.
Binaries on windows are not supported, so the other answers saying this is "Simple" are wrong. Also a lot of the guides etc out there are outdated, or have broken links.
The best overall answer for MYSQL generally is to look at:
Using MySQL in R for Windows
Basically you have to install RTools in order to be able to compile the packages from source.
However specifically with WAMPServer, it doesn't install the .lib and client files. So what I did was go to MYSQL to find the exact same version of MYSQL as Wampserver had installed. I downloaded the zip file version. I compared the lib directories with a visual difference tool (Beyond Compare) and copied across the missing files into my WAMPServer MYSQL installation.
As per the guide above, I then copied:
libmysql.lib from mysql/lib to mysql/lib/opt to meet dependencies.
libmysql.dll to C:\Program Files\R\R-2.12.1\bin
Finally install.packages('RMySQL',type='source') worked
For people using WampServer in Windows and wanting to install RMySQL, I've adapted the instructions outlined here. I'm assuming you already have WampServer installed. I'll also use the file paths that I used on my computer, but keep in mind that your file paths may differ slightly (due to different versions, installations, etc.)
Install latest RTools from here.
Create a new file called Renviron.site in C:\Program Files\R\R-2.15.1\etc\, open the file in a text editor, and add a line like MYSQL_HOME="C:/wamp/bin/mysql/mysql5.6.12" (path to your mysql files). Make sure to use forward slashes and don't forget the quotes.
Click on your WampServer icon and go to MySQL, then Version. This will tell you what version of MySQL was included in your WampServer distribution.
Go to http://dev.mysql.com/downloads/mysql and download and install the same version of MySQL that is included in your WampServer distribution.
Once you've gone through the complete installation, go to the folder where MySQL installed and copy the file called libmysql.lib, which can be found in the lib\ folder.
Now go to the lib\ folder in your WampServer directory (mine is C:\wamp\bin\mysql\mysql5.6.12\lib) and create a new folder called opt\.
Paste into this new opt folder the libmysql.lib file that you just copied.
You can now uninstall the MySQL server that you just downloaded, since we only needed that one file from it (which is apparently not included in the WampServer distribution).
Under C:\wamp\bin\mysql\mysql5.6.12\lib\, you'll also find libmysql.dll. Copy this to C:\Program Files\R\R-2.15.1\bin\i386\ (This works if you have 36 bit Windows like me. I think if you have 64 bit, you may just put it under the bin\ subdirectory instead of under bin\i386\, but please don't hold me to that.) I also copied the same file (libmysql.dll) to the C:\windows\system32\ directory, but I'm not sure if this is necessary.
In R, run install.packages('RMySQL',type='source') and hopefully the installation completes without any issues. You can then load the package as usual with library(RMySQL).
Note: I'm running 32 bit Windows, R-2.15.1, and a WampServer distribution that includes MySQL 5.6.12.

Install PHP Extensions Without Rebuild

I've got a VPS setup with Nginx & PHP5-FPM.
Being fairly new to unix, VPS etc... it took me ages to get the setup I wanted.
However Now I want to be able to install some extensions onto PHP without haveing to rebuild the entire thing. For example. Is there a way to install the php_tidy extension on an existing PHP setup?
You can compile an extensions as a shared library. Then you just have to declare your module in the php.ini.
There is a description at php.net for phpize.
Performance differences between a module and a full compilation are discussed here.
Check out the documentation at http://pecl.php.net/ on how to install PHP extensions.
It's usually as easy as running a command such as
pecl install tidy

Resources