將tiny core linux安裝到local disk
下載來的tiny core linux是免安裝的iso file,
每次重開機所有的設定都不恢復原狀
1. set the password of root
sudo su
password
How to get into root:
sudo su
Default user is tc and password is not set for the user to set the password for tc user use following command:
passwd
Change ip address of interface in tiny core:
ifconfig eth0 10.1.1.1 netmask 255.255.255.0
Give default route in tiny core:
route add default gw 10.1.1.2 route add -net 10.2.2.0 netmask 255.255.255.0 gw 10.1.1.1
Install open ssh in tiny core:
Install openssh: tce-load -w -i openssh Create the password for user tc: passwd tc cd /usr/local/etc/init.d/ ./openssh start
Web server on tiny core:
tce-load -wi busybox-httpd.tcz Change directory to "/usr/local/httpd/bin" Specify index file of the website ./busybox httpd -p 80 -h /usr/local/httpd/bin/ vi index.html webpage
How to set dns server ip for tiny core?
Edit the file in directory "/etc" resolv.cofig and add the dns server as follow nameserver
2. install into hard disk
export http_proxy="http://10.160.128.16:8080/"#安裝tc-install tce-load -wi tc-install
在官網下載Core版,就是沒有圖形介面只有終端的版本,選這個是因為覺得TinyCore版的桌面不是很好看。
製作U盤啟動盤
這步簡單,如果你用windows ,tinycore推薦coretousb這個開源軟體一鍵寫入,或者用其它u盤寫入工具。如果用linux,那可能一個cat ,一個grub-install命令就搞定了。
用tc-install將tinycore安裝到U盤
從製作好的u盤,啟動起來,tinycore所有的東西都存在內存中,你一重啟,所有的更改就都消失了。我們把她裝到這個啟動盤。
掛載U盤
fdisk -l 發現我的u盤是sdb4,你的可能是其它數字。
mkdir tmp 新建tmp目錄
mount /dev/sdb4 tmp將u盤掛到tmp文件夾
拷貝u盤中的boot文件夾到/tmp
cp -r ./tmp/boot/ /tmp
卸載u盤
umount tmp
安裝tc-install
tce-load -wi tc-install
用安裝的tc-install 一步一步按照提示將tinycore安裝到u盤
安裝時需要boot下的東西,這就是我為什麼把boot文件夾複製到/tmp的原因
tce-ab - Tiny Core Extension: Application Browser
S)earch P)rovides K)eywords or Q)uit:
Enter starting chars of desired extension, e.g. abi: maria
Title: mariadb.tcz
Description: An enhanced, drop-in replacement for MySQL
Version: 10.0.17
Author: MariaDB Foundation
Original-site: https://mariadb.org
Copying-policy: GPL V2, LGPL v2.1
Size: 33.3M
Extension_by: bmarkus
Tags: LIBRARY CLI SERVER SQL MYSQL MARIADB
Comments: Binaries only
----
Start server with command
'sudo /usr/local/mysql/bin/mysqld_safe &'
Database is /usr/local/mysql/data
Backup or use persistent storage
----
Compiled for Core 6.0
Change-log: 2014/11/27 First version, to 10.0.15
Current: 2015/04/06 Updated to 10.0.17
~
tc@box:~$ mysql -V
mysql Ver 15.1 Distrib 10.0.17-MariaDB, for Linux (i686) using readline 5.1
tc@box:~$
tc@box:~$ df -h | grep -iE 'sql|maria'
/dev/loop9 3.6M 3.6M 0 100% /tmp/tcloop/postgresql-9.5.1
/dev/loop14 1.8M 1.8M 0 100% /tmp/tcloop/mariadb-client
tc@box:~$
留言
張貼留言