วันจันทร์ที่ 18 พฤษภาคม พ.ศ. 2558

File manager on web

http://www.kloudspeaker.com/features.php

Features

  • Languages: English, Deutsch, Español, Français, Dutch, Русский
  • Database: MySQL or SQLite (directly or via PDO)
  • Published folders are fully configurable (including alias)
  • Each user and group can have different folders published, and same folder can have be shown with different name for different users
  • User self registration and email confirmation, possibility for automatic user folder creation
  • File level user access control, controllable by admin users
  • File actions available: download, rename, copy, move and delete
  • Multi-file actions (for several files at once)
  • Folder actions available: create, copy, move, rename and delete
  • Drop box (collect files from different locations into drop box, and perform actions to them later)
  • Search files and folders from name, description or comments
  • Extract and compress zip archives
  • File editing directly in browser
  • Folder quota (with Quota commercial plugin)
  • File versioning (with History commercial plugin)
  • List and icon file listing views
  • Support for downloading files and folders in zipped format
  • Multiple file uploading with progress display support
  • Support for drag&drop files from/to desktop (HTML5 enabled browsers)
  • Support for file preview and view (flv, mp3, gif, png, jpg, pdf, doc, xls, most text formats like html, xml, js, cs, c etc)
  • Support for viewer and previewer plugins, allows extending supported types
  • Support for sharing public links for file downloads and uploads (Share plugin)
  • Support for commenting files and folders (Comments plugin)
  • Support for notifications from different user events (Notifications plugin)
  • Access files from desktop via WebDAV protocol (WebDAV plugin)
http://hapedit.free.fr/freewares.php

วันพุธที่ 13 พฤษภาคม พ.ศ. 2558

Install webmin on debian 8

Install webmin on debian 8
If you like to install and update Webmin via APT, edit the /etc/apt/sources.list file on your system
#vi /etc/apt/sources.list
Add the following lines
deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
Save and exit the file
You should also fetch and install my GPG key with which the repository is signed, with the commands
#cd /root
#wget http://www.webmin.com/jcameron-key.asc
#apt-key add jcameron-key.asc
Update the source list using the following command

#apt-get update
#apt-get install webmin

How to install Drupal on Debian 8

Adapted From http://www.davidam.com/docu/installingdrupal.html

Installing Drupal in Debian/Ubuntu GNU/Linux
Table of Contents
1 Installing Debian Packages

A fast way to do it with mysql may be the next:

$ sudo apt-get install  drush

Drush is an useful tool to facilitate the manage of our drupal by command line, by example, updates of modules, backups, etc.

Really, it's better download the last version of drupal that the debian package, due to my policy of use drush to upgrades. But install drupal7 as debian package is a good idea to install depedencies.

$ cd /var/www/
$ sudo drush dl drupal
$ sudo chown -R www-data.www-data drupal-7.3x
$ sudo chmod g+w -R drupal-7.3x
$ sudo mv drupal-7.32 mysite

2 Configuring Apache

To install a drupal site, I would like enable clean urls, to it I will create the file mysite in /etc/apache2/sites-available/mysite.conf, with the next content:




 
NameVirtualHost 192.168.1.29:80


  ServerAdmin webmaster@localhost
  ServerName mysite

  DocumentRoot /var/www/mysite

 
                RewriteEngine on
                RewriteBase /mysite
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
 

 
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
       





Due to in this moment don't have the domain of the site it will be possible enable the host in /etc/hosts

127.0.0.1       localhost
127.0.1.1       mysite

Later, we can enable it so:

$ sudo a2enmod rewrite
$ sudo a2ensite mysite

3 Creation of the database in Mysql

$ mysql -u root -p
mysql> create database drupal7;
mysql> create user 'drupal7'@'localhost' identified by 'lapasswd';
mysql> grant all privileges on drupal7.* to 'drupal7'@'%' with grant option;

4 Creation of the database in Postgresql

First of all, you must install the needed debian packages:

$ sudo apt-get install postgresql-9.1 postgresql-client php5-pgsql

Now, you can create the database and the user to postgres.

$ createuser dpsql --pwprompt --encrypted
$ createdb dpsql --owner=dpsql

To use the psql client on local you can modify the line local in /etc/postgresql/9.1/main/pghba.conf:

local             all            all                   trust

If you want change the pass you can do:

$ psql -U dpsql dpsql -W
dpsql=> ALTER USER dpsql with password 'thepassword';

5 Web install

First, you can remove permissions to CHANGELOG.txt to avoid security problems:

$ cd /var/www/mysite/
$ chmod 600 CHANGELOG.txt

So enabled the site, you can go to http://mysite/install.php and the installation is done step by step

In the step 4 (Set up database) you can find database name, database username and database password with the data provided.
6 Simple backup system

You can do a tar file every day at 13:00 with:

$ crontab -e

And introducing a line such as

0 13 * * * /bin/tar -cvzf /var/backups/drupal7-$(date "+%d-%m-%Y").tar.gz /var/www/drupal7
0 13 * * * cd /var/www/drupal7; drush sql-dump > /var/backups/drupal7-$(date "+%d-%m-%Y").sql

