install – James Batchelor https://james-batchelor.com Useful I.T & VoIP Ramblings Wed, 18 Oct 2023 10:31:51 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.5 https://james-batchelor.com/wp-content/uploads/2025/05/cropped-cropped-logo-jb-202505-32x32.png install – James Batchelor https://james-batchelor.com 32 32 Manually install net-snmpd on Gentoo https://james-batchelor.com/index.php/2023/10/18/manually-install-net-snmpd-on-gentoo/ Wed, 18 Oct 2023 18:25:00 +0000 https://james-batchelor.com/?p=895 Continue reading "Manually install net-snmpd on Gentoo"]]> Recently we’ve moved from an aged Opsview instance to Zabbix for our system health monitoring, which in turn facilitated moving data collector agents from Nagios to snmp.

Many of our PBX’s were deployed from the vendors ISO and so run atop of Gentoo, and it has a couple of issues:

  1. We’ve been told not to “emerge” anything by the vendor, as the base OS on the image is not maintained.
  2. Portage (Gentoo’s package manager) has fallen out of date, meaning even if emerge is attempted, it’ll fail as all repository links are broke.

If faced with the same issue, this is how to install net-snmpd from source, add it a startup service and be able to monitor via snmp…

Installation

On the Gentoo box, move to your home directory

cd ~

Download the source .tar.gz file

wget https://sourceforge.net/projects/net-snmp/files/net-snmp/5.9.4/net-snmp-5.9.4.tar.gz

Visit http://www.net-snmp.org/download.html for the latest version. When I was downloading SourceForge’s SSL cert had expired, if this happens add –no-check-certificate after wget in the command above.

Untar the file to your home directory, and change into it

tar -xzvf net-snmp-5.9.4.tar.gz
cd net-snmp-5.9.4

Run the configuration script

./configure

This allows you to set snmp version, file installation locations and snmp details, with exception of snmp version these can be left as default (Hit enter at the prompt). snmp details will look like this if left default…

Compile and install snmpd

make
make install

The make process is quite CPU intensive, may want to do this during a quiet period for the server.

Some libraries are not where they need to be, namely:
libnetsnmpagent.so.40
libnetsnmpmibs.so.40
libnetsnmp.so.40

Find where they were installed

find / -name libnetsnmpagent.so.40

Pick the result that is not in your current working folder (the install setup) and link it to /usr/lib

ln -s /usr/local/lib64/libnetsnmpagent.so.40 /usr/lib/

Repeat this process with the other two files

ln -s /usr/local/lib64/libnetsnmpmibs.so.40 /usr/lib/
ln -s /usr/local/lib64/libnetsnmp.so.40 /usr/lib/

Now can test to see if snmpd can run

snmpd -v

Configuration

Create a configuration file, the “snmpconf” command can be used but I found it easier to create from scratch

nano /usr/local/share/snmp/snmpd.conf

For my needs, only this line is needed

rocommunity {community} {ip address}

Save and exit the editor.

Testing

If you’d like to test your configuration, run snmpd

snmpd

Test on the snmp target machine, for quick results snmpwalk can be run

snmpwalk -c {community} -v 2c {ip address}

When run, snmpd automatically switches to a background process. To stop the process ID needs to be found and killed

ps aux | grep snmpd

Here the process ID (PID) is 5716, use this with the kill command

kill -9 {PID}

Add Service

Create the new service file

nano /etc/init.d/snmpd

Paste the following

#!/sbin/openrc-run
 
depend() {
    after modules
}
 
start() {
    ebegin "Starting snmpd"
    start-stop-daemon --background --start --exec /usr/local/sbin/snmpd --pidfile /var/run/snmpd.pid \
    -- -p /var/run/snmpd.pid -c /usr/local/share/snmp/snmpd.conf
    eend $?
}
 
stop() {
    ebegin "Stopping snmpd"
    start-stop-daemon --stop --exec /usr/local/sbin/snmpd \
    --pidfile /var/run/snmpd.pid
    eend $?
}
restart() {
    ebegin "Restarting snmpd"
    start-stop-daemon --stop --exec /usr/local/sbin/snmpd
    start-stop-daemon --background --start --exec /usr/local/sbin/snmpd --pidfile /var/run/snmpd.pid \
    -- -p /var/run/snmpd.pid -c /usr/local/share/snmp/snmpd.conf
    eend $?
}

Save and exit the text editor, then make the file executable

chmod +x /etc/init.d/snmpd

Start the service, and check its running

/etc/init.d/snmpd start

/etc/init.d/snmpd status

Finally, to make snmpd start with the system, run

rc-update add snmpd default

References

Help Creating init.d file

https://big-elephants.com/2013-01/writing-your-own-init-scripts/
https://tecadmin.net/startup-shutdown-script-on-gentoo/

Experienced issue where the process-id in the PID file was not matching the PID of process. With help of below found flag for snmpd to specify PID file, and match that to init.d

