- create your own user
adduser johndoe # root@vps
# now, relogin onto johndoe
mkdir .ssh
# copy ssh key from your local machine to johndoe's account
scp ~/.ssh/id_rsa.pub vps:./.ssh/authorized_keys
# now, lets check if `su` works
su
# if yes, then disable permitRootLogin option in:
vim /etc/ssh/sshd_config
service ssh restart
Swap file should be site to 1-2xRAM size.
https://www.digitalocean.com/community/questions/swap-debian-7-64-bits
@thanksto https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md for great similar guide
apt-get update -y
apt-get upgrade -y
apt-get install sudo -y
# Install vim and set as default editor
sudo apt-get install -y vim
sudo update-alternatives --set editor /usr/bin/vim.basic
#Install the required packages:
sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-s
# Install Python
sudo apt-get install -y python
# Make sure that Python is 2.5+ (3.x is not supported at the moment)
python --version
# If it's Python 3 you might need to install Python 2 separately
sudo apt-get install -y python2.7
# Make sure you can access Python via python2
python2 --version
# If you get a "command not found" error create a link to the python binary
sudo ln -s /usr/bin/python /usr/bin/python2
# For reStructuredText markup language support install required package:
sudo apt-get install -y python-docutils
sudo apt-get install -y git-core
## Do you want to have the most-update git? if yes, then do:
# Remove packaged Git
sudo apt-get remove git-core
# Install dependencies
sudo apt-get install -y libcurl4-openssl-dev libexpat1-dev gettext libz-dev libssl-dev build-essential
# Download and compile from source
cd /tmp
curl --progress https://git-core.googlecode.com/files/git-1.8.4.1.tar.gz | tar xz
cd git-1.8.4.1/
make prefix=/usr/local all
# Install into /usr/local/bin
sudo make prefix=/usr/local install
sudo apt-get install -y postfix
If you want to also have IMAP & SMTP server, install dovecot (although this sounds like being in the `90... think about moving email service to somewhere else (SaaS):
- http://www.debuntu.org/how-to-virtual-emails-accounts-with-postfix-and-dovecot/ (you max want to disable cmusieve in 3rd step of this guide, because I couldn't find this in debian's apt packages :/)
- TLS configuration in postfix via www.cacert.org: http://koti.kapsi.fi/ptk/postfix/postfix-tls-cacert.shtml
If you want to configure only SMTP server for your web apps:
@see https://github.com/sstephenson/rbenv
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev
rbenv install -l
rbenv install 2.0.0-p353
rbenv global 2.0.0-p353
gem install bundler --no-ri --no-rdoc
https://gist.github.com/jtomaszewski/7630081
MySQL, PostgreSQL: https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/databases.md
- create your own other (non-root) user
- http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian/
- http://www.tildemark.com/enable-htaccess-on-apache/
- http://serverfault.com/questions/383734/how-do-i-set-default-umask-in-apache-on-debian
- you can write in first line:
MAILTO="john@doe.me"
in case of invalid configuration ofcrontab -e
Warning: No output found from the lsmod command or the /proc/modules file: /proc/modules output: lsmod output:
Solution: add "avail_modules loaded_modules" to DISABLE_TESTS in /etc/rkhunter.conf
Warning: Hidden directory found: /dev/.udev
Solution: comment out: ALLOWHIDDENDIR=/dev/.udev
- Debian 6/7: http://www.dotdeb.org/
http://dba.stackexchange.com/questions/8982/what-is-the-best-way-to-reduce-the-size-of-ibdata-in-mysql http://erikimh.com/how-to-shrink-an-ibdata1-file-with-minimal-mysql-downtime/