Debian6 安装LAMP

Installation

# Create directory to hold TuxLite scripts and enter new directory.
mkdir tuxlite
cd tuxlite

# Download the desired script. Copy script link from "Download" section.
wget http://tuxlite.com/scripts/tuxlite.tar.gz

# Extract contents of tarball.
tar xzf tuxlite.tar.gz

# Edit options to enter server IP, MySQL password etc.
nano options.conf

# Make all scripts executable.
chmod 700 *.sh
chmod 700 options.conf

# Update APT database and install aptitude.
apt-get update && apt-get -y install aptitude

# Explore script functionalities.
./setup.sh

#Install LAMP or LNMP stack.
./install.sh

# Add a new Linux user and add domains to the user.
adduser johndoe
./domain.sh add johndoe yourdomain.com
./domain.sh add johndoe subdomain.yourdomain.com

# Install Adminer or phpMyAdmin
./setup.sh dbgui

# Enable/disable public viewing of Adminer/phpMyAdmin
./domain.sh dbgui on
./domain.sh dbgui off

# Enable/disable public viewing of AWStats. Allow 24 hours from adding domain to viewing its statistics.
./domain.sh stats on
./domain.sh stats off

# Install and enable Varnish
# ***WARNING*** Do not use Varnish unless you know how to configure the VCL.
./varnish.sh install
./varnish.sh on
./varnish.sh off

Post Install

Your install is complete and your site works. Great! Now what? As a responsible sysadmin you will need to perform some maintenance and post install procedures.

  1. Occasionally update your server using
    aptitude update
    aptitude safe-upgrade
  2. Set up cronjobs to backup your databases and sites. The backup.sh script can do this for you. Remember to download and keep copies of your sites locally.
  3. Enable/Disable phpMyAdmin and AWstats from being publicly accessible. This is to prevent brute force attacks on your server. Enable only when you need them.
  4. Consider tweaking configurations to better utilize the amount of memory available to your server. Read the readme for respective web stacks for more information on config files to edit.
  5. Install Fail2Ban to protect your server from brute force SSH login attempts.
    aptitude install fail2ban
  6. Install DDOS Deflate script to mitigate denial of service attacks. Refer herehttp://deflate.medialayer.com/
  7. You may also refer to the tutorials section for other further tweaks.

发表评论

邮箱地址不会被公开。 必填项已用*标注