Hello All,
I want to start off by saying that I as new you can get to Linux. I wanted to document some of my progress with this Distro and I thought I can help other newbie’s. I haven't seen a lot of info dedicated to sarge and it took me a while of searching to find what I did. I have been documenting all of my progress with a configuration of a dedicated server in scripts and now I want to put it in one place. I am going to start of with the basic's configuration of apache, mysql and php.
So here goes……… please add to what I have and tell me if you want more.
###################
# Install Steps
#
# First let’s make sure your packages are up-to-date
#
apt-get update
apt-get dist-upgrade
#
# I’m not assuming anything so let’s make sure we have ssh installed so
# we can remote login
#
apt-get install ssh
#
# Now what I do next is make a user account that I can log into and deny # ssh logins to ssh from root for security issues
#
adduser user
passwd user ‘and give yourself a password’
#
# Now make sure you can login to the user you just made
#
su user
#
# Ok, exit that user and remove root access from ssh
#
exit
vi /etc/ssh/sshd_config
#
# Change PermitRootLogin from yes -> no
#
PermitRootLogin no
#
# Make sure to save your work
#
Ctrl + :
wq 'enter'
#
# Now login to ssh with a client, I like putty, you'll have to login in with the # user accout you made above
#
# Now that your login with a non-privliged user you'll want to switch to root
#
su root 'and give the password for root'
#
# Ok, now that's out of the way lets start installing some apps
#
# We will start with apache/mysql/php install and then test them.
# I added a couple of other things I'll need in the future
#
apt-get install apache apache-ssl apache-dev mysql-client mysql-server mysql-common php4 php4-imap php4-mysql openssl ca-certificates
#
# Test apache
#
http://"your-ip-address"/
#
# You should see the place holder page
#
# Create a an admin account for mysql and test it
#
mysqladmin -u root password 'password'
mysql -u root -p "enter password given above"
exit;
#
# Now, we make a test page for php
#
touch /var/www/test.php
chmod 755 /var/www/test.php
vi /var/www/test.php
<?
echo("<h1>PHP and Apache Works!</h1>");
?>
#
# Make sure to save your work
#
Ctrl + :
wq 'enter'
# I like to restart apache now to make sure everything is ok
#
/etc/init.d/apache restart
#
# Now, test to see if PHP is working
#
http://"your-ip-address"/test.php
#
# You should see a nice greeting telling you that PHP and Apache Works!
#
###################