Showing posts with label server. Show all posts
Showing posts with label server. Show all posts

Tuesday, December 4, 2018

file server for storage


install cifs
install samba
install nfs-server

use blkid
add strorage to fstab for boot time mount

setup smb.conf
setup /exports
install dropbox
re-assign location of dropbox

https://www.dropbox.com/install-linux

https://help.dropbox.com/installs-integrations/desktop/linux-commands


64-bit:

cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -

Next, run the Dropbox daemon from the newly created .dropbox-dist folder.

~/.dropbox-dist/dropboxd
*******
https://www.techrepublic.com/article/how-to-install-and-run-dropbox-from-a-headless-linux-server/

--30--

Sunday, December 27, 2015

Banana Pi sata port multiplier


Banana Pi Sata port multiplier

http://www.htpcguides.com/build-debian-image-for-banana-pi-pro-sata-port-multiplier/

following from above blog

Buildup for raid nas server using banana pi and port expander.

Build the Custom Debian Image for Banana Pi Pro SATA Port Multiplier

You are going to build a minimal Banana Pi debian image with port multiplier support enabled in the kernel as a module so it can be enabled and disabled by adding a single line to a configuration file. This requires a Ubuntu 64 bit environment, if you are on Windows you can create a virtual machine using Virtualbox or VMPlayer to create the virtual machine.
SSH into your virtual machine or run the terminal directly on it.
Make sure you have git installed
sudo apt-get install git build-essential -y
Git clone Igor’s Banana Pi build scripts
git clone https://github.com/igorpecovnik/BananaPI-Debian
Edit the main build script
cd BananaPI-Debian
sudo nano build.sh
Change BRANCH to use the mainline latest and greatest updates denoted by next
BRANCH="next"
Adjust kerneltag so it uses 3.19.7, eventually it will be able to use Kernel 4.0
KERNELTAG="v3.19.7"
Now build the kernel
sudo bash build.sh
You will eventually be prompted for some configuration options, I just accepted the defaults by pressing Enter.
You will now have a working Banana Pi Pro image that supports WiFi and non-WiFi models and modular SATA port multiplier support!
The image that you can burn to your sd card sitting inside a zip file called Bananapi_Debian_3.0_wheezy_3.19.7.zip.
When it’s done transfer the image zip onto a USB and unpack it (hint you can connect USB devices to the Virtual machine). You will see a .raw file you can rename to .img and flash with Win32Imager, Apple Pi Baker or whatever you usually use to write the image to the SD card.
For those curious, you can see the configuration file which enables the SATA port multipler, we are using the next branch so it’s this file
sudo nano lib/config/linux-sunxi-next.config
CONFIG_AHCI_SUNXI= should be set to m for modular
CONFIG_AHCI_SUNXI=m
I also set these options which enable the PMP and are meant to help with input output speeds (SCHED)
CONFIG_SATA_PMP=y
CONFIG_SCHED_MC=y
CONFIG_SCHED_SMT=y
Ctrl+X, Y and Enter to save the configuration
After running build.sh the first time you already have the kernel and image. After you make changes like the ones above, you rebuild it using the same command, this time it will go much faster (like 15 minutes) to update the image with your new kernel configuration.
sudo bash build.sh

Test Banana Pi Pro SATA Port Multiplier

SSH in to the Banana Pi with your custom image, the default username is root with password 1234
Use this command to make sure the compilation was successful in including the module we needed
zgrep CONFIG_AHCI_SUNXI /proc/config.gz
It should output
CONFIG_AHCI_SUNXI=m
To enable the module for the port multiplier open this file
nano /etc/modprobe.d/ahci-sunxi.conf
Add this line
options ahci-sunxi enable_pmp=1
Ctrl+X, Y and Enter to save
Reboot with your hard drives connected and the jmn321 or other port multipler connected to power
sudo reboot
Use blkid to see the hard drives show up
blkid
Look at those drives ready for media content
Now I can see the 4 x 2 TB Samsung drives I bought for this project.
root@bananapi:~# blkid
/dev/mmcblk0p1: UUID="a73fb24c-de15-4a1f-a4fe-b6436f8d98f3" TYPE="ext4"
/dev/sda1: LABEL="HTPC Guides 1" UUID="190D-153C" TYPE="vfat"
/dev/sdb1: LABEL="HTPC Guides 2" UUID="1917-2940" TYPE="vfat"
/dev/sdc1: LABEL="HTPC Guides 3" UUID="19E3-1C09" TYPE="vfat"
/dev/sdd1: LABEL="HTPC Guides 4" UUID="1911-0E2F" TYPE="vfat"
If you ever want to disable the port multiplier, just remove the options ahci-sunxi enable line.

Enable WiFi on Banana Pi Pro with Igor’s Image

Backup the dtb module just in case and overwrite the dtb module with the Banana Pro one
cp /boot/dtb/sun7i-a20-bananapi.dtb /boot/dtb/sun7i-a20-bananapi.dtb.bak
mv /boot/dtb/sun7i-a20-bananapipro.dtb /boot/dtb/sun7i-a20-bananapi.dtb
Enable the WiFi module
modprobe brcmfmac
Generate a hashed passphrase, replace SSID with your wireless router’s SSID and wifipassword with the actual password to access WiFi.
wpa_passphrase SSID wifpassword
You will get output like this
network={
ssid="HTPCGuidesSSID"
#psk="htpcguides"
psk=c78152ab34bbac9fa172f0572a63d313195da3763d0eeef8ee903ee9c921f8c5
}
Copy the psk line without the psk= part
Now we need to add the configuration to your network interfaces file
nano /etc/network/interfaces
Uncomment your wlan0 section and add the SSID and psk hash you generated before
# Wireless adapter #1
auto wlan0
        allow-hotplug wlan0
        iface wlan0 inet dhcp
        wpa-ssid HTPCGuidesSSID
        wpa-psk c78512ab34b3ac9f2172f0572a63d313195da3763d0e4ef8ee903ee9c921f8c5
Ctrl+X, Y and Enter to save
Reboot
reboot
Use iwconfig to show that the wireless is connected
iwconfig
You will see the wireless overview for the Banana Pi
wlan0     IEEE 802.11bgn  ESSID:"HTPCGuides"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 10:7B:FF:EA:47:D5
          Bit Rate=58.5 Mb/s   Tx-Power=1496 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
          Link Quality=62/70  Signal level=-48 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Banana Pi Pro Port Multiplier Image

This image will work out of the box. It will resize your sd card upon the first boot and regenerate SSH keys. The default SSH login is root with password htpcguides that you will be forced to change on the first login. There is also an Media Server Installer which I will post how to use in a day or two (it is in /root/HTPCGuides, more info here)

Thursday, June 13, 2013

installing lamp on ubuntu 12.04


one version of the install including installing and building up from scratch is here

http://www.ubuntugeek.com/step-by-step-ubuntu-12-04-precise-lamp-server-setup.html

this uses the text install  of 12.04 LTS to install Lamp and open ssh configured.

install webmin using the instructions here

http://www.ubuntugeek.com/how-to-install-webmin-on-ubuntu-12-04-precise-server.html

instructions for setting up on a 12.04 system w/o apache, php or mysql, putting up those parts after the fact is explained on this set of pages

https://library.linode.com/lamp-guides/ubuntu-12.04-precise-pangolin#sph_install-mysql

 installing various goodies, such as an extension to webmin to configure security is on the calpop site

http://calpop.com/blog.php

install splunk and ConfigServerFirewall

ConfigServerFirewall:


# wget http://configserver.com/free/csf.tgz
# tar xzvf csf.tgz
# cd csf
# ./install.sh
goto the Webmin Modules page and install a new module from a local directory. The module will be located at /etc/csf/csfwebmin.tgz.
Splunk

dpkg install splunk*.deb
Next, start Splunk: 
/opt/splunk/bin/splunk start
Now, enter http://your-server:8000 (where your-server is obviously the hostname or IP address of your box), and you'll enter the web interface.   You might well poke around for a bit.  After you've had your fill, and converted the license to the Free Edition (see the Splunk installation documentation for instructions on how to do this, by default, it runs as a 30 day trial of the paid version), log out again.


Whether you're managing one device or 1,000, Splunk (http://www.splunk.com/) is a useful product as it allows you to aggregate and search diagnostic information from a variety of systems.  At CalPOP we use it as a central syslog server, allowing us to view the logs of our several hundred Cisco and Juniper switches and other infrastructure elements in one central place, search for specific events, and build reports and dashboards to track performance.   If you're operating on a small scale, you can use the Free Edition of Splunk, which allows you to index up to 500 MB of data per day.   The Free Edition will likely cover you until your environment reaches enterprise-scale (think hundreds or thousands of servers), at which time Splunk will be more than happy to take your money.
The Free Edition of Splunk has one irritating drawback, however: it lacks any form of built in user account management or authentication.  We will (partially) address that shortcoming in the course of this tutorial.
First, download Splunk from their website, and upload it to the home directory your server.  If you're running Ubuntu, which is what we use for our infrastructure within CalPOP, you can use a .deb package.  There is also an .rpm for distros like CentOS and Fedora, and a tarball for everyone else.   Once you've uploaded it, if you're on Ubuntu (and presumably Debian, although I've yet to try it on that much-venerated distribution), run this command:



Wednesday, July 18, 2012

NTP tips

setting time with ntp and other tools.

http://www.linuxhomenetworking.com/

see if ntp running:  pgrep ntpd

stop service if running:  service ntpd stop

set from known server  ntpdate -u  64.250.177.145

Determining If NTP Is Synchronized Properly:  ntpq -p