https://forums.gentoo.org/viewtopic-t-886230-start-0.html

]]>
My FTTP Journey https://james-batchelor.com/index.php/2020/10/24/my-fttp-journey/ Sat, 24 Oct 2020 18:44:56 +0000 http://james-batchelor.com/?p=687 Continue reading "My FTTP Journey"]]> Unexpectedly and to much excitement, my home internet is now provided via FTTP.

For background, I was previously in a FTTC environment getting average speeds due to my distance from the cab, however good enough to assumably be overlooked for the next phase of the Openreach Ultrafast rollout. Not that I’m complaining, 2020 is the year my speed gets a much-needed boost.

2020 also turns out to be the inaugural international work from home year, so had the opportunity to have a front seat view from my home office on the activity and timeline that brought FTTP home.

I’d like to share my observations and timeline as an example of what you can expect should you get the inkling of fibre coming to your street soon.

Before we get started, as my expectations rose, I found this post by Andy’s World invaluable for identifying activity and helping me confirm that FTTP was on its way.

Background

As mentioned, I was already in a FTTC enabled area. From the cab the copper “last mile” travelled underground from the cab to my nearest telegraph pole, then overhead to my property.

I was getting speeds on average of 40Mbps down and 5Mbps up due to the distance from the cab, I also suffered loss of sync approx. every other day. I notice that my overhead line was a lot older than others on the pole, identified by the greying colour and how you could identify both cores on the cable rather than the single looking shielded core of adjacent cables. A 48h MTBF was not ideal but well within Openreach service levels, meaning I couldn’t get this drop cable replaced without a significant cost.

Being in an FTTC area, no matter how bad the connection is usually meaning that it is not up for consideration for upcoming phases of an Openreach FTTP rollout. Couple this to a Virgin media rollout along my street the previous year and this would reason that the demand for FTTP would be low.

Timeline

Early days – May 2020

Entering my second month of working from home, notice a lot of Openreach vans passing my door. I may be more observant of these given my profession, but it was a lot of activity over the normal fault-based callouts.

Later and as I started venturing out of the house again, it looks as though they were commissioning a new cabinet a couple of streets up, therefore assumed the activity was for this.

June 2020

I happen to live near a train station, and was intrigued by the letters through the door.

Since moving in a year earlier, I’ve received a couple of letters of this type. But a new ticketing system combined with increased Openreach activity made me think if maybe this would include fibre. Hopes were still low at this point, but even if the rail infrastructure went for leased line circuits, this would increase the likelihood of FTTP.

Hopes were increased later in the month, when I noticed active involvement in the pole supplying my house.

Three Openreach vans outside usually mean the oncoming of an apocalypse.

To coincide, another letter relating to communications works on the rail system piqued my interest further.

August 2020

Another letter, this time for roadworks to clear blocked ducts for Openreach, with my and adjacent poles labelled for work.

This was very telling, as FTTC was already available with a on pole distribution point (DP), either this was to increase the number of copper circuits, or for deployment of a new technology.

25th August 2020

The conformation I needed; thanks to the Andy’s World post I knew what to look for.

This day a cherry picker arrived soon after 9am, and then commenced the installation of a FTTP termination at my local pole. It was a day later before the “Fibre lines overhead” label appeared but it was clear FTTP was on its way.

Through my work I’m able to check and order connectivity for premises, so now began my daily check to see if/when FTTP would be available.

10th Sepember  2020

Daily ISP provision check 16, and FTTP appeared as an order option, at 9am it appeared as an option but unable to order to lack of capacity, but an hour later it was fully available:

Speed profiles available to order.

Before getting ahead and ordering the full 1000/115Mbps, time for a reality check to see what my current router can actually process, resulting in an order of 220/30Mbps later that day.

My ISP like many others allow me to upgrade speed within contract but now downgrade, so this will be a good starting point with the option to increase should I get a router upgrade.

Activation date was set for Wednesday 23/09/2020.

Monday 21st September 2020

Activation week, and more activity around the Openreach pole. Involving a cherry picker, a team of 3 descended to check over the FTTP distribution point.

Also noticed that the tensioners (Or the metal wire that attaches to the ring on top of the pole and is wrapped around the drop cable hold it to the pole) of my current copper drop cable were unwound slightly.

Tuesday 22nd September 2020

The day before I had an unexpected reconnaissance visit from the Openreach engineer assigned to my activation the next day.

My previous drop cable for reasons I cannot fathom was run into the house via a corner of the uPVC window frame, so was eager to have the fibre enter the house via a new route. And the five-minute visit was worth it as it was determined that a cherry picker was needed at pole side due to the slope of the road.

Wednesday 23rd September 2020 – Install Day

ONT- Optical Network Termination – The modem that converts light to electrical data.

Openreach engineer turned up at 9am as promised, and a recap of the installation path.

The assumed installation work would disconnect the copper to the building, and replace the analogue master socket like for like with the new ONT. I needed the FTTC to remain in use while I transition IP addresses so at request the old copper would remain active.

Sub-plan was to leave the copper untouched, and run a new route of fibre only cable into the house. However, when the cherry picker turned up so did a supply of combined copper/fibre cable, allowing the supply of all services via the new route, and to replace the aging copper.

Installation

Fibre installation comes in two parts, the distribution point (either overhead or underground) to the outside of the property, and a fibre from the ONT inside the property out to meet the other.

