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

2012年7月5日 星期四

安裝Hadoop 1.0.2 在Ubuntu 11

安裝Hadoop的部份還蠻簡單的,照著網路上的文章就可以成功了

http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/
http://changyy.pixnet.net/blog/post/25245658-%5Blinux%5D-%E5%AE%89%E8%A3%9D%E5%96%AE%E6%A9%9F%E7%89%88-hadoop-0.20.1-single-node-cluster-(p

這部份沒有特別要注意的,接下來要測試Hadoop的功能以及實做多節點的Cluster

2012年4月2日 星期一

Boot into text mode with Ubuntu 11.10

基本上是參考這篇,不過照著作不Work...
又看了這一篇,自己試了一下好像可以了,趕快筆記一下...

編輯 /etc/default/grub

arthur@ubuntu:~$ sudo vi /etc/default/grub
[sudo] password for arthur:

將下面這行
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
改成
GRUB_CMDLINE_LINUX_DEFAULT="text"

然後在把這行前面#拿掉
GRUB_TERMINAL=console  //text base grub menu


存檔後作 update-grub
arthur@ubuntu:~$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.0.0-17-generic
Found initrd image: /boot/initrd.img-3.0.0-17-generic
Found linux image: /boot/vmlinuz-3.0.0-16-generic
Found initrd image: /boot/initrd.img-3.0.0-16-generic
Found linux image: /boot/vmlinuz-3.0.0-12-generic
Found initrd image: /boot/initrd.img-3.0.0-12-generic
Found memtest86+ image: /boot/memtest86+.bin
done
arthur@ubuntu:~$

要啟動桌面的話輸入 startx  就可以了,不過不要desktop的話直接裝server版就好了...我好像多此一舉...

2010年10月6日 星期三

Kuro Box 備忘

之前更新IP 分享器之後,發現SSH 登不進去,一直沒去理他。
今天忽然想到,所以就想辦法處理一下。

結果忘記讓Kuro Box 回到EM Mode 的方法了...拆下機器才想到後面有個設定初始化(INIT)的紅色按鈕...害我還大費周章將機器由客廳移到我的書桌...

進了系統才發現忘記改 /etc/hosts.allow 真是豬頭....

再來備忘一下吧...

編輯 /etc/hosts.allow 檔:
在預設的情況下, Kuro-Box 只允許 192.168.0.0/255.255.255.0 及 127.0.0.1 的 IP 存取由 inetd所管理的服務 (例如 telnet)。因此, 若你要設給 Kuro-Box 使用的 IP 不在這個範圍 (例如你要設定真實的 IP), 重開機之後將會無法 telnet 進去, 因為被擋掉了。
# vi /mnt/etc/hosts.allow

ALL : 192.168.0.0/255.255.255.0
ALL : 127.0.0.1
ALL : .hinet.net ← 允許所有 Hi-Net 的 IP 均可連線

系統備份
1. 設定進入 EM 模式,重開機
※debian 2.4 的核心
#echo -n "NGNG" > /dev/fl3
#reboot

※debian 2.6 的核心
# echo -n "NGNG" > /dev/mtdblock2
# reboot

2. EM 模式下 root 登錄
root/kuroadmin

3. 掛載分割區
# mount /dev/hda1 /mnt
# mount /dev/hda3 /mnt2

4. 備份系統
# cd /mnt
# tar cvf /mnt2/backup.tar .
# write_ok
# reboot

5. 還原系統
# cd /mnt
# tar xvf /mnt2/backup.tar
# write_ok
# reboot


2010年4月22日 星期四

Install subversion

http://phorum.study-area.org/index.php?topic=55163.0
http://parus.idv.tw/2010/01/subversion-server.html
http://blog.xuite.net/innate/unixlike/22385135?ref=rel
apt-get install apache2 apache2.2-common apache2-utils libapache2-svn subversion

addgroup subversion
adduser www-data subversion
加入欲存取的帳號(User Account)和www-data(Apache帳號)到群組subversion中
adduser <UserName> subversion

mkdir /mnt/public/svnroot
cd /mnt/public/svnroot
mkdir <ProjectName>
svnadmin create <ProjectName>
chmod -R g+rws <ProjectName>
chown -R www-data:subversion <ProjectName>