You must check if the cron user has permissions to make the backup, sure. Perhaps, you need create a sh script, if you have troubles.
7 Ssl

The first steps is enable ssl in apache and create the ssl certificates.

$ sudo a2enmod ssl
$ sudo service apache2 restart
$ sudo mkdir /etc/apache2/ssl
$ sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt

Later, we can create virtualhost mysite-ssl



  ServerAdmin webmaster@localhost
  ServerName mysite:443

  DocumentRoot /var/www/mysite

 
                RewriteEngine on
                RewriteBase /mysite
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
 

SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key



We can enable the virtualhost

$ sudo a2ensite default
$ sudo service apache2 reload

And enable securelogin

$ cd /var/www/mysite/
$ drush dl securelogin
$ drush en securelogin

Finally, I use go to the configuration to request https in forms.
8 Nagios

$ sudo apt-get install nagios3
$ sudo htpasswd -c htpasswd.users nagiosadmin

Go to http://localhost/nagios3/
9 References

    https://drupal.org/documentation/install


วันพฤหัสบดีที่ 7 พฤษภาคม พ.ศ. 2558

Automouont usb on debian

sudo apt-get install usbmount  
usbmount will automount hfsplus, vfat, and ext (2, 3, and 4) file systems. You can configure it to mount more/different file systems in /etc/usbmount/usbmount.conf. By default it mounts these file systems with the sync,noexec,nodev,noatime,nodiratime options, however this can also be changed in the aforementioned configuration file.
usbmount also supports custom mount options for different file system types and custom mountpoints.

Cited from http://unix.stackexchange.com/questions/134797/how-to-automatically-mount-an-usb-device-on-plugin-time-on-an-already-running-sy

Install Fonts on debian 8

Installing fonts on Debian, Ubuntu or other Debian based systems is an easy task.
This is what you have to do when you download the font from a specialized site (e.g. dafont.com) and want to use it on your Linux and Unix System.
The fonts can be copied in one of this directories:
  • /usr/share/fonts
  • /usr/share/X11/fonts
  • /usr/local/share/fonts
  • ~/.fonts
I recommend you to put the fonts in /usr/share/fonts if you need everybody  to use them, and in the user’s $HOME/.fonts if they are for a certain user.
$ cp /path/to/font.ttf ~/.fonts
After you copy the fonts in one of the font directories, do this:
$ fc-cache -fv
The fc-cache command reads and caches all the fonts installed in the font directories.

Cited from
http://linuxg.net/short-guide-install-fonts-on-debian-and-ubuntu/

วันจันทร์ที่ 4 พฤษภาคม พ.ศ. 2558

Input thai in lubuntu

sudo apt-get install ibus-table-thai

Clonezilla USB setup with GNU/Linux

How to setup Clonezilla boot drive USB setup with GNU/Linux

1. First you need to download or install the tuxboot file on your system. Please follow the download page to download or install the file on your GNU/Linux system.
(http://clonezilla.org/liveusb.php)

2. Download Tuxboot from http://sourceforge.net/projects/tuxboot/files/
(using deaian1_amd64.deb)
http://sourceforge.net/projects/tuxboot/files/0.8/Linux/debian-amd64/tuxboot_0.8debian1_amd64.deb/download
(Ref :http://tuxboot.org/download/)

3. Install tuxboot on ubuntu then 
4. Mount thumb drive on ubuntu machine
The first time I had this kind of problem was when I was trying to create a bootable USB drive and a pop-up windows appeared informing me that “you must first mount USB drive /dev/sdc1 to a mount-point. Most distributions will do this automatically after you remove and reinsert the USB drive”. I had never had this matter on Linux because, normally, all the USB drives are immediately recognized and mounted but there is always a first time….
After some googling I discovered that a specific program dconf-editor could help me to check the Linux settings and to consequentlyresolve the situation.
First of all you need to install dconf-editor on your Linux so you have to open a Terminal and type:
sudo apt-get install dconf-tools
After the installation you launch dconf-editor (for MATE environment it’s into the System Tool menu) and navigate it to media-handling:
org –> gnome –> desktop –> media-handling
Now you have to be sure that commands automount and automount-open are both flagged.
If you discover that they are already flagged, its necessary to manually create a mount point using the Terminal.
Open a Terminal and type:
df -H
to see the mounted disks. If you are not able to find the USB drive that you want to mount then type:
sudo fdisk -l
and you’ll see all disks (mounted/unmounted).
Now you are able to know the right drive identity (e.g. sdb1, sdc1, sdd1) that your OS assigned to that specific drive. Memorize it and start to create the mount point:
sudo mkdir /media/newusb
where “newusb” is the mount point name you want to assign to your USB drive.
Then type:
sudo mount /dev/sdb1 /media/newusb
where “sdb1″ is the drive identity we found before and “newusb” the mount-point name you choose.
That’s it, now your USB drive has a mounting point and you can use it (in my case I was able to create a bootable USB drive usiing Unetbootin)
4. Run tuxboot by
sudo tuxboot