顯示具有 ubuntu 標籤的文章。 顯示所有文章
顯示具有 ubuntu 標籤的文章。 顯示所有文章

2010年12月10日

Remove files not containing specific string

find . -type f -exec grep -L "some string" {} \; | xargs rm
-L, --files-without-match

2010年10月29日

Install Testlink on Ubuntu 10.04

Version: 1.9 RC1
Already installed apache so the following steps may differ from your case

1. Get source from http://testlink.sourceforge.net/docs/testLink.php

2. Extract the file and mv to /var/www
sudo cp -r testlink_1_9_RC1 /var/www/
Rename the dir to testlink (Optional, just affect the URL)

3. Install MySQL,PHP5, and related mod
sudo apt-get install mysql-server php5 php5-mysql php5-gd

4. Edit httpd.conf in apache
sudo vim /etc/apache2/httpd.conf
Add:
AddType application/x-httpd-php .php .htm .html
AddDefaultCharset UTF-8
ServerName 127.0.0.1

Restart apache server
sudo /etc/init.d/apache2 restart

5. Install with web installer.
http://your_ip/testlink
Just follow the instructions.

6. Finish the installation
Reload the page again and login as admin (pwd = admin)
Change admin's passwd in "Personal" page
Remove install/ in var/www/testlink
Edit config
sudo vim /var/www/testlink/config.inc.php
Turn off the warning message:
$tlCfg->config_check_warning_mode = 'SILENT';
Enable API Key:
$tlCfg->api->enabled = TRUE;
In this way, there will be a "Generate a new key" button in "Personal" page

2010年5月9日

Removing carriage returns from MS-DOS file

Remove ^M in vim
:1,$s/{Ctrl+V}{Ctrl+M}//g

2010年4月30日

Get man pages for GNU/Linux Development

sudo apt-get install manpages-dev

2010年4月6日

Convert ape to flac in Ubuntu

Install flac and shntool
sudo apt-get install flac
sudo apt-get install shntool
Convert all ape files in current dir to flac
shnconv -o flac *.ape

2009年12月7日

VLC RC Interface

Open RC Interface:
vlc -I rc --rc-host localhost:4444
or
vlc --extraintf rc --rc-host localhost:4444
In the RC interface, type "help" for command info.

Send command:
echo "play" |netcat localhost 4444 -q 0
add -q option for quit time

2009年11月21日

TFTP note

OS: ubuntu 8.04 LTS

1.Install TFTP server package
$sudo apt-get install tftpd-hpa

2009年7月5日

Build your own kernel

The following instructions were done under ubuntu 8.04 with kernel source linux-2.6.30.1

2008年3月18日

[Server] Build a simple Web Server

Install essential package:

1. SSH Server (for remote access)
sudo apt-get install ssh

2. Apache HTTP Server
sudo apt-get install apache2

To view the test page, go to 127.0.1.1 with your browser

Setting:

add .htaccess
vim ~/public_html/.htaccess
add the following code
AuthName "Protect test by .htaccess"
Authtype Basic
AuthUserFile /var/www/apache.passwd
require user test

(default: your account
In newer version, /var/www/apache.passwd has been changed to ~/apache.passwd)

add your account
htpasswd -c /var/www/apache.passwd test
(again, apache.passwd has been changed to ~/apache.passwd)

cp userdir.conf and userdir.load from /etc/apache2/mods-available to /etc/apache2/mods-enabled

Restart apache
sudo /etc/init.d/apache2 restart

2008年3月14日

[Network] IP config

set IP. netmask, gateway
sudo vi /etc/network/interfaces
example:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 140.116.xxx.xxx
netmask 255.255.255.0
gateway 140.116.xxx.xxx

add DNS

sudo vim /etc/resolv.conf

restart network

sudo /etc/init.d/networking restart