User:Olexiyb

= Install debian =

Download debian
Download Official netinst images for the sid release from: http://www.debian.org/devel/debian-installer/ http://cdimage.debian.org/cdimage/etch_di_beta3/i386/iso-cd/debian-testing-i386-netinst.iso

VMWARE installation and configuration
Install vmware 5.2

Install debian under VMWARE
New/Virtual machine/Typical/Linux/Other 2.6 kernel/

Enter name "debian_sid"

Location c:\My virtual machines\debian_sid

Use Nat network

Disk size 20Gb

Finish

Change virtual machine settings:

Mount downloaded iso file as CD-ROM. Don't create new CD

Boot and follow default instructions

Set password for root

Create new user olexiyb

Installation done.

Reboot

Turn of beeping
vi /etc/inputrc Uncomment line set bell-style none

Install ssh server
apt-get install openssh-server

Port forward in vmware
In debian get ip. ifconfig Got for example 192.168.112.135

In vmware

Edit/Virtual network settings/NAT/Edit/Port Forwarding/Add TCP port

Host port 5522.

Virtual machine IP address: 192.168.112.135.

Port:22

Description: debian_sid

Add connection to SecureCrt
New session.

Protocol: SSH2

Host: localhost Port: 5522 User: root

Session name: debian_sid root Finish

Verify that connection works

Configurate proxy
vi /etc/profile add line export http_proxy=http://localhost:9981 After that the best is to create new script with name proxy cd ~ mkdir bin cd bin vi proxy put line in proxy script ssh olexiyb@shemp.quoininc.com -L 9981:localhost:9981 make proxy executable chmod 700 proxy Add .:~/bin to $PATH, vi /etc/profile Modify line with PATH PATH=.:~/bin:..... relogin

Configurate secureCrt - ssh connection without password
Options/Global Options/SSH2/Create Identity File/

Next/DSA/Empty Passphase/1024/...

Select folder c:/i/securecrt to store keys

Now ftp Identity.pub file to debian server to folder ~/.ssh

and run

ssh-keygen -X -f ~/.ssh/identity.pub >> ~/.ssh/authorized_keys2 chmod 600 authorized_keys2

More source places
vi /etc/apt/sources.list add deb http://mirrors.kernel.org/debian/ unstable main contrib non-free deb-src http://mirrors.kernel.org/debian/ unstable main contrib non-free Run apt-get to update list of available packages apt-get update

Add short names for hosts
vi /etc/hosts add 24.225.231.105 shemp.quoininc.com shemp 64.191.84.165   nyuk.quoininc.com   nyuk

To restore network under vmware
http://kb.vmware.com/KanisaPlatform/Publishing/137/1923_f.SAL_Public.html vi /etc/network/interfaces auto eth0 iface eth0 inet dhcp And after that run ifup eth0

Install vim
apt-get install vim

Install apt-show-versions
apt-get install apt-show-versions

Upgrade
apt-get upgrade reboot !!!

Using dselect
Usually dselect utility propose upgrade to the latest kernel. That is the easiest way to get latest kernel. Just select Install option.

install ftp
apt-get install proftpd

Compile kernel
apt-get install kernel-package ncurses-dev fakeroot wget bzip2 apt-get install util-vserver # to install with vserver options apt-get install gcc #if no gcc installed apt-get source linux-source-2.6.18

Install sshfs
apt-get install sshfs modprobe fuse sshfs olexiyb@shemp:/ /mnt/shemp -o allow_other -o transform_symlinks

If you want it to work after reboot, add it to /etc/modules

http://myy.helia.fi/~karte/mount_sshfs.html

Use the -o transform_symlinks option, which will transform absolute symlinks (ones which point somewhere inside the mount) into relative ones.

http://fuse.sourceforge.net/wiki/index.php/SshfsFaq

Automatical mounting using /etc/fstab

A line in /etc/fstab has the following format:

sshfs#USERNAME@REMOTE_HOST:REMOTE_PATH MOUNT_POINT fuse SSHFS_OPTIONS 0 0

