icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Web Hosting Tutorials » [Dedicated] How to build a developer server

Web Hosting Tutorials Feel free to browse or contribute.

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old June 11th, 2008, 6:01 PM   #1 (permalink)
URB4N 5K1LLZ
Super #1
 
Roxy's Avatar
 
Joined in Sep 2005
Lives in Orlando, FL
Hosted on SH63
2,656 posts
Gave thanks: 81
Thanked 128 times
[Dedicated] How to build a developer server

This is aimed at the developer that would like their development server the same as surpass. Makes sense that your development server be the same platform as your hoster. So I wrote [Not Roxy] this small tutorial for anyone who is a developer and wishes their server to be the same as their hosting.

Introduction

If you are a developer then you might want to consider setting up a development server with Linux. Linux is used widely by many hosters today, and so this makes a good choice as a local development server. For this tutorial you will need a second system to setup as your server.

I have looked at a lot of distributions of Linux and I went with CentOS for two reasons. My hoster uses this and it is based on RedHat. CentOS is also very easy to install and setup. In this tutorial I am going to take you through all the stages of downloading CentOS, installing and configuring it and get you up and running with your own development server.
Getting CentOS

First of all we are going to need to either download all 6 CD ISO files or the DVD. Select your download option here.

Once you have downloaded this burn the ISO to a DVD.

Installing CentOS

Once you have created the DVD place it into your server's dvd drive and either restart or reboot the server. It should start from the DVD and at the first command prompt press enter. This will start the graphical installer. This installer is much easier to understand for the newcomer to Linux.

When you are asked about partitioning your drives, select the top option (delete all partitions) and allow CentOS to claim the complete drive. If you are shown a partition table next just press enter and allow CentOS to continue. When confronted with IP address options, leave it at DHCP if you use a router of some kind to connect to the internet. We will change this later as a fixed IP address, this is best for a server.

The next important part is what packages to install. Make sure you do extra packages and check to configure now in the setup. Make sure you select as servers ftp, web, samba and MySQL. I unchecked all office and graphic programs like openoffice and gimp. If you chose the CD option rather than the DVD, then you will need all 6 ISO files.

Once you have installed CentOS it will reboot and confront you with the post install configuration. This is not hard, just do what it says.
Configuring CentOS

Now when it reboots login as root.

MySQL

At the top menu select Applications > Add/Remove Software. When the information is retrieved, click on the list tab. Now press P and check all you see that starts with php. Then press M and scroll down until you see mysql and make sure these are installed, (they will be checked) and if not check them.

mysql
mysql-connector-odbc
mysql-devel
mysql-server
and press apply.

IP Setup

Now remember we left the network configuration at default using a DHCP for your IP. As mentioned above, we will change this now. On the top menu bar select System > Administration and select network. It will load up in the devices tab, this is the one you want. So click the edit button and check Statically set IP address. Now enter the network address as the same as in your range. Like if your router and your computer is 192.168.1.x then enter an IP address in the same range but with a different ending digit that is not in use on your network. For example: If your router is 192.168.1.1 and your computer is 192.168.1.2 then use something like 192.168.1.10. I used 192.168.1.200. Then enter your Subnet mask, most likely it will be 255.255.255.0. The Gateway is your routers address. Then click on DNS and in the primary and secondary DNS enter your ISPs DNS addresses. You can most likely get these from your ISPs home page under support. For the host name enter 127.0.0.1. Leave the remaining blank. I entered nothing in those. Now click on the devices tab again and click activate. It will update the config file and then restart your network so you will not have to reboot again. Now that you have a static address go to your remote system and see if you can ping the IP address you entered for CentOS. If you can then we can carry on.


Apache

Now by default Apache is not running, so we will have to start that.

Go to on the top menu Applications > Accessories and click on terminal. You will need to start apache as by default it will not start at bootup. Now in the terminal type: apachectl start and press enter. This will start apache server for you.

By default all in the /var/www/html (web root) is locked and you do not have access to it. So let's sort this out. Click on System > Security Level and Firewall. Enable the firewall if disabled. Not good to have no firewall. So once enabled check ftp, ssh and www (html) and then click apply. You will still not have access to any web files in html so we need to change the group and access rights. So navigate to /var/www/ and right click on the html folder and select properties. Change the group to and owner to the user name you entered at post install. You cannot FTP with root. Change folder access to Create and delete files. Also change others to the same.

Now click "Apply permissions to enclosed files". Then click close.
Start Services

So to get mysql, apache and the ftp server to start at boot up do this:

Click on Administration > Server Settings > Services Now look for and check the following:

Apache = httpd
FTP = vsftpd
MySQL = mysqld
Now close and save the new boot config file.

This is a good point to reboot the server so all servers boot. We want mysql, ftp and the web servers to load and since we have all configured now to start at boot up.

Test Apache

Now on your remote system open a web browser and type in the web address and you should see your test page for apache.
If not try on CentOS by using

cPanel

If all is fine on the remote server then we can go to the next stage. Now if you create a html in html the folder you will be able to access it from the remote system.

FTP

Now we need to test FTP from your remote system. Load up your ftp client and use these connection settings. server: Your servers IP address. name: The user name you setup at post install. Remember that linux is case sensitive. Password: Your user password you entered at post install. remote location: /var/www/html/

Now connect. You should connect fine and be able to create files and directories.

I hope this tutorial got you where you expected. If you have any problems then please do not hesitate in asking questions.

Good Luck!

Special thanks to Kenmight for this tutorial
__________________
Roxanne


Urban Roxy -Personal Blog
SH63 - the best darn shared server!
Roxy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On