Ubuntu
m |
m (→Configuring System Services) |
||
(48 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
+ | This page is for use with Ubuntu 10.04 LTS [ [http://www.ubuntu.com/start-download?distro=desktop&bits=32&release=lts 32-bit] | [http://www.ubuntu.com/start-download?distro=desktop&bits=64&release=lts 64 bit] ] | ||
+ | |||
+ | ==Other useful resources== | ||
+ | * [[Ubuntu kernel|Compiling the Ubuntu kernel]] | ||
+ | * Toolchains | ||
+ | ** [[Ubuntu arm toolchain|Install the Linaro ARM toolchain]] | ||
+ | ** [[Ubuntu avr toolchain|Install the AVR toolchain]] | ||
+ | * [[Ramdisk|Setup a Ramdisk]] | ||
+ | * [[Linux Static IP|Setup a static IP address in linux]] | ||
+ | * [[Ubuntu tftpd|Install tftpd]] | ||
+ | * [[NFS|Install NFS]] | ||
+ | |||
+ | ==Out-of-the-box configuration== | ||
Do the following (as root) to help make Ubuntu less terrible: | Do the following (as root) to help make Ubuntu less terrible: | ||
<source lang="bash"> | <source lang="bash"> | ||
+ | # setup the timezone | ||
+ | dpkg-reconfigure tzdata | ||
+ | # use bash you idiot | ||
+ | dpkg-reconfigure -plow dash | ||
+ | # install daemons | ||
apt-get install openssh-server samba | apt-get install openssh-server samba | ||
− | + | smbpasswd attie | |
+ | # install libraries | ||
apt-get install libncurses5-dev | apt-get install libncurses5-dev | ||
+ | # install man pages | ||
+ | apt-get install manpages-posix manpages-posix-dev | ||
+ | # c++ toolchain | ||
+ | apt-get install g++ | ||
+ | # install 32-bit libs and headers (if on a 64-bit host) | ||
+ | apt-get install ia32-libs libc6-dev-i386 | ||
+ | # install tools | ||
+ | apt-get install subversion git-core tree minicom shed valgrind lzop screen | ||
+ | # install dos2unix & unix2dos | ||
+ | apt-get install tofrodos | ||
+ | ln -s /usr/bin/fromdos /usr/bin/dos2unix | ||
+ | ln -s /usr/bin/todos /usr/bin/unix2dos | ||
+ | # install nfs | ||
+ | apt-get install nfs-common | ||
+ | # sort out the 'ohh.. did you mean this?' | ||
dpkg -r command-not-found command-not-found-data | dpkg -r command-not-found command-not-found-data | ||
+ | # sort out 'sudo' | ||
echo "attie ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | echo "attie ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | ||
+ | # stop X | ||
sed -i -r "s/(stop on runlevel \[0)(16\])/\12\2/" /etc/init/gdm.conf | sed -i -r "s/(stop on runlevel \[0)(16\])/\12\2/" /etc/init/gdm.conf | ||
+ | |||
+ | # if you will want to play encrypted DVDs | ||
+ | sudo /usr/share/doc/libdvdread4/install-css.sh | ||
+ | </source> | ||
+ | And if you will be using U-Boot: | ||
+ | <source lang="bash"> | ||
+ | apt-get install uboot-mkimage | ||
</source> | </source> | ||
− | + | Do the following (as your user) | |
+ | <source lang="bash"> | ||
+ | # generate an SSH key pair | ||
+ | ssh-keygen | ||
+ | # remove the guff | ||
+ | rm -rdf ~/Desktop/ ~/Documents/ ~/Music/ ~/Pictures/ ~/Public/ ~/Templates/ ~/Videos/ ~/examples.desktop | ||
+ | </source> | ||
+ | |||
+ | Also see [[bashrc]], [[samba]], [[Xresources]] | ||
+ | |||
+ | ==Disable Gnome lock screen after suspend== | ||
+ | <source lang="bash"> | ||
+ | gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true' | ||
+ | </source> | ||
+ | |||
+ | ==Other useful package names== | ||
+ | {| | ||
+ | |- | ||
+ | ! Name !! Description | ||
+ | |- | ||
+ | | mysql-server || MySQL Server | ||
+ | |- | ||
+ | | libmysqlclient-dev || MySQL CLI tools | ||
+ | |- | ||
+ | | libapache2-mod-fastcgi || Apache FastCGI module | ||
+ | |- | ||
+ | | python-dev || Python development files | ||
+ | |} | ||
+ | |||
+ | ==Additional packages for Ubuntu Server== | ||
+ | <source lang="bash"> | ||
+ | # useful with X forwarding | ||
+ | apt-get install xterm x11-xserver-utils | ||
+ | </source> | ||
− | |||
==Disabling Automounting== | ==Disabling Automounting== | ||
Line 23: | Line 98: | ||
If set to '''true''', then Nautilus will automatically open a folder when media is automounted. This only applies to media where no known x-content/* type was detected; for media where a known x-content type is detected, the user configurable action will be taken instead. | If set to '''true''', then Nautilus will automatically open a folder when media is automounted. This only applies to media where no known x-content/* type was detected; for media where a known x-content type is detected, the user configurable action will be taken instead. | ||
+ | |||
+ | ==Apache (for development use ONLY)== | ||
+ | <source lang="bash"> | ||
+ | sudo tasksel install lamp-server | ||
+ | </source> | ||
+ | |||
+ | Important config files are: | ||
+ | * <code>/etc/apache2/apache2.conf</code> | ||
+ | * <code>/etc/apache2/sites-enabled/*</code> | ||
+ | |||
+ | ==Checking the Version== | ||
+ | <source lang="bash"> | ||
+ | lsb_release -a | ||
+ | </source> | ||
+ | |||
+ | ==Configuring System Services== | ||
+ | I like <code>sysv-rc-conf</code>. Simples - it makes use of <code>update-rc.d</code>. | ||
+ | |||
+ | ==Python Libraries== | ||
+ | Run as root: | ||
+ | <source lang="bash"> | ||
+ | sudo apt-get install python-cheetah | ||
+ | </source> | ||
+ | |||
+ | ==Serial Console== | ||
+ | /etc/init/ttyS0.conf | ||
+ | <source lang="bash"> | ||
+ | # ttyS0 - getty | ||
+ | # | ||
+ | # This service maintains a getty on ttyS0 from the point the system is | ||
+ | # started until it is shut down again. | ||
+ | |||
+ | start on stopped rc or RUNLEVEL=[2345] | ||
+ | stop on runlevel [!2345] | ||
+ | |||
+ | respawn | ||
+ | exec /sbin/getty -L 115200 ttyS0 vt102 | ||
+ | </source> |
Latest revision as of 00:02, 28 March 2014
This page is for use with Ubuntu 10.04 LTS [ 32-bit | 64 bit ]
[edit] Other useful resources
- Compiling the Ubuntu kernel
- Toolchains
- Setup a Ramdisk
- Setup a static IP address in linux
- Install tftpd
- Install NFS
[edit] Out-of-the-box configuration
Do the following (as root) to help make Ubuntu less terrible:
# setup the timezone dpkg-reconfigure tzdata # use bash you idiot dpkg-reconfigure -plow dash # install daemons apt-get install openssh-server samba smbpasswd attie # install libraries apt-get install libncurses5-dev # install man pages apt-get install manpages-posix manpages-posix-dev # c++ toolchain apt-get install g++ # install 32-bit libs and headers (if on a 64-bit host) apt-get install ia32-libs libc6-dev-i386 # install tools apt-get install subversion git-core tree minicom shed valgrind lzop screen # install dos2unix & unix2dos apt-get install tofrodos ln -s /usr/bin/fromdos /usr/bin/dos2unix ln -s /usr/bin/todos /usr/bin/unix2dos # install nfs apt-get install nfs-common # sort out the 'ohh.. did you mean this?' dpkg -r command-not-found command-not-found-data # sort out 'sudo' echo "attie ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers # stop X sed -i -r "s/(stop on runlevel \[0)(16\])/\12\2/" /etc/init/gdm.conf # if you will want to play encrypted DVDs sudo /usr/share/doc/libdvdread4/install-css.sh
And if you will be using U-Boot:
apt-get install uboot-mkimage
Do the following (as your user)
# generate an SSH key pair ssh-keygen # remove the guff rm -rdf ~/Desktop/ ~/Documents/ ~/Music/ ~/Pictures/ ~/Public/ ~/Templates/ ~/Videos/ ~/examples.desktop
Also see bashrc, samba, Xresources
[edit] Disable Gnome lock screen after suspend
gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'
[edit] Other useful package names
Name | Description |
---|---|
mysql-server | MySQL Server |
libmysqlclient-dev | MySQL CLI tools |
libapache2-mod-fastcgi | Apache FastCGI module |
python-dev | Python development files |
[edit] Additional packages for Ubuntu Server
# useful with X forwarding apt-get install xterm x11-xserver-utils
[edit] Disabling Automounting
To enable or disable automount open a terminal and type gconf-editor followed by the [Enter] key.
Browse to /apps/nautilus/preferences/
.
The media_automount
key controls whether to automatically mount media. If set to true, then Nautilus will automatically mount media such as user-visible hard disks and removable media on start-up and media insertion.
There is another key media_automount_open
. This controls whether to automatically open a folder for automounted media. This key can also be set in the Nautilus (file manager) window. From the Edit menu in Nautilus select Preferences and then select the Media tab.
If set to true, then Nautilus will automatically open a folder when media is automounted. This only applies to media where no known x-content/* type was detected; for media where a known x-content type is detected, the user configurable action will be taken instead.
[edit] Apache (for development use ONLY)
sudo tasksel install lamp-server
Important config files are:
-
/etc/apache2/apache2.conf
-
/etc/apache2/sites-enabled/*
[edit] Checking the Version
lsb_release -a
[edit] Configuring System Services
I like sysv-rc-conf
. Simples - it makes use of update-rc.d
.
[edit] Python Libraries
Run as root:
sudo apt-get install python-cheetah
[edit] Serial Console
/etc/init/ttyS0.conf
# ttyS0 - getty # # This service maintains a getty on ttyS0 from the point the system is # started until it is shut down again. start on stopped rc or RUNLEVEL=[2345] stop on runlevel [!2345] respawn exec /sbin/getty -L 115200 ttyS0 vt102