Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Table of Contents

install openssh-server

enable  VNC from console http://news.metaparadigma.de/linux-setting-up-a-debian-vnc-server-237/configure sudo

Environment Setup

Code Block
themeEmacs
languagebash

echo 'user ALL=(root) /sbin/randomfilename' >> /etc/sudoers
echo 'sudo su -' > /sbin/randomfilename && chmod 0100 /sbin/randomfilename

Secure sessions and enable colour

mkdir /home/vault && chmod 0700 /home/vault && mkdir /home/vault/config_backups
cp /etc/apt/sources.list /home/vault/config_backups/
sed -i 's/wheezy main/wheezy main contrib non-free/g' /etc/apt/sources.list
sed -i 's/wheezy\/updates main/wheezy\/updates main contrib non-free/g' /etc/apt/sources.list
apt-get update
apt-get install nano sudo multitail linuxlogo build-essential htop mlocate cifs-utils curl hwinfo linux-headers-$(uname -r) -y
rm /etc/localtime
ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime

Edit Default Profiles and configurations

Code Block
themeEmacs
languagebash
cp /etc/multitail.conf /home/vault/config_backups/
echo 'check_mail:0' >> /etc/multitail.conf
cp /etc/profile /home/vault/config_backups/
echo '' >> /etc/profile
echo 'cd ~' >> /etc/profile
echo
Code Block

nano /etc/skel/.bash_logout
	insert "echo '' > ~/.bash_history" >> /etc/profile
echo 'linuxlogo' >> /etc/profile
echo '' >> /etc/profile
echo 'alias taila="multitail -cS apache"
nano' >> /etc/profile
dircolors -p > /etc/skel/.dircolors
cp /etc/skel/.bashrc
	insert "echo '' > ~/.bash_history"
	uncomment dircolors /home/vault/config_backups/
sed -i 's/DIR 01;34/DIR 01;36/g' /etc/skel/.dircolors
cp /etc/skel/.bashrc /home/vault/config_backups/bashrc
sed -i '46s/\#force_color_prompt\=yes/force_color_prompt\=yes
	edit PS1='${debian_chroot:+($debian_chroot)}\[\033/g' /etc/skel/.bashrc
sed -i '60s/\\\[\\033\[01;32m\\\]\u@\/\\h\[\\033\[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ to
		PS1='${debian_chroot:+($debian_chroot)}\[\033[00m\]\u\[\033[01;33m\]@\[\033[01;32m\]\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$
	edit eval "`dircolors -b`" to eval "`dircolors -b ~/.dircolour`"
		add "cd ~"
	dircolors -p > /etc/skel/.dircolour
	nano /etc/skel/.dircolour
	edit DIR 01;34 # directory to
		DIR 01;36 # directory

install ntpd
open /etc/ntp
configured time to point to "server server1"
restart Daemon
type "date" to confirm

create Data Vault

Code Block
mkdir /home/vault && chmod 0700 /home/vault && mkdir /home/vault/config_backups

install Webmin

\\]\\/g' /etc/skel/.bashrc
sed -i '60s/\\u/\\u\\\[\\033\[01;33m\\\]/g' /etc/skel/.bashrc
sed -i '60s/\\h\\\[\\033\[00m\\\]/\\\[\\033\[01;32m\\\]\\h\\\[\\033\[00m\\\]/g' /etc/skel/.bashrc
sed -i '60s/\\\[\\033\[01;34m\\\]\\w\\\[\\033\[00m\\\]\\/\\\[\\033\[01;36m\\\]\\w\\\[\\033\[00m\\\]\\/g' /etc/skel/.bashrc
echo '' >> /etc/skel/.bashrc
echo 'cd ~' >> /etc/skel/.bashrc
echo "echo '' > ~/.bash_history" >> /etc/skel/.bashrc
echo '' >> /etc/skel/.bash_logout
echo "echo '' > ~/.bash_history" >> /etc/skel/.bash_logout
cp /etc/skel/.bashrc . && cp /etc/skel/.dircolors . && source .bashrc
sed -i '60s/\[00m\\\]\\u/\[01;31m\\\]\\u/g' .bashrc
source .bashrc
useradd -Ds /bin/bash
echo "# Disable IPv6" >> /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "#" >> /etc/sysctl.conf

Webmin Setup

Code Block
themeEmacs
languagebash
echo '' >>
Code Block

	edit /etc/apt/sources.list
	add two lines:
		&& echo '#Webmin' >> /etc/apt/sources.list && echo 'deb http://download.webmin.com/download/repository sarge contrib' >> /etc/apt/sources.list
		cd /home/vault && wget http://www.webmin.com/jcameron-key.asc && apt-key add jcameron-key.asc
	apt-get update
	apt-get install webmin
	echo 'webmin ALL=(ALL) ALL' >> /etc/sudoers
	adduserapt-get update
apt-get install webmin PASSWORD

install apache2
install php5
install mysql-server-5.0

-y
Code Block
themeEmacs
languagebash
sed -i 's/10000/82/g' /etc/webmin/miniserv.conf
Code Block

	configured root password as "WHATEVERYOUWANT"
		/etc/init.d/mysqlwebmin stop
		mysqld_safe --skip-grant-tables &
		mysql -u root
			use mysql;
			update user set password=PASSWORD("WHATEVERYOUWANT") where User='root';
			flush privileges;
			quit
	apt-get install php5-mysql

Setup phpMyAdmin

-rc.d webmin remove

Debian Multimedia Setup

Code Block
themeEmacs
languagebash
echo '' >> /etc/apt/sources.list && echo '#Debian Multimedia' >> /etc/apt/sources.list && echo 'deb http://www.deb-multimedia.org stable main non-free'
Code Block

	cd /home/sites/www
	su www-data
	Downloaded from: http://www.phpmyadmin.net/home_page/downloads.php to /home/sites/www
	untar'ed, then mv'd the directory to phpmyadmin
	apt-get install mcrypt php5-mcrypt
	mkdir /home/sites/www/phpmyadmin/config && chmod o+rw /home/sites/www/phpmyadmin/config
	navigated to: http://SERVER/phpmyadmin/setup/index.php
	setup the database root account password
	cp /home/sites/www/phpmyadmin/config/config.inc.php /home/sites/www/phpmyadmin/
	rm -rf /home/sites/www/phpmyadmin/config
	echo 'extension=mcrypt.so' >> /etc/php5apt/apache2/phpsources.ini

Setup Samba

Code Block

	list
apt-get install samba smbclient smbfs samba-common

Install Linux Logo

Code Block

	update
apt-get install linuxlogo
	nano /etc/init.d/bootmisc.sh
		    #uname -snrvm > /var/run/motd
        /usr/bin/linux_logo > /var/run/motd
	echo '-L 14 -F"Welcome to My Domain \n#H \n#O Kernel #V \n#X #T #M #P \n#R RAM \n#U \n#L"' /etc/linux_logo.conf
	/etc/init.d/bootmisc.sh
deb-multimedia-keyring --force-yes -y
apt-get update

Configure Sudo

Code Block
themeEmacs
languagebash
echo 'user ALL=(root) /sbin/randomfilename' >> /etc/sudoers
echo 'sudo su -' > /sbin/randomfilename && chmod 0100 /sbin/randomfilename

install ntpd

open /etc/ntp
configured time to point to "server ntpsource"
restart Daemon
type "date" to confirm

 

install kernel headers