|
I’m not interested in using Linux for my desktop, Gnome and KDE really don’t do it for me and Windows XP is doing me fine – though I am looking forward to moving my studio onto a Mac Pro. Another big reason Linux as a desktop isn’t for me is that Adobe’s Creative Suite 3 does not, and won’t by the looks of things, support any flavor of Linux. I’m after a new Server environment. I’m in the process of switching from Classic ASP (ASP3) over to PHP5. I’ve been using MySQL religiously for my dev work. But what I really want access to is the speed and reliability of Apache and PHP running on Linux. Also the chmod in ftp will save SO MUCH TIME when setting up blogs or any other site that requires permission changes. So it’s time to learn – and by learning I mean command lines. Back to the good ‘ol DOS days. I found Ubuntu 7.10 Server to be the solution for me. Why? Because a) It’s built on Debian and 2) they are the best at marking their flavor of Linux and bringing it to the attention of us Windows users. Also a great feature that I found is that in around 15 minutes you can have a LAMP (Linux, Apache, MySQL and PHP) server up and ready to go! You just select it during installation! The LAMP option means you don’t have to install and integrate each of the four separate LAMP components, a process which can take hours and requires someone who is skilled in the installation and configuration of the individual applications. Instead, you get increased security, reduced time-to-install, and reduced risk of misconfiguration, all of which results in a lower cost of ownership. New pre-configured installation options have been added to the Ubuntu Server. Mail Server, File Server, Print Server, and Database Server options join existing LAMP and DNS options for pre-configured installations, easing the deployment of common server configurations. Here’s what will be installed - Ubuntu Gutsy Gibbon 7.10
- Apache 2.2.4
- Mysql 5.0.45
- PHP 5.2.3
Installing Ubutnu Server I found to be really simple and once I did it a couple of times (due to errors on my behalf) I quickly found it even easier to install then Windows 2003 Server You’ll need to first download Ubuntu Server from http://www.ubuntu.com/getubuntu/download. Burn the ISO or mount it in VMWare if you are installing it on a virtual machine. Insert the CD a make sure you BIOS is set to boot from the CD/DVD drive - Select “Install to the Hard Disk”
 - Select your language
 - Select your location
 - Ubuntu Server can try and detect your keyboard layout. For the most people will be using US English. Select No and chose your layout yourself.
 Go through the options for your keyboard. The installation will then detect your hardware. - Enter ubuntuLamp or what ever you want to call your Server
 - The installer will detect your Hard Drive. Select “Guided – use entire disk”
 - When you receive the screen title “[!!] Partion Disks” select <Yes> and hit enter
 - Select <Yes> when presented about the system clock
 - Enter in administration for your name
 - Enter in administrator for your username
 - Enter in a secure password (here is a great article on coming up with a secure password that you can remember)
 - When you are presented with the screen [!] Software selection press the down arrow till the “* is in the “LAMP server” box and press space bar. As were also going to be using SSH I also select “OpenSSH server”
 - You’ll be presented with the option to change the MySQL root password. This is highly recommended as the standard password is blank
 - You’re done! Remove the CD from the CD drive and reboot
 - You server is now installed.
 Next I configure a Static IP. Log into your server using the details you entered during install. I’m using 192.168.0.150 as my example IP) Type and enter your password again Then Type nano /etc/network/interfaces If you have typed it out correctly you’ll Also you will see the following: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet dhcp Replace the last 3 lines with the following: # The primary network interface auto eth0 iface eth0 inet static address 172.19.0.10 netmask 255.255.255.0 network 172.19.0.0 Try Ctrl+O to write the file and then press enter Type Ctrl+X to exit To set your Nameservers, type Enter in your nameservers as required “nameserver xxx.xxx.xxx.xxx” Type Ctrl+O to write the file and then press enter Type Ctrl+X to exit Now you need to restart your network service. Type the following /etc/init.d/networking restart You’ve now configured your network interface. I also wanted to also install Webmin to manage my server remotely as well as SSH but I found that the install instructions on the above site just didn’t work for me. So here is how I installed Webmin on my Ubuntu Server. You will need to enable the universe and universe and multiverse repositories in the /etc/apt/sources.list (https://wiki.ubuntu.com/AddingRepositoriesCliHowto) This is also where I started to use Putty and SSH (http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe) sudo su mkdir /opt/Webmin cd /opt/Webmin wget http://easynews.dl.sourceforge.net/sourceforge/webadmin/Webmin-1.390.tar.gz gzip -cd Webmin-1.390.tar.gz | tar xvf - sudo apt-get install libauthen-pam-perl libnet-ssleay-perl libpam-runtime openssl perl perl-modules Note I had heaps of problems with this command and it was to do with my sources.list file. No matter what I uncommented it just didn’t seam to work. I had to generate a new sources.list file from this site (http://www.ubuntu-nl.org/source-o-matic/) and past that into /etc/apt/sources.list then run sudo apt-get update before the above command would run Basically just hit enter and choose SSL and the auto start the service at boot. Use these settings (or change as requried) Web server port (default 10000): (Feel Free to change this) Login name (default admin): Login password: AReallyGoodONE Password again: AReallyGoodONE Use SSL (y/n): y Start Webmin at boot time (y/n): y I found that the default instating module for PHP looks for the php.ini file in the Apache directory when it needs to look in the apache2 directory. After instating login into Webmin by visiting https://your-ip:10000 and click on “Other” in the right bar. Then click on “PHP Configureation” You should see that following: /etc/php5/apache/php.ini=Configuration for mod_php /etc/php5/cgi/php.ini=Configuration for scripts run via CGI /etc/php5/cli/php.ini=Configuration for command-line scripts Change the line /etc/php5/apache/php.ini=Configuration for mod_php to read /etc/php5/apache2/php.ini=Configuration for mod_php and click save This should have configured the PHP moduble for Webmin for you. FTP Now were going to install ProFTPD FTP server. Login into your Ubuntu Server via SSH, or how ever you wish to access the console, and type: sudo apt-get install proftpd When asked if you want to install the server as a inid or standalone, select standalone and continue. Done! Now if you check back in Webmin under Servers you’ll see ProFTPD Server, if you click on that you should see the ProFTPd options up and running. Adding a FTP user is done through the “System => Users and Groups” area in Webmin. You just click on “Create a new user” enter in the details and select the home directory to /var/www (make sure you click the check box next to the home directory text box as it stays checked at “Automatic” even once you enter something into the text box.) Fire up your ftp client and login! You should now have a working LAMP+F (Linux, Apache, MySQL, PHP and FTP) Ubuntu Server. Next I’ll be looking into securing the server. I’ve read that ProFTPD isn’t the most secure FTP Server to use with Linux, apparently VSFTPD is the way to go there, but for the purpose of simplicity for the first time, and the fact that this is not a live server, rather just a testing box, it’s not such a big deal. Please post your comments on this, if you find it useful please let me know – anything that needs further clarification tell me – I’m new to Linux as you might be so this is a big change. Thanks to Author, orignal link http://jamielesouef.com/linux/installing-ubuntu-server-lampsshftpwebmin-and-phpmyadmin-for-a-newbie/
|