Remote Linux Server setup plan - linux

I have an old computer with formatted drive lying around collecting dust, now I want to instal a linux like OS (any suggestions?) on it and install a web server, preferrably Lighttpd. I want to set up a server so that I have an environment to practice web development in PHP or Java. My problem is I dont want to hook up another set of keyboard/mouse/monitor to that old computer, and if possible I want to remote boot/shutdown the server from this computer that I use to type this question.
I did some google search, but the results are never comprehensive or suitable for my circumstance. Any input would be appreciated, book recommendation or link to a good resource are fine too.
Thanks
Qin
P.S. I did some search on stackoverflow before asking this question, if there is another similiar question being asked, let me know.

You actually needs an unattended (silent) linux installation, which may trigger beeps to tell you when the installation is done. Hope this can help you refine your search on google.

You'll definitely need at least a monitor or KVM and a keyboard if you want to install any OS on it.
For server OS, you could try going for CentOS / Ubuntu. However, if your requirement is just to practice your PHP and Java, you could even use your existing laptop / PC and, assuming windows, you can just install wamp or xampp, to install your apache/php/mysql with just clicks.

Related

Switching to linux [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I've been using linux at university for quite a while, and it seems much more customisable and better for coding.
So I want to switch to linux from windows 7 at home.
What branch of linux should I use? I'm an emacs user if that gives any insight.
Which desktop enviroment should I use? At uni we use KDE, but it's too graphical, often I just click on stuff instead of using the terminal. I want one where it encourages me to use terminal more.
and the biggest question, how do I install it all? Should I put everything on external hard drive and wipe my computer completley?
I primarily program in Java and python.
I would recommend that you first try using Linux off Live CD/DVD. Linux Mint, Ubuntu, etc.
Just download and burn .iso onto blank media and boot your computer off of it. Just play around, check various desktop environments, see if all your hardware work with the specific Linux distribution. This step is very useful to decide which distribution you actually want to install onto your computer, especially the latter since, while it has been improving, the biggest obstacle you may face in configuring your computer to run on Linux is often hardware incompatibility. Just make sure everything that you need to work actually works.
If you have no issues wiping out Windows, Linux installation is pretty straightforward these days. It even takes less time in general than re-installing Windows. I would browse the web for an installation note for your specific computer model to see if anyone has already successfully done so, so that you can just follow. That saves a lot of time.
I use Debian (Wheezy now) and KDE. It's very easy to install and switch desktop environments after installing Linux though, so that shouldn't be any concern.
I suggest creating a virtual machine using VMWare or Virtual Box. As far as the distribution goes, Linux Mint and Ubuntu are pretty user-friendly for first time installations. And for the desktop environment, I suggest XFCE.
A few Google searches will do you good. I think a virtual environment will be much more easier to manage than partitioning a hard-drive.
Well, the installation step, if you use Windows 7, you may want to make a full backup of your hdd - so if things go wrong you will be safe and able to recover.
I was in somewhat similar situation recently - figuring out which linux distro to use. Previously I had luck with ScientificLinux, but this time it didn't like my laptop hardware for some reason - after wake-up wireless network card was getting stuck and wasnt picking any signal. I didn't want to recompile kernel etc., so I installed Ubuntu, but the Gnome 3 was a show stopper - I had to roll back to Gnome 2, but later I tried and liked a lot XFCE desktop - which I use right now on my workstation and laptop.
Java, Python and emacs probably work well with any linux distribution out of the box, so it is up to you which one to choose after all. Good luck!
Sorry, forgot to mention - all contemporary Linux distributions are able to install a dual boot feature - so you can keep your Windows 7 setup along with Linux (if you have enough of free space), moreover Windows partition will be accessible from Linux which is handy sometimes.

Cygwin vs Linux Virtual Machine for Development?

< skippable part >
I work in IT (mostly desktop support and network administration) in a Windows environment, and I occasionally program.
A couple weeks ago, I decided I couldn't be as effective as I want to be without a Bash environment for my command prompt needs. This is especially true when I am using Ruby and git. I used Msysgit for a while, but I just didn't like how it wasn't extensible like Linux. So, I installed Cygwin and played around with that for a couple weeks.
As great as Cygwin is, it seems like it is meant to be a suped up command prompt, and its compatibility with Linux is just a pleasant side effect. This especially became evident when I tried to upgrade Ruby to 1.9.3 (it worked, but it wasn't straightforward), install rvm (never worked), and install RMagick (may or may not work, but looks like a headache).
So, now I'm considering running Linux in a virtual machine. But I'm worried that might be another can of worms and I'll have wasted hours before I find that out. I like that Cygwin runs in Windows and I get to use my IDE, user folder, and more with it. But I don't like that support for it is not as thorough as for a major distro.
< /skippable part >
Does anyone here have insight on using Cygwin vs running a Linux virtual machine?
Any advice on setting up a Linux development environment in a virtual machine within Windows?
I have faced common issues before, and the best solution according to my experience is just 2 workstations :).
Apart from that having Linux running in a virtual environment is way better.
First of all, you will have full Linux capabilities (except 3d acceleration, but you probably don't need that).
You will have the capability of creating snapshots and revert back to them when things go wrong!
You can start multiple environment using templates, which is very convenient.
The only downfall I can think of is performance issues of the host machine.
If it's a normal workstation/PC, an IDE + one virtual machine + a 100+tabs browser just makes it slow.
1: cygwin is good for quick hacks, and for being able to acces host-os resources(you can run IE for example in a bash script). For something tightly integrated and some "real" word, go to a vm. It will emulate everything and separate development from the real machine, and this may be a good thing in some cases... as a plus it simulates a real server:)
2: in virtualbox at least, you have shared folders, and you can share a local folder, and see it in the vm as a local folder(local or as a windows share..it actually depends). Then you can use that "entry point" to symlink stuff into the vm, and do the things you need with the real files being located in the real(host) machine
SSH into a linux box. This is what everyone does. Why isn't this the answer?
There is something I have heard of called Cooperative Linux. It runs Linux alongside with Windows kernel so you can use them at the same time. I've never used it, but here:
http://www.colinux.org/
What I think now is getting the pros of 2 options is using
Docker
, it is giving you cygwin simplicity and VM functionality with better performance.
Linux in a virtual machine will give you the experience you want more than cygwin or any mock shell as I like to call them.
Running VM's though require a lot of ram depending on whether you want a desktop version of linux or just a command line version.
Myself in work I have a pc with 8gb of ram and I run ubuntu 64bit as main OS, two ubuntu servers (these are for dev environments two different projects) and a windows 7 VM and a win XP VM.
I can run the two ubuntu servers and one other VM at the same time, key here is more ram if you want to be able to do VM's.
If you're going to be working with Ruby then get an Ubuntu virtual machine up and running :) I've not tried Ruby, etc on Windows but I have heard that it is a pain to setup and configure. I use a Mac for all my Rails development so I cannot comment on the Windows side for that.
As for virtual machine creation, I prefer VMware Workstation, however there are free alternatives such as Virtualbox and VMware Server.
I'm using a Linux VM within a Windows seven environment as this VM is as representative as possible of the final production environment. The whole setup is binded to the Eclipse IDE under ms-Windows seven. So this is really great for local full testing, before committing or tagging the tested version to the production servers.
As you mentioned as well, this takes some time to get properly setup and fully configured. So if your need is only for little tricks or tasks, you may keep using cygwin. For example, I faced significant issues to configure perl and compile mysql within cygwin. So it's ok for basic usages, but not to fully take advantage of a full linux environment.
Your choice strongly depends on the final server setup purpose. A VM will do it whatever your need is. The setup cost for it is higher, so this time investment must be used often to get returned.

Which Linux distro for Developing in Rails?

I'm just starting to learn Rails (Rails 3 specifically), and everything I see leans toward working in Linux to make things easier. Since I'm bound to Windows for work, I'll be running Linux in a VM. Are there any Linux distros that are well suited for Rails development? Please give some kind of justification for your recommendations.
Go with whatever goes well for you. There's no need for a particular distro to develop in any language.
My advice to avoid installing useless stuff is to install Debian (maybe a testing version if you want the latest software) or Slackware.
I find Arch to be great for customizing to do anything so also dev environment, it's really easy to setup (as vbox guest for example) and you can easily handpick many tools from either the main repos or AUR.
If you use anything even remotely mainstream there will be packages for everything you need in the repository. Configuration is going to be broadly similar across distributions as well, with only a few minor differences.
I'd suggest looking at one of Open Suse, Fedora, or Ubuntu. All of those distributions are going to be fairly newbie friendly. Open Suse lets you select XFCE as your desktop environment, and Xubuntu is an ubuntu variant that uses xfce instead of gnome. You might want to look at one of these options if you're running in a VM since xfce is slightly lighter weight than gnome (although not all that much lighter these days).

Advantages of Using Linux as primary developer desktop [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I want to get some input on some of the advantages of why developers should and need to use Linux as their primary development desktop on a daily basic as opposed to using Windows. This is particulary helpful when your Dev, QA, and Production environments are Linux.
The current analogy that I keep coming back to is. If I build my demo car as a Ford Escort, but my project car is a Ford Mustang, it doesn't make sense at all.
I'm currently at an IT department that allows dual boot with Windows and Linux, but some run Linux while the vast majority use Windows.
Here's several advantages that I've came up with since using Linux as a primary desktop.
Same Exact operating system as Dev, QA, and Production
Same Scripts (.sh) instead of maintaining (.bat and *.sh). Somewhat mitigated by using cygwin, but still a bit different.
Team learns simple commands such as: cd, ls, cat, top
Team learns Advanced commands like: pkill, pgrep, chmod, su, sudo, ssh, scp
Full access to installs typically for Linux, such as RPM, DEB installs just like the target environments.
The list could go on and on, but I want to get some feedback of anything that I may have missed, or even any disadvantages (of course there are some). To me it makes sense to migrate an entire team over to using Linux, and using Virtual Box, running Windows XP VM's to test functional items that 95% of most of the world uses.
This is similar but a little different thread going on here as well.
link text
I have to say getting forced into SSH access to a linux development box for PHP/MySQL development has been one of my greatest and fastest growth experiences as a developer (who formerly worked only in windows XP as a dev environment) as well as bridging some of the knowledge gap between development and sysadmin tasks which is great for developers to understand more about, especially if you ever end up in a one-man army kind of situation.
I was all about windows/eclipse and point and click, and now I am all about VIM and keyboard shortcuts. The color coding/auto tab complete stuff is pretty good these days.
Where I work we use Rackspace Cloud servers for production and development. I imaged the production server (2G ram/CentOS 5.2 stack) for a dev server (so the environment IS EXACTLY THE SAME not close but EXACT) and run it on the smallest instance (256M ram) which is only about $12 month for my dev box. My buddy had a mac he did local dev on for the same codebase and he experienced subtle bugs in the code due to the mac environment, that I do not experience on my cloud dev box (or production).
So what I am getting at is with this type of shift (to the cloud for linux dev with no GUI) portability and quick recovery from hardware failure, and productivity (keyboard shortcuts rule over point/click/drag select) are some other major advantages. Obvs you can learn keyboard shortcuts in Windows too, but when forced to work in only a terminal window, you learn a lot more of them out of necessity. I run Windows 7 on a laptop (essentially as a dumb terminal to my cloud devbox), but I SSH into my devbox with putty and work on code with VIM and manage it with git. If my laptop ever fails or gets stolen, all I really need is ANY computer that has an SSH client (and internet connection) and I can be productive on a temporary loaned computer within 30 minutes until my preferred hardware is fixed/replaced. (all my passwords on the laptop are in a keepass encrypted db which is backed up on dropbox.com as well as external HD, occasional gmail to self). And of course configure putty with nice fonts/font size and full-screen window size.
In contrast getting a windows box from clean install to dev environment tweaked exactly how you want might take a couple full-time days plus a couple hours here and there for a month, and still not replicate the production environment to your needs.
Ok, end biased rant - I guess my point is I didn't know what I was missing as a windows guy, and simple non GUI linux tools for web development have proven to be superior to me for how we work. But also note my laptop is Windows 7, so when work is done or a need to do some IE testing, I'm on a "normal" OS. However, I doubt a lot of people would be willing to make such a change if there is no perceptible gain or immediate need.
I just switched to using Ubuntu from Windows XP, here's what I found:
Pro's of Linux
Linux is less likely to be affected by viruses. I lost some time to viruses when I used XP.
As you said, same environment as Dev/QA/Prod which is nice. It's no longer a change of mindset when I connect to one of those machines
Linux is more stable. I usually rebooted XP every week or two.
You get to use the unix tools (find, pkill, grep, etc.). Cygwin is a workaround but seems quite a bit slower than running unix natively.
Performance seems quite a bit better on Linux. This is probably the biggest win for me, I have a memory-intensive Dev environment.
Cons of Linux
Open Office is a bit of a shock to the system compared to Word/Excel (which I have been using for many years).
I miss Notepad++
I need to run VirtualBox to host my local Sql Server Dev database
I need to run VirtualBox when running internet explorer
More of a pain to copy/paste text between Sql Server Management studio and IE if needed because they run in VirtualBox
Remote Desktop is more of a pain. Microsoft's remote desktop allowed me to not have to log out from work before working at home and vice versa
I have one app that only runs with the Wine emulator and won't work at all for me when remote desktop-ing on linux
I agree with the poster who said it's good to give developers a choice - they will appreciate that instead of having one or the other OS rammed down their throats. An added benefit is that you'll then be able to differentiate the good devs from the bad :) Just kidding.
On my first employment, we had been working on HP UX systems. So I really learned love the power of the console and it's elegance:
Use find to work on loads of files
less for really big log or data files without delay
for loops with substring handling to rename thousands of files in seconds.
and many other nice shell hacks to save you time and nerves...
But not many people seemed to agree in my later employments...
However. I only once had the posibility to use a Fedora Linux box for development several years ago. It was a 64 bit system in the first years of their existance. Maybe this was the problem. I was looking forward to use a proper shell again, but was disapointed as Eclipse did not run stable and had a lot of bugs. This was a pitty and a no go. Since then I never again had the chance to use linux as development OS.
As I start to work in a new employment in some days I really think about to give it an other try. Would do you think, is it still unstable? I nearly can't imagine.
You won't have to use Visual Studio.
Since that doesn't seem to be an issue for you, you might provide more details---what languages are you developing in? If it's Java, then you'll be spending most of your time in Eclipse, Netbeans, etc., so it really won't make much difference. What is your budget for the changeover, or what savings do you hope to get?
From your reasons it seems that you're pretty commited to UNIX already.
Why not give the developers a choice?
git runs faster.
...
Okay, not that much of an advantage...
Linux boxes are easier to containerize with solutions like Docker so that you can more easily share your environment with other devs or QA.
Also, if you need multiple boxes talking to each other for your dev setup, then Linux is a more practical solution. I was working on a Windows machine with a .Net solution which had to talk to services on a different box. I chose to install a couple of VM's using the steps described here (http://mytakeon.it/the-complete-steps-to-having-a-virtual-box-up-and-running-on-your-computer/). The Linux VMs were so light weight, easy to manage and faster in booting up.

Linux Lightweight Distro and X Windows for Development [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I want to build a lightweight linux configuration to use for development. The first idea is to use it inside a Virtual Machine under Windows, or old Laptops with 1Gb RAM top. Maybe even a distributable environment for developers.
So the whole idea is to use a LAMP server, Java Application Server (Tomcat or Jetty) and X Windows (any Window manager, from FVWM to Enlightment), Eclipse, maybe jEdit and of course Firefox.
Edit: I am changing this post to compile a possible list of distros and window managers that can be used to configure a real lightweight development environment.
I am using as base personal experiences on this matter. Info about the distros can be easily found in their sites. So please, focus on personal use of those systems
Distros
Ubuntu / Xubuntu
Pros:
Personal Experience in old systems or low RAM environment - #Schroeder, #SCdF
Several sugestions based on personal knowledge - #Kyle, #Peter Hoffmann
Gentoo
Pros:
Not targeted to Desktop Users - #paan
Don't come with a huge ammount of applications - #paan
Slackware
Pros:
Suggested as best performance in a wise install/configuration - #Ryan
Damn Small Linux
Pros:
Main focus is the lightweight factor - 50MB LiveCD - #Ryan
Debian
Pros:
Very versatile, can be configured for both heavy and lightweight computers - #Ryan
APT as package manager - #Kyle
Based on compatibility and usability - #Kyle
-- Fell Free to add Prós and Cons on this, so we can compile a good Reference.
-- X Windows suggestion keep coming about XFCE. If others are to add here, open a session for it Like the distro one :)
Try using Gentoo, Most distros with X are targetted towards desktop user and by default includes a lot of other application you don't need and at the same time lacks a lot of the stuff you need. YOu could customize the install but usually a lot of useless stuff will get into the 'base' install anyway.
If you worried about compile time, you can specify portage(the getoo package management system) to fetch binaries when available instead of compiling. It allows you to get the flexibility of installing a system with only the stuff you want.
I used gentoo and never went back.
http://www.gentoo.org/
I installed Arch (www.archlinux.org) on my old MacMini (there is a PPC version) which only has 512MB RAM and a single 2.05GHz processor and it absolutely flys!
It is almost bare after installation, so about a lightweight as you can get.. but comes with pacman, a software package manager, which is as-good-as apt-get (ubuntu/debian) if not better.
You have a choice of installing many desktop managers such as: awesome, dwm, wmii, fvwm, GNOME, XFCE, KDE, etc.. straight from pacman using a single line of code.
In my opinion(!!) it's lightweight like Gentoo but a binary distro so it isn't as much hassle (although I can imagine it can be a little daunting if you're new to Linux). I had a system running (with X and awesome WM) in about 1.5 hours!
I'm in a similar situation to Schroeder; having a laptop with 512mb RAM is a PITA. I tried running Xubuntu but tbh I didn't find it that it was either useable or a great saver on RAM. So I switched to Ubuntu and it's worked out pretty well.
My 2c:
I'd recommend basing your system on Debian - the apt system has become the de-facto way to quickly install and update programs on Linux. Ubuntu is Debian based with an emphasis on usability and compatibility. As for windowing managers, in my opinion Xfce hits the right balance between being lightweight and functional. The Ubuntu-based Xubuntu would probably be a good match.
Remember - for security only install essential network services like SSH.
If it were my decision, I would set up a PXE boot server to easily install Ubuntu Server Edition to any computer on the network. The reason why I would choose Ubuntu is because it's the one I've had the most experience with and the one I can easily find help for. If I needed a windowing manager for the particular installation, I would also install either Xfce or Blackbox. In fact, I have an old laptop in my basement that I've set up in exactly this way and it's worked out quite well for me.
I would recommend to use Archlinux which I'm using now. XFCE is my choice for desktop environment by now but if you prefer more lightweight one you can try LXDE
Archlinux is much like Gentoo but with binary packages prebuilt and with more simpler configuration
If all those distos still won't work for you, you may want to try LFS - Linux From Scratch
I would recommend Xubuntu. It's based on Ubuntu/Debian and optimized for small footprint with the Xfce desktop environment.
I am writing this on a Centrino 1.5GHz, 512MB RAM running Ubuntu. It's Debian based and is the first Linux distro I have tried that actually worked with my laptop on first install. Find more info here.
Second the Arch suggestion. You will be tinkering quite a few configuration files to get everything going, but I've found none better for a lean and mean setup.
I suggest you should checkout the following three distros:
Damn Small Linux - Very lightweight. Includes its own lightweight browser (Dillo), but you can install Firefox easily. The entire distro fits on a 50MB LiveCD.
Slackware - Performance wise Slackware will probably perform the best out of the three, but I'd suggest running your own benchmarks with your hardware.
Debian- Debian is extremely versatile. This is the only distro of the three I'd recommend for both a 32 bit 1GB RAM laptop and also a 4GB RAM 64 bit machine.
I would recommend something mcuh lighter than XFCE: IceWM. It takes so time to configure it to be really usable, but it's worth it. I have a fully running IceWM which only takes about 5MB of RAM.
The primary reason I use Linux is because it can be lightweight. In 1999, I used Redhat, Mandrake (now Mandriva), and Debian. All were faster and more lightweight than my typical Windows 98 installations.
Not so anymore. I now have to research and experiment in order to find distros that are lightweight in both storage and memory footprint, and speedy. These are the ones I have played with lately:
Slitaz, a French distro (I use the English version and it works well).
Crunchbang, a lightweight Ubuntu and Debian-derived distro
Crux, which is source-only and very low-level geeky (I chose it because it has good support for PowerPC, and I was using it on my aging Powerbook G4)
Currently, however, I use Archlinux for most of my work, as it offers a good compromise between lightweight and feature-full.
But if you decide to roll your own distro from scratch, you may want to try Buildroot or Openembedded. I do not have much experience yet with Openembedded, but using Buildroot I have been able to create a very simple OS that boots quickly, loads only what I want, and only takes up 7 MB of storage space (adding development tools will increase this greatly, of course; I am merely using it as an ssh terminal, although I can do some editing with vi, and some text-only web browsing).
As far as window managers, I have been very happy with OpenBox. I frequently experiment with lighter-weight window mangers listed on this page, however.
here is my opinions as well. I have used Fedora, Gentoo, SliTaz, Archlinux, and Puppy Linux for development. The constraints: the system virtual image had to be under 800mb to allow for easy download and include all necessary software. The system had to be fast and customizable. It had to support version control SVN and Git, XAMPP or LAMP, SHH client, window environment (X or whatever) with latest video drivers/higher resolution, and some graphical manipulation software for images.
I tried Archlinux, Puppy, and SliTaz. I have to say that SliTaz was the easiest to work with and to set up. The complete base-OS install from the image is around 120mb using the cooking version. TazPkg is a great package manager but some of the listed packages were outdated. Some of the latest versions needed to be built from source code.
SliTaz is extremely lightweight and you have to live with some older packages in the supported TazPkg package list. There is increasing support and XAMPP, Java, Perl, Python, and SVN port well using TazPkg with latest versions. SliTaz is all about customization and lightweight. The final size was 800mb with all necessary software. ArchLinux and Pupppy, although also lightweight were over 1.5GB after all of the software was installed. The base systems were not comparable to SliTaz.
If anyone is interested in a virtual image for SliTaz with XAMPP to try out, contact away and link will be posted.
All the best and happy development! :)

Resources