e.g.

sshfs#guest@guest.login.com:data /mnt/guest fuse uid=1003,gid=100,umask=0,allow_other 0 0

To unmount use the command

fusermount -u local_mountpoint

Install vserver
apt-get install linux-image-2.6.18-2-vserver-686 reboot apt-get install vserver-debiantools Now modify /etc/vservers INSTALL_PACKAGES="ssh" MIRROR="http://mirrors.kernel.org/debian/"
 * 1) DIST="sid"

debian:/etc/vservers# locate vservers | grep ".*vservers$" /etc/vservers /root/tmp/etc_vservers /root/tmp/var_lib_vservers /usr/lib/util-vserver/start-vservers /var/cache/vservers /var/lib/vservers /var/run/vservers

vserver vserver1 build -n vserver1 --hostname vserver1.mydomain.com --interface eth0:192.168.78.135/24 -m debootstrap -- -d sid

Remove perl warning:
vi /etc/profile export LC_ALL=C export LANG=en_US

Install mysqld
apt-get install mysql-server

By default mysql doesn't have password for root. We have to set it up

steve@steve:~$ mysql --user=root --pass mysql Enter password: mysql> update user set Password=PASSWORD('new-password-here') WHERE User='root'; Query OK, 2 rows affected (0.04 sec) Rows matched: 2 Changed: 2  Warnings: 0 mysql> flush privileges; Query OK, 0 rows affected (0.02 sec) mysql> exit Bye

Install mediawiki
apt-get install memcached #default port is 11211 apt-get install apache2-mpm-prefork libapache2-mod-php5 php5-gd php5-mysql mysql-server php5-cli apt-get install imagemagick apt-get install php5-memcache apt-get install mediawiki1.7

Now modify /etc/php5/apache2/php.ini and change line to memory_limit = 200M You can put 32M minimum for mediawiki

Now put into /etc/apache2/apache2.conf

Include /etc/mediawiki1.7/apache.conf

And restart apache

/etc/init.d/apache2 restart

Go to webbrowser http://localhost/mediawiki/ Follow setup link and enter Wiki name: mywiki Contact email: email Memcached: localhost:11211 Mysql: localhost Database name: wikidb Superuser: root Superuser password: put root password

And press Install MediaWiki. You should get something like that:

Please include all of the lines below when reporting installation problems. PHP 5.2.0-3 installed Found database drivers for: MySQL PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title) Have XML / Latin1-UTF-8 conversion support. PHP's memory_limit is 200M. If this is too low, installation may fail! Have zlib support; enabling output compression. Neither Turck MMCache nor eAccelerator nor APC are installed, can't use object caching functions Found GNU diff3: /usr/bin/diff3. Found ImageMagick: /usr/bin/convert; image thumbnailing will be enabled if you enable uploads. Found GD graphics library built-in. Installation directory: /var/lib/mediawiki1.7 Script URI path: /mediawiki Environment checked. You can install MediaWiki. Connected to memcached on localhost:11211 successfully Generating configuration file... Database type: MySQL Loading class: DatabaseMysql Attempting to connect to database server as root...success. Connected to 5.0.26-Debian_3-log Created database wikidb Creating tables... using MySQL 4 table defs... done. Initializing data... Granting user permissions to olexiyb on wikidb...success. Created sysop account root. Initialising "MediaWiki" namespace... Clearing message cache...Done. Creating LocalSettings.php... Installation successful! To complete the installation, please do the following: Move /config/LocalSettings.php to /var/lib/mediawiki1.7/LocalSettings.php for normal install, root of your install for multisite, with rights 640 Start using your wiki!

Install phpMyAdmin
apt-get install phpMyAdmin

install eAccelerator
apt-get install autoconf automake libtool m4 apt-get install php5-dev #that need to get phpize utility cd /tmp wget http://umn.dl.sourceforge.net/sourceforge/eaccelerator/eaccelerator-0.9.5.tar.bz2 tar jxvf eaccelerator-0.9.5.tar.bz2 cd eaccelerator-0.9.5 phpize ./configure make make install