#Http設定
vi /etc/apache2/mods-available/dav_svn.conf

<Location /mnt/public/svnroot/<ProjectName>>
DAV svn
SVNPath /mnt/public/svnroot/<ProjectName>
AuthType Basic
AuthName "<ProjectName> Subversion Repository"
AuthUserFile /mnt/public/svnroot/<ProjectName>/conf/passwd
Require valid-user
</Location>

#帳號密碼設定
htpasswd -cm /mnt/public/svnroot/<ProjectName>/conf/passwd <UserName>

/etc/init.d/apache2 restart


#SSL設定

啟用模組
apt-get install ssl-cert
建立SSL Certificate
make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem
啟用 apache ssl module 設定
a2enmod ssl
啟用一個SSL 用的 Vertual Host
1.先複製一份default site 的設定檔
cp /etc/apache2/sites-availabe/default /etc/apache2/sites-availabe/ssl
3.修改 ssl,加上
vi /etc/apache2/sites-available/ssl
NameVirtualHost *:443
<VirtualHost *:443>
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem
</VirtualHost>
4.儲存後,啟動 site
a2ensite ssl
5.修改 /etc/apache2/ports.conf 如果沒有 Listen 443 加入
vi /etc/apache2/ports.conf
Listen 443
6.重新啟動 Apache
/etc/init.d/apache2 restart


2009年8月23日 星期日

安裝Tomcat6 在 Ubuntu 9.04

網路上有相關的資料,我參考了 http://hi.baidu.com/mwinvent/blog/item/535d2f12da3a2a58f819b832.html 之後發現有些問題,我做了些修改。


1 sudo apt-get install tomcat6 tomcat6-docs tomcat6-admin tomcat6-examples
2 cd /usr/share/tomcat6
3 sudo mkdir logs conf
4 cd /etc/tomcat6
5 sudo cp -R Catalina policy.d /usr/share/tomcat6/conf
6 sudo cp context.xml tomcat-users.xml catalina.properties logging.properties server.xml web.xml /usr/share/tomcat6/conf
7 cd /usr/share/tomcat6
8 sudo chmod -R 777 conf
9 export JRE_HOME='usr/lib/jvm/java-6-sun-1.6.0.14/jre'
10. sudo service tomcat6 start or sudo service tomcat6 stop

start your firefox,tap 'localhost:8080' in the URL window.You will see

It works !

If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations!

This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat6/webapps/ROOT/index.html

Tomcat6 veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat6 and CATALINA_BASE in /var/lib/tomcat6, following the rules from /usr/share/doc/tomcat6-common/RUNNING.txt.gz.

You might consider installing the following packages, if you haven't already done so:

tomcat6-docs: This package installs a web application that allows to browse the Tomcat 6 documentation locally. Once installed, you can access it by clicking here.

tomcat6-examples: This package installs a web application that allows to access the Tomcat 6 Servlet and JSP examples. Once installed, you can access it by clicking here.

tomcat6-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the manager webapp and the host-manager webapp.

NOTE: For security reasons, using the manager webapp is restricted to users with role "manager". The host-manager webapp is restricted to users with role "admin". Users are defined in /etc/tomcat6/tomcat-users.xml.

You cannot login as mannager or host mannager before you edit tomcat-users.xml located in /usr/share/tomcat6/conf

sudo gedit /usr/share/tomcat6/conf


<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="manager"/>
<role rolename="tomcat"/>
<role rolename="admin"/>
<role rolename="role1"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="admin" password="admin" roles="manager,admin"/>
<user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>



改完之後要 restart Tomcat
sudo service tomcat6 restart
* Stopping Tomcat servlet engine tomcat6 [ OK ]
* Starting Tomcat servlet engine tomcat6 [ OK ]

Moreinfo at https://help.ubuntu.com/8.10/serverguide/C/tomcat.html

sudo gedit /usr/share/tomcat6/conf/server.xml
在裡面找到<connector port="80">的元素
在中間加上URIEncoding="utf-8"的屬性就可以了:
<connector port="80" protocol="HTTP/1.1" uriencoding="utf-8">