First the hole was drilled close to the ONT location, the ONT was mounted on the wall and the internal fibre ran to the outside. The internal fibre is much thinner than from the pole due to the less armoured sheathing and benefits with more flexibility, although this comes at a risk of snapping or kinking the fibre, resulting in light loss and ultimately network loss.

Next stage with the help of the cherry picker was to plug in the fibre to the DP on the pole, and run it overhead towards the house. The fibre was secured to the house and run down the side of the building. During this the old copper was disconnected and new was connected at the pole.

Thirdly, the internal and external fibres are joined together. A new box is attached to the external wall that has inside a spool that will hold a few windings of each fibre, as the joining of the cables is considered a failure point, as few windings are included during the initial installation to give extra fibre should the cables need to be re-joined in future.

A portable splicing machine is used to join both fibres by lining them up, heating to fuse the two together, and shrink wrapping the join for protection. The unit also checks the light levels at this location, mine being 17 at this join, 14 at pole.

The fibre is coiled in the external box and closed, completing the installation of the fibre.

Commissioning is a simple as Openreach completing the order, then waiting for the PON light on the modem to illuminate. Such is the technology, there’s no fine tuning or testing of the signal, as long as the light levels at the splicing phase is good, the connection should just would. Although a sanity check wouldn’t go a miss and a quick speed test confirmed I was running on the new connection.

Fibre installed, the analogue side was reconnected with the use of a new mk5c socket, the copper in the new combo cable is extremely thin to the point where you’d struggle to believe it’s a pair. That so, VDSL sync speeds are comparable to the old drop cable, although I don’t think longevity was in mind with this design.

Equipment

As FTTP enters a maturity, the efficiency and cost saving measures improve (depending on your side of the fence).

Early installations had modems which included a PSTN port for analogue phones, and were accompanied by a battery backup unit to keep the phone line active during power failures. Later units dropped the PSTN and battery options, in favour of four RJ45 ports, with the potential to provide 4 separate internet connections via the single fibre and modem.

FTTP Nokia G-01G-Q
Nokia G-01G-Q alongside a Mk5C master socket

The new ONT supplied for my residential installation was something new to me, a Nokia G-010G-Q. This unit is far smaller than previously seen, and is sized perfectly to replace in situ a BT analogue master socket. The compromise is from the bare minimum of I/O, with the only connections being power, fibre termination and a single RJ45 port for modulated data.

Results

As expected, my internet connection has been perfectly stable and just what I need when working from home, in particular the upload speed and lower latency is a much-needed improvement for this website, which I host from a home server.

FTTC speed test.
FTTP speed test.

Ironically the install of FTTP has greatly improved the FTTC connection its replacing, now it syncs for days at a time instead of a hopeful 48hour maximum.

If you are like me and insist on using your own router, double check the WAN throughput before deciding on a speed profile. Even though Draytek advertises a 400Mbps firewall throughput, I’m reliably getting a maximum of only 180Mbps. This I would attribute to three active WAN and a couple of VPN all with load balancing options applied.

]]>
Installing WordPress on Windows Server https://james-batchelor.com/index.php/2014/11/03/installing-wordpress-on-windows-server/ https://james-batchelor.com/index.php/2014/11/03/installing-wordpress-on-windows-server/#respond Mon, 03 Nov 2014 18:31:13 +0000 http://james-batchelor.com/?p=223 Continue reading "Installing WordPress on Windows Server"]]> It’s simple, instead of the process of installing PHP, MySQL, assigning permissions and all the debugging that many of us have gone through, Microsoft has come up with WPI, or Web Platform Installer.

wpi1
WPI makes installing WordPress easy.

Amongst other web applications, WordPress is the most popular and it makes the install on Windows as simple as a few clicks.

wpi2
All done!

So far I’ve tried it on Server 2003 R2 and Server 2012 R2, both with instant success.

It’s available at: http://www.microsoft.com/web/downloads/platform.aspx

]]>
https://james-batchelor.com/index.php/2014/11/03/installing-wordpress-on-windows-server/feed/ 0
Update: James-Batchelor.com https://james-batchelor.com/index.php/2012/06/01/update-james-batchelor-com/ https://james-batchelor.com/index.php/2012/06/01/update-james-batchelor-com/#respond Fri, 01 Jun 2012 20:18:07 +0000 http://james-batchelor.com/?p=15 Continue reading "Update: James-Batchelor.com"]]> This website has received yet another update, and now I am happy with it.

The biggest change was to change the blogging software to WordPress. Although my previous software (BlogEngine.net) was built on ASP.Net and SQL Server, my current choice of language and database that I am most familiar with, I felt that BE was way to bloated and it felt unrefined for my needs.

So I went with WordPress, it seems most blogs I read use this and they look slick, to I wanted a piece of the action. This meant installing PHP and MySQL on IIS, something I really did not want to do due to the resource hog on my server, but I bit the bullet and ordered more RAM for the server.

So far, so good!

]]>
https://james-batchelor.com/index.php/2012/06/01/update-james-batchelor-com/feed/ 0