After that we need configurate php vi /etc/php5/cli/php.ini and /etc/php5/apache2/php.ini

And put

extension="/usr/lib/php5/20060613/eaccelerator.so" #put full path to library eaccelerator.shm_size="16" eaccelerator.cache_dir="/tmp/eaccelerator" eaccelerator.enable="1" eaccelerator.optimizer="1" eaccelerator.check_mtime="1" eaccelerator.debug="0" eaccelerator.filter="" eaccelerator.shm_max="0" eaccelerator.shm_ttl="0" eaccelerator.shm_prune_period="0" eaccelerator.shm_only="0" eaccelerator.compress="1" eaccelerator.compress_level="9"

Verify that extension works

php -v

Should see PHP 5.2.0-3 (cli) (built: Nov 10 2006 14:58:46) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies with eAccelerator v0.9.5, Copyright (c) 2004-2006 eAccelerator, by eAccelerator

Install Tomcat 5.5
http://tomcat.apache.org/tomcat-5.5-doc/RUNNING.txt under root  cd /usr/local wget http://apache.seekmeup.com/tomcat/tomcat-5/v5.5.20/bin/apache-tomcat-5.5.20.tar.gz wget http://apache.mirrors.redwire.net/tomcat/tomcat-5/v5.5.20/bin/apache-tomcat-5.5.20-admin.tar.gz gunzip *.gz tar -xvf apache-tomcat-5.5.20.tar tar -xvf apache-tomcat-5.5.20-admin.tar ln -s apache-tomcat-5.5.20 tomcat rm apache*.tar cd tomcat rm -rf conf logs server/classes server/webapps shared temp webapps work 

under user1 we want to have tomcat in $HOME 

wget http://apache.seekmeup.com/tomcat/tomcat-5/v5.5.20/bin/apache-tomcat-5.5.20.tar.gz wget http://apache.mirrors.redwire.net/tomcat/tomcat-5/v5.5.20/bin/apache-tomcat-5.5.20-admin.tar.gz gunzip *.gz tar -xvf apache-tomcat-5.5.20.tar tar -xvf apache-tomcat-5.5.20-admin.tar ln -s apache-tomcat-5.5.20 tomcat rm apache*.tar cd tomcat rm -rf bin common server/lib 

Now modify conf/server.xml  change to different port if 8005 is busy for example 8105 

Modify .bashrc add JAVA_HOME=/usr/lib/PATH_TO_JAVA_INSTALLED CATALINA_HOME=/usr/local/tomcat (path to tomcat installed by root) CATALINA_BASE=~/tomcat (path to local tomcat webapps) export JAVA_HOME CATALINA_HOME CATALINA_BASE export PATH=$PATH:$CATALINA_HOME/bin

relogin with user1 and run startup.sh

Minimal configuration: shutdown.sh cd $CATALINA_BASE/conf mv server.xml server.xml.old cp server-minimal.xml server.xml change ports as described upper to required ones in server.xml cd ../webapps/ rm all webapps applications except ROOT rm all files under ROOT, but leave WEB-INF/web.xml and create index.html with some "test text" startup.sh now verify that tomcat works http://localhost:port/ You should see your "test text"

configurate site-enabled NameVirtualHost *  ServerAdmin webmaster@localhost

DocumentRoot /var/www  Options FollowSymLinks AllowOverride None Allow from 127.0.0.0/255.0.0.0 ::1/128   Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny Allow from 127.0.0.0/255.0.0.0 ::1/128 # Uncomment this directive is you want to see apache2's               # default start page (in /apache2-default) when you go to / #RedirectMatch ^/$ /apache2-default/ 
 * 1)               allow from all

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/  AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from 127.0.0.0/255.0.0.0 ::1/128 
 * 1)               Allow from all

ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn

CustomLog /var/log/apache2/access.log combined ServerSignature On

Alias /doc/ "/usr/share/doc/"  Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 



build 2.6.18

How to chrooting cvs server?
apt-get install libpam-chroot