Skip to content

Commit

Permalink
Merge pull request xeoncross#4 from asimzeeshan/master
Browse files Browse the repository at this point in the history
Fixed two bugs
  • Loading branch information
xeoncross committed Oct 3, 2012
2 parents 886d3ab + 3832cec commit 1bfc403
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
11 changes: 11 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ Updates Ubuntu /etc/apt/sources.list to default based on whatever version you ar

$ ./setup-debian.sh apt

##### Info on Operating System, version and Architecture

$ ./setup-debian.sh info

##### SSH-Keys

Either you want to generate ssh-keys (id_rsa) or a custom key for something (rsync etc)
Note: argument is optional, if its left out, it will write "id_rsa" key

$ ./setup-debian.sh sshkey [optional argument_1]

## After installation

MySQL root is given a new password which is located in ~root/.my.cnf.
Expand Down
27 changes: 24 additions & 3 deletions setup-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,16 @@ function install_php {
echo 'Using PHP-FPM to manage PHP processes'
echo ' '

mv /etc/php5/conf.d/apc.ini /etc/php5/conf.d/orig.apc.ini
print_info "Taking configuration backups in /root/bkps; you may keep or delete this directory"
mkdir /root/bkps
mv /etc/php5/conf.d/apc.ini /root/bkps/apc.ini

cat > /etc/php5/conf.d/apc.ini <<END
[APC]
extension=apc.so
apc.enabled=1
apc.shm_segments=1
apc.shm_size=16
apc.shm_size=16M
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
Expand All @@ -276,7 +278,7 @@ apc.enable_cli=0
apc.rfc1867=0
END

mv /etc/php5/conf.d/suhosin.ini /etc/php5/conf.d/orig.suhosin.ini
mv /etc/php5/conf.d/suhosin.ini /root/bkps/suhosin.ini

cat > /etc/php5/conf.d/suhosin.ini <<END
; configuration for php suhosin module
Expand Down Expand Up @@ -679,6 +681,21 @@ function install_webmin {
print_info "Not: If the installation ends with an error, please run it again"
}

############################################################
# Generate SSH Key
############################################################
function gen_ssh_key {
print_warn "Generating the ssh-key (1024 bit)"
if [ -z "$1" ]
then
ssh-keygen -t dsa -b 1024 -f ~/id_rsa
print_warn "generated ~/id_rsa"
else
ssh-keygen -t dsa -b 1024 -f ~/"$1"
print_warn "generated ~/$1"
fi
}

############################################################
# Classic Disk I/O and Network speed tests
############################################################
Expand Down Expand Up @@ -783,6 +800,9 @@ vzfree)
webmin)
install_webmin
;;
sshkey)
gen_ssh_key $2
;;
test)
runtests
;;
Expand Down Expand Up @@ -820,6 +840,7 @@ system)
echo ' '
echo '... and now some extras'
echo ' - info (Displays information about the OS, ARCH and VERSION)'
echo ' - sshkey (Generate SSH key)'
echo ' - apt (update sources.list for UBUNTU only)'
echo ' - ps_mem (Download the handy python script to report memory usage)'
echo ' - vzfree (Install vzfree for correct memory reporting on OpenVZ VPS)'
Expand Down

0 comments on commit 1bfc403

Please sign in to comment.