This command will get all SNMP information from router 192.168.1.1 and save it into file out.txt
Now let’s create file index.php and write code that will get all MAC addresses from BDCOM P3310 OLT. To get all MAC addresses use OID: iso.3.6.1.2.1.17.7.1.2.2.1.1. In PHP file create function SnmpGet:
2. Create Live USB of Arch Linux using Etcher GUI tool:
Etcher GUI tool on Linux
Or You can use Rufus in Windows:
Once you have created a liveUSB for Arch Linux, restart your PC and boot from USB. While booting press Delete, F2, F10 or F12 key to go into boot menu.
3. Create partition.
Use the command fdisk to show and create partitions on your system:
fdisk -l
If you have old partitions on your disk, you can delete them all using command:
wipefs -a /dev/sda
Be careful! This command destroy all data on your hard drive.
Select the disk you are going to partition:
fdisk /dev/sda
Enter n – to create new partition, then program ask you to choose a disk number, enter 1, and then enter first and last block of dist (press Enter for default).
4. Create root partition. To format root partition use command:
mkfs.ext4 /dev/sda1
5. Install Arch Linux
mount /dev/sda1 /mnt
Use pacstrap script to install all necessary packages:
pacstrap /mnt base linux linux-firmware vim nano mc
Generate a fstab file to define how disk partition, block devices or remote file systems are mounted into the filesystem.
genfstab -U /mnt >> /mnt/etc/fstab
Use arch-chroot and set the mounted disk as root. Now Arch Linux is installed on the disk.
To create md5 checksum of all files in folder use command:
md5sum /etc/*
This comment will show all md5 checksum in /etc directory:
To write this checksum in text document use command:
md5sum /etc/* >> /file.txt
To compare checksum of files in folder with checksum of files in text document use command:
md5sum -c /file.txt
If checksums match, near the file will be record “Success”, it means that the file has not changed. Otherwise it means that the file was edited by someone.
To check your system, regularly create checksum files for directories: /etc, /bin, /sbin, / lib
Use md5sub recursive in sub-directories
If You want to create md5 checksum of all files in all sub-directories use next command, it will create md5 checksum of all files in /etc directory:
You will need to have Apache installed in order to work through these steps. If you haven’t already done so, you can get Apache installed on your server through apt-get:
sudo apt-get update
sudo apt-get install apache2
For example let’s create virtual Apache host test.host. Create host directory:
sudo mkdir -p /var/www/test.host/public_html
Now we have the directory structure for our files, but they are owned by our root user. If we want our regular user to be able to modify files in our web directories, we can change the ownership by doing this:
We should also modify our permissions a little bit to ensure that read access is permitted to the general web directory and all of the files and folders it contains so that pages can be served correctly:
sudo chmod -R 755 /var/www
Virtual host files are the files that specify the actual
configuration of our virtual hosts and dictate how the Apache web server
will respond to various domain requests.
Apache comes with a default virtual host file called 000-default.conf that we can use as a jumping off point. We are going to copy it over to create a virtual host file for each of our domains.
We will start with one domain, configure it, copy it for our second domain, and then make the few further adjustments needed. The default Ubuntu configuration requires that each virtual host file end in .conf. Start by copying the file for the first domain:
SSTP is Microsofts Remote Access Solution (RAS) for PPP over SSL. It can be used instead of PPTP or L2TP, and is only available with Windows Vista/7 connecting to a Windows 2008 Server. The advantage of SSTP compared to PPTP and L2TP is that it cannot be easily blocked by firewalls since the traffic is transmitted over HTTPS on port 443.
In Ubuntu Linux we can connect to SSTP by using SSTP-Client project on SourceForge.
To install SSTP-Client on Ubuntu add PPA repository:
To install Nextcloud on Ubuntu or other Linux use command:
sudo snap install nextcloud
After installation snap package check installation status
sudo snap changes nextcloud
To change default http and https ports use commands:
sudo snap set nextcloud ports.http=81
sudo snap set nextcloud ports.https=444
In Nginx proxy server configuration file change proxy_pass default port to 81:
Nextcloud’s automatic hostname detection can fail when behind a proxy; you might notice it redirecting incorrectly. If this happens, override the automatic detection (including the port if necessary), e.g.:
If You use Nginx as https frontend and nextcloud as http backend – You neet co change /var/snap/nextcloud/20498/nextcloud/config.php insert the foloving lines:
In Nginx http config file insert 301 redirect to https:
return 301 https://example.host$request_uri;
By default, PHP will use 128M as the memory limit. If you notice images not
getting previews generated, or errors about memory exhaustion in your Nextcloud
log, you may need to set this to a higher value.
If you’d like to set the memory limit to a higher value (say, 512M), run:
sudo snap set nextcloud php.memory-limit=512M
To set it to be unlimited (not recommended), use -1:
sudo snap set nextcloud php.memory-limit=-1
By default the cronjob interval is 15 minutes. To adjust it (say, 10 minutes) simply run:
sudo snap set nextcloud nextcloud.cron-interval=10m
Rescan all files for all users with occ console command: