Archive for the Linux Category

Install Samba file sharing

| January 30th, 2016

Install Samba file sharing

sudo apt-get install samba

edit the /etc/samba/smb.conf

sudo nano /etc/samba/smb.conf

If you wish for the users home directories to be visable when a samba user has been authed then around line number 193 (press CRTL + C) to check the current line number, change “read only” to from yes to no.

[homes]
 comment = Home Directories
 browseable = no
# By default, the home directories are exported read-only. Change the
 # next parameter to 'no' if you want to be able to write to them.
 read only = no

To add the whole system files to be visable accross the network add the following lines in the config file.

[system]
 comment = System
 path = /
 browseable = no
 writable = yes
 force user = root

Add a external usb drive as a network share

[Media]
 comments = 2TB WD Passport USB Drive
 path = /media/Media
 valid users = osmc
 browseable = yes
 writable = yes
 force user = root

Restart the samba service

sudo service smbd restart

Add a samba user called “osmc”.

$ sudo smbpasswd -a osmc
  New SMB password:
  Retype new SMB password:
  Added user osmc.

Lamp installation on Ubuntu

| July 25th, 2013

Have been working on the idea of streamlining (almost strip streaming) a LAMP installation on a Ubuntu box so far have made some scripts available on github

https://github.com/swooingfish/lamp_conf

This allow you to get the required software packages from the apt repo and then install mysql and apache2 with the required modules for most sites.

The lamp config also has apache turning script include and some default apache template files for sites allowing http and https sites.

I’ve also added a script which allows you to create self signed ssl keys.

Hope you enjoy it, and find it useful.

Samba

| May 18th, 2013

Install Samba

sudo apt-get install samba samba-common-bin

edit /etc/samba/smb.conf

[homes]
comment = Home Directories
browseable = no

# read only = yes
writeable = yes

Restart Samba, with::

sudo service samba restart

Set the password for the pi user so you can login via another comptuer.

sudo smbpasswd -a pi

Understanding Linux CPU Load – when should you be worried?.

Ubuntu 12.04 and Java

| November 24th, 2012

OpenJDK comes with 12.4, but Sun’s Java doesn’t due to licnecings issues

Default Java install with Ubuntu 12.04
$java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~12.04.1)
OpenJDK Client VM (build 20.0-b12, mixed mode, sharing)

Run this

sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Then you will have new java

$java -version
java version "1.7.0_09"
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) Client VM (build 23.5-b02, mixed mode)