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

2008年9月2日 星期二

.BIN 檔案怎麼安裝? 簡單

How to install .bin files in linux , ubuntu

先讓它變成執行檔
chmod it to executable first

joec@ubuntu:~$ sudo chmod +x firefox3-1.bin

執行指令
execute it
joec@ubuntu:~$ sudo ./firefox3-1.bin

在SSH Terminal Shell 裏面改 Linux Unix 電腦時間

如果是要改成 十月十日 2008 晚上6點
For example, set new data to 10 Oct 2008 18:00:00 :
joec@ubuntu~$ sudo date -s "10 OCT 2008 18:00:00"

想在Ubuntu一開機的時候就跑指令

Adding a script to be run at bootup in Ubuntu Debian

* 加入在rcS檔按裏面最下行
* you can add it in the rcS file

joec@ubuntu~$ sudo vim /etc/init.d/rcS

比如說我一開機就想跑Dynamic DNS這個執行檔

dydns

joec@ubuntu~$ sudo ./dydns

讓他自動開整理出一個開機指令
*auto create script in Run Console Levels

joec@ubuntu~$ sudo /etc/init.d/update-rc.d dydns defaults
Adding system startup for /etc/init.d/dydns ...
/etc/rc0.d/K20dydns -> ../init.d/dydns
/etc/rc1.d/K20dydns -> ../init.d/dydns
/etc/rc6.d/K20dydns -> ../init.d/dydns
/etc/rc2.d/S20dydns -> ../init.d/dydns
/etc/rc3.d/S20dydns -> ../init.d/dydns
/etc/rc4.d/S20dydns -> ../init.d/dydns
/etc/rc5.d/S20dydns -> ../init.d/dydns

執行你的執行檔

joec@ubuntu:/etc/init.d$ sudo chmod +x dydns

2008年9月1日 星期一

安裝Cinelerra在Ubuntu 8.04

How To Install cinelerra
sudo wget http://repository.akirad.net/dists/hardy.list -O /etc/apt/sources.list.d/akirad.list
sudo apt-get install cinelerra-generic

想架一個網站有設密碼的網站要怎麼架設?

How to setup Apache password login access

先幫bob使用者設個密碼
$ sudo htpasswd -c /etc/apache2/passwd/.htpasswd bob

再去apache裏面設定 多家這幾行就好
$ sudo vim /etc/apache2/sites-available/default

AuthType Basic
AuthName "Restricted Files"
AuthUserFile /etc/apache2/passwd/.htpasswd
Require user bob


從新啟動Apache
$ sudo /etc/init.d/apache2 restart

2008年5月27日 星期二

天阿!我的kernel 更新過後就沒有辦法開VMware Workstation怎麼辦

My VMware Won't Start After Kernel Update !!
2.6.24-16 > 2.6.24-17
Solution:

先解除安裝VMware Workstation 6.0.2
Uninstall first
$ cd /etc/vmware
$ sudo ./installer.sh uninstall

在安裝 VMware Workstation On Ubuntu Hardy Heron 8.04
Ubuntu Kernel 2.6.24-16-generic
Ubuntu Kernel 2.6.24-17-generic
VMware Workstation 6.0.2 Linux 32bit (download from BT or vmware: http://www.vmware.com/download/ws/)
$ sudo tar -zxvf VMware-workstation-6.0.2-59824.i386.tar
$ cd cd vmware-distrib/
$ sudo ./vmware-install.pl

Unable to build the vmmon module
# 看到上面的錯誤後繼續下面的步驟
# after seeing error above do next

$ sudo wget http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update115.tar.gz

$ sudo gunzip vmware-any-any-update115.tar.gz
$ sudo tar xvf vmware-any-any-update115.tar
$ cd vmware-any-any-update115
$ sudo nano vmmon-only/include/vcpuset.h
CHANGE改
#include “asm/bitops.h”
TO成
#include “linux/bitops.h”
$ sudo nano vmmon-only/include/iocontrols_compat.h
CHANGE 改 line 18
#define VMMON_VERSION_V6 (161 << 16 | 0)
TO 成
#define VMMON_VERSION_V6 (167 << 16 | 0)
$ sudo nano vmmon-only/include/iocontrols.h
CHANGE 改 line 48
#define VMMON_VERSION (161 << 16 | 0)
TO 成
#define VMMON_VERSION (167 << 16 | 0)
$ sudo rm vmmon.tar #remove the old vmmon.tar
$ sudo tar cf vmmon.tar vmmon-only/ #repack vmmon.tar
$ sudo ./runme.pl

refernece
http://aldeby.org/blog/?p=113

2008年5月21日 星期三

在Ubuntu底下管理Firefox 帳號

Firefox Profile Manager
關掉所有firefox window

$ firefox-2 --ProfileManager
如果是firefox-3的話

$ firefox-3 --ProfileManager

如何在Ubuntu底下分享檔案在Windows分享上

How-to: File sharing with Ubuntu using Samba
首先
System→Administration→Network

Depends on your Network
Connection
Select Wired or Wireless

General Tab

Host = Your Computer name Domain = for local computer It doesn't need Usually
Step 2 Configure SAMBA

sudo gedit /etc/samba/smb.conf

FIND line 232

; browseable = no

CHANGE

browseable = yes
writable = yes

Step 3 Add User

$ sudo smbpasswd -a newuser
$ sudo /etc/init.d/samba reload

Step 4 Share Folder on Ubuntu to Windows

$ sudo nautilus

Create a folder inside your home folder

Right Click on the Folder Icon

Left Click on Share Folder

Reference: http://www.youtube.com/watch?v=Ad17kma8rNM

2008年5月2日 星期五

如何在Ubuntu Hardy Heron 8.04 架Mail Server + SpamAssassin

如何在Ubuntu Hardy Heron 8.04 架Mail Server + SpamAssassin

How to Setup Ubuntu Hardy Heron Mail Server Setup with Postfix + Dovecot + SASL + Squirrel Mail + SpamAssassin

安裝 Postfix

$ sudo aptitude install postfix postfix-tls libsasl2 sasl2-bin libsasl2-modules popa3d

* Choose Internet Site in Postfix Configuration

$ sudo /etc/init.d/postfix restart

安裝 Dovecot

$ sudo aptitude install dovecot-imapd dovecot-pop3d dovecot-common
$ sudo nano /etc/dovecot/dovecot.conf

找第 24 行

改
# specify protocols = imap imaps pop3 pop3s
成
protocols = pop3 imap

找第50行
改
#disable_plaintext_auth = yes
成
disable_plaintext_auth = no

找第 627行
改
# pop3_uidl_format = %08Xu%08Xv
成
pop3_uidl_format = %08Xu%08Xv
建立新的使用者
$ sudo adduser alice
重新啟動
$ sudo /etc/init.d/dovecot restart

修改SASL認證
Configure SASL Authentication with TLS

$ sudo nano /etc/postfix/main.cf

加入這些行
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = yourdomain.com
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_security_options = noanonymous

$ sudo rm -r /var/run/saslauthd/
$ sudo mkdir -p /var/spool/postfix/var/run/saslauthd
$ sudo ln -s /var/spool/postfix/var/run/saslauthd /var/run
$ sudo chgrp sasl /var/spool/postfix/var/run/saslauthd
$ sudo adduser postfix sasl
$ sudo nano /etc/dovecot/dovecot.conf

找第767行

改
auth default {
成
auth default2 {

在 auth default2{ 前加入以下這些設定

auth default {
mechanisms = plain login
passdb pam {
}
userdb passwd {
}
socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}

}

}

重開
sudo /etc/init.d/saslauthd restart
sudo /etc/init.d/postfix restart
sudo /etc/init.d/dovecot restart

測試 EVOLUTION 信箱軟體

安裝Squirrel 網路 Mail

先裝 apache2 + php5

$ sudo apt-get install apache2

$ sudo apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi
$ sudo apt-get install squirrelmail
$ sudo /usr/sbin/squirrelmail-configure
$sudo nano /etc/apache2/apache2.conf

加入以下設定
Include /etc/squirrelmail/apache.conf
$ sudo /etc/init.d/apache2 restart

http://yourdomain.com/squirrelmail

Create a separate local user and login as a new user.

Mail Server Logs

$ sudo tail -f /var/log/mail.log
$ sudo nano /var/log/mail.log

reference: http://www.debianadmin.com/debian-mail-server-setup-with-postfix-dovecot-sasl-squirrel-mail.html

SpamAssassin

$ sudo sudo apt-get install spamassassin spamc
$ sudo groupadd -g 5001 spamd
$ sudo useradd -u 5001 -g spamd -s /sbin/nologin -d /var/lib/spamassassin spamd
$ sudo mkdir /var/lib/spamassassin
$ sudo chown spamd:spamd /var/lib/spamassassin

$ sudo sudo nano /etc/default/spamassassin
ENABLED=1
SAHOME="/var/lib/spamassassin/"
OPTIONS="--create-prefs --max-children 5 --username spamd --helper-home-dir ${SAHOME} -s ${SAHOME}spamd.log"
PIDFILE="${SAHOME}spamd.pid"

$ sudo nano /etc/spamassassin/local.cf
rewrite_header Subject [***** SPAM _SCORE_ *****]
required_score 2.0
#to be able to use _SCORE_ we need report_safe set to 0
#If this option is set to 0, incoming spam is only modified by adding some "X-Spam-" headers and no changes will be made to the body.
report_safe 0
# Enable the Bayes system
use_bayes 1
use_bayes_rules 1
# Enable Bayes auto-learning
bayes_auto_learn 1
# Enable or disable network checks
skip_rbl_checks 0
use_razor2 0
use_dcc 0
use_pyzor 0

$ sudo /etc/init.d/spamassassin start
$ sudo nano /etc/postfix/master.cf

*
change

smtp inet n - - - - smtpd

*
to

smtp inet n - - - - smtpd -o content_filter=spamassassin

spamassassin unix - n n - - pipe
user=spamd argv=/usr/bin/spamc -f -e
/usr/sbin/sendmail -oi -f ${sender} ${recipient}

$ sudo /etc/init.d/postfix reload

2008年4月29日 星期二

如何安裝Atheros Wireless在Lenovo IBM Thinkpad R61i 7742-29HV 在 Ubuntu Gusty Gibbon 7.10 Ubuntu Hardy Heron 8.04

如何安裝Atheros Wireless在Lenovo IBM Thinkpad R61i 7742-29HV 在 Ubuntu Gusty Gibbon 7.10 Ubuntu Hardy Heron 8.04
How to get Lenovo IBM Thinkpad Atheros Wireless Card Working for R61i 7742-29hv in Ubuntu Gusty Gibbon, Hardy Heron working
Tested System: Ubuntu Hardy 8.04
Ubuntu Kernel 2.6.24-16-generic
下載Madwifi
$ wget -c http://snapshots.madwifi.org/special/madwifi-ng-r2756+ar5007.tar.gz
$ sudo tar xvf madwifi-ng-r2756+ar5007.tar.gz
$ cd madwifi-ng-r2756+ar5007/
準備編譯 Driver
$ sudo apt-get update && sudo aptitude install build-essential
安裝
$ sudo make install
設定
$ sudo modprobe ath_pci
$ sudo modprobe wlan_scan_sta
FATAL: Error inserting wlan_scan_sta (lib/modules/2.6.22-14generic/net/wlan_scan_sta.ko) : Unknow symbol in module, or unknow parameter (see dmesg)
重開機
$ sudo shutdown -r now

點網路的圖案在右上角 然後選連結無線網路
click Network icon in Notification Area in the top right of default ubuntu install

select the wireless network you like to connect
http://www.ubuntugeek.com/atheros-5007eg-with-madwifi-on-i386-platform.html

如何在Ubuntu Hardy Heron 8.04 32 bit 安裝VMware Workstation 6.0.2

如何在Ubuntu Hardy Heron 8.04 32 bit 安裝VMware Workstation 6.0.2

How To install VMware Workstation On Ubuntu Hardy Heron 8.04
Ubuntu Kernel 2.6.24-16-generic
VMware Workstation 6.0.2 Linux 32bit (download from BT or vmware: http://www.vmware.com/download/ws/)
從BT下載 或者vmware官方網站不過需要有正版的帳號
$ sudo tar xvf VMware-workstation-6.0.2-59824.i386.tar
$ cd vmware-distrib/
$ sudo ./vmware-install.pl

Unable to build the vmmon module
這裡會有error不過沒關西

$ sudo wget http://knihovny.cvut.cz/ftp/pub/vmware/vmware-any-any-update115.tar.gz

$ sudo gunzip vmware-any-any-update115.tar.gz
$ sudo tar xvf vmware-any-any-update115.tar
$ cd vmware-any-any-update115
$ sudo nano vmmon-only/include/vcpuset.h
CHANGE 改
#include “asm/bitops.h”
TO 成
#include “linux/bitops.h”
$ sudo nano vmmon-only/include/iocontrols_compat.h
CHANGE line 18 改
#define VMMON_VERSION_V6 (161 << 16 | 0)
TO 成
#define VMMON_VERSION_V6 (167 << 16 | 0)
$ sudo nano vmmon-only/include/iocontrols.h
CHANGE line 48 改
#define VMMON_VERSION (161 << 16 | 0)
TO 成
#define VMMON_VERSION (167 << 16 | 0)
$ sudo rm vmmon.tar #remove the old vmmon.tar
$ sudo tar cf vmmon.tar vmmon-only/ #repack vmmon.tar
$ sudo ./runme.pl
從跑

refernece
http://aldeby.org/blog/?p=113

2008年4月1日 星期二

如何架LDAP伺服器在Ubuntu 7.10 Gusty Gibbon上

How To Install and Setup LDAP Server
Server
安裝
$ sudo apt-get install slapd ldap-utils migrationtools
設定
$ dpkg-reconfigure slapd
我都選原裝的設定 除了DNS Domain Name 我使用我的電腦名稱加上 .local
e.g.我電腦名稱是jo3c 所以 就是 jo3c.local

設定/etc/ldap/ldap.conf
#加入 URI用 你的電腦密碼
BASE dc=jo3c, dc=local
URI ldap://192.168.1.11/

看可不可以連到LDAP
$ ldapsearch -x -b dc=jo3c,dc=local

不行的話代表你SLAPD可能還沒啟動
$ /etc/init.d/slapd start
或者是 叫他聽ldap port
$ /etc/init.d/slapd stop
$ sudo slapd -h "ldap:///"
$ sudo apt-get install nmap
$ nmap localhost
看有沒有聽LDAP port 536

使用者資料

2008年3月7日 星期五

How to Setup Mantis Bug Tracker LDAP on Ubuntu 7.10

Mantis LDAP

Reference: http://forums.mantisbt.org/viewtopic.php?f=3&t=3149&p=9914#p8944

/var/www/bugs/config_inc.php


# --- database variables ---------

# set these values to match your setup
$g_hostname = "localhost";
$g_db_username = "root";
$g_db_password = "p@ssw0rd_here";
$g_database_name = "bugtracker";
$g_db_type = "mysql";

# --- email variables -------------
$g_administrator_email = 'joechiang@phalanxbiotech.com';
$g_webmaster_email = 'joechiang@phalanxbiotech.com';

# the "From: " field in emails
$g_from_email = 'noreply@phalanxbiotech.com';

# the return address for bounced mail
$g_return_path_email = 'joechiang@phalanxbiotech.com';

# --- file upload settings --------
# This is the master setting to disable *all* file uploading functionality
#
# The default value is ON but you must make sure file uploading is enabled
# in PHP as well. You may need to add "file_uploads = TRUE" to your php.ini.
$g_allow_file_upload = ON;


# --- smtp service email variables -------------
$g_phpMailer_method = 2;
$g_smtp_host = 'mail.phalanxbiotech.com';
$g_smtp_username = 'joechiang';
$g_smtp_password = 'joechiang';
?>

/var/www/bugs/core/config_api.php

#LDAP connectivity
$g_login_method = LDAP;
$g_ldap_server = 'ldap://172.20.11.117';
#$g_ldap_port = '389';
$g_ldap_root_dn = 'ou=People, dc=minerva, dc=local';
#$g_ldap_organization = 'Phalanx Biotech';
#$g_ldap_uid_field = 'sAMAccountName';
#$g_use_ldap_email = 'ON';
$g_ldap_bind_dn = 'cn=admin, dc=minerva, dc=local';
$g_ldap_bind_passwd = 'p@ssw0rd_here';
$g_ldap_protocol_version = 3;

2008年1月28日 星期一

How to Install Pure-FTP Daemon on Ubuntu 7.10 Gusty Gibbon

installing ftp server on linux

install pure-ftpd
# sudo apt-get install pure-ftpd-common pure-ftpd pureadmin

to access go to applications-> system tools-> pureadmin
to create a user then

http://user@localhost

2008年1月25日 星期五

如何在Ubuntu底下架網站?使用Hinet的ADSL的不固定IP位址?

How To Setup a Webserver in Ubuntu 7.10 Using Hinet's Dynamic IP Address
如何在Ubuntu底下架網站?使用Hinet的ADSL的不固定IP位址?

http://ubuntulinuxhowto.blogspot.com/2006/06/dynamic-dns-no-ip.html
Dynamic DNS No-IP
If you have a dynamic IP from your internet service provider it gets annoying when they change your IP and you do not know it, therefore you are not able to connect to your computer remotely anymore. Well Dynamic DNS services fix that problem by assigning a domain to your IP address whenever it changes. This howto will cover getting No-IP, a Dynamic DNS client working.

First if you do not have a No-IP account, create one by going to no-ip.com and registering.

It will send an email to you so you can verify that you want to create account. Click the verification link in your email and it will send you back to the No-IP site.

Log in to the site with the account you just made and click Add under Hosts / Redirects.

Write whatever you want for the subdomain and choose a domain for it to be under. I chose howtonoip for my subdomain and chose to put it under their no-ip.org domain. Scroll down to the bottom and click Create Host.

Now you will need to install the client. Open up your terminal and run "sudo apt-get install no-ip".

Once installed run "sudo no-ip -C" and select your Internet interface from the list. Then enter your login information. If you added only one host to your no-ip account it will automatically use that. If not it will ask which one(s) to use. Next enter the update interval (in minutes). It will ask you if you want to run something at a successful update. I did not so I selected no.

Your configuration file was just created. Now whenever your IP changes this client software will automatically update the No-IP servers with your new IP. No longer will your ip change and you be locked out of your computer!

如何在安裝Postgres 8.2到Ubuntu 7.10 Gusty Gibbon

如何在ubuntu 7.10 安裝postgres 8.2
How To Installing Postgres 8.2 on Ubuntu 7.10

$ sudo apt-get install postgresql postgresql-client postgresql-contrib

$ sudo apt-get install pgadmin3

postgres default password is unknown so after your first installation you will need to change it
postgres使用者密碼安裝後的密碼是不可考的 所以安裝後要直接用query改掉

$ sudo su postgres -c psql template1
template1=# ALTER USER postgres WITH PASSWORD 'password';
template1=# \q

$ sudo passwd -d postgres
$ sudo su postgres -c passwd

http://hocuspokus.net/2007/11/05/install-postgresql-on-ubuntu-710/

如何在Ubuntu 7.10上安裝KDE4

如何在ubuntu 7.10上安裝kde4
http://www.cyberciti.biz/tips/install-kde-4.html

$ sudo gedit /etc/apt/sources.list

deb http://ppa.launchpad.net/kubuntu-members-kde4/ubuntu gutsy main

$ sudo apt-get update

$ sudo apt-get install kde4-core

如何備份以及還原Postgres資料庫

How to Backup and Restore Postgrest 8.2 Database in Ubuntu Linux
如何備份以及還原postgres資料庫

* restore postgres

psql -U joec database1 -f - <> database1.sql.gz

如何幫linux改電腦名稱

How To Change Computer Host Name in Ubuntu Linux
如何幫linux改電腦名稱
$ gksudo gedit /etc/hostname

如何在Linux, Ubuntu, Debian下安裝 LAMP Apache 2.2, MySQL 5, PHP 4, SSH

How To install LAMP Apacle MySQL PHP SSH On Ubuntu 7.10 Gusty Gibbon
如何在linux, ubuntu, debian下安裝 apache, mysql, php, ssh


ubuntu apache2 + php5 + mysql5
1. ssh server for remote access
sudo apt-get install ssh

2. database server
sudo apt-get install mysql-server

3. apache http server
sudo apt-get install apache2

4. php for apache http server
sudo apt-get install php5

5. mysql for apache http server
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql

remember! reboot your computer afterward!

如何啟動,停止,重新啟動 Mysql, Apache
start, restart, stop apache
sudo /etc/init.d/apache2 restart

start, restart, stop mysql
sudo /etc/init.d/mysql restart