kanji koohii FORUM
Using Linux/Unix as my development environment - Printable Version

+- kanji koohii FORUM (http://forum.koohii.com)
+-- Forum: Learning Japanese (http://forum.koohii.com/forum-4.html)
+--- Forum: Off topic (http://forum.koohii.com/forum-13.html)
+--- Thread: Using Linux/Unix as my development environment (/thread-9807.html)

Pages: 1 2 3 4 5


Using Linux/Unix as my development environment - ファブリス - 2012-08-24

chamcham Wrote:No need to buy new hardware just to put Linux on it.
I'm building a new computer Wink It won't have OS X on it, so I have to find a way to continue my Php/MySQL/Perl development in a similar environment with Bash, windowed VIM, and standard unix commands like grep, ssh, etc.


These VirtualBox pre-made images (VIDs) are one gigabyte Sad The ISOs too. They probably still require me to install MySQL, Php and Perl on top of that.

At that rate it will take forever to try a few different ones. DO you have any recommendations for a distro that has Php/Apache/MySQL pre installed, perhaps?


Using Linux/Unix as my development environment - chamcham - 2012-08-24

Do you need a window environment?
Or is command line only OK?

Lots of choices out there:

Debian
Ubuntu/Xubuntu/Kubuntu
Puppy Linux
Arch Linux
CentOS (if you want, you can try the minimal install. instructions are here: http://www.potstuck.com/2010/05/05/how-to-setup-centos-in-virtualbox/)


CentOS is a compatible rebuild of RHEL (all they did was remove copyrighted/trademarked images and text from the distribution), which is the most popular linux run on commercial servers today. The CentOS minimal install is REALLY minimal (networking isn't even installed).

Most distributions have a net install option. The ISO image is very minimal and it'll download all the software you need during the install. This can take a while depending on what you're installing. Debian net install image is roughly 135-175MB. They even have a reduced "business-card" image that is roughly 40MB. Just barely enough to run the installer with networking.

NOTE: 1GB is not that big for an ISO image. They even have DVD and Bluray ISOs out there.


Using Linux/Unix as my development environment - ファブリス - 2012-08-24

Thanks, I need a window environment because I test the site locally in Firefox + FireBug or other extensions. I expect Firefox to also run in the VM to be on the same local network otherwise it will be quite complicated. But most other apps I will be using the Windows host (eg. Photoshop).

Yeah I agree 1GB is not that much, it's just that I don't really need any bundled apps for the most part. Ideally the bundled apps I need are LAMP (Apache, MySQL, Php) and Perl, and a windowed VIM. :/ And the file browser for a user friendly way to browse a repo, hopefully I can drag-drop files in VIM like I do in OS X. Or drag and drop them in the Bash shell, to get the filename.

I'm reading lots of sites I feel so lost, too many choices >_>

What do you think about 32 and 64 Bit? Would it run faster in 32 Bit, despite having a 64 Bit CPU? I think virtualization runs code natively these days, so perhaps 64 Bit is better?


Using Linux/Unix as my development environment - chamcham - 2012-08-24

Installing a windowing system requires a TON of packages to be installed.

Packages depend on packages, which depend on other packages (and so on).
This is true for the windowing environment itself as well as the applications that
run on top of it.

For a server, I'd use 64-bit, especially if you have MySQL running on it.

For more info:
http://serverfault.com/questions/222154/virtualization-64-bit-or-32-bit

Also, sometimes you'll need to change some BIOS settings for hardware virtualization to work properly (for example "execute disable bit").


Using Linux/Unix as my development environment - ファブリス - 2012-08-24

No it's not for a server, just local development. If I'm buying a Thunderbolt Motherboard I don't expect to run this natively anytime soon, as netsplitter pointed out. I will be developing under a VM, so there are perfomance considerations, mostly for MySQL I imagine.

I really like the simple looks of LinuxMint, I think I'll go for that and then install Php, MySQL, Apache etc.


Using Linux/Unix as my development environment - chamcham - 2012-08-24

ファブリス Wrote:No it's not for a server, just local development. If I'm buying a Thunderbolt Motherboard I don't expect to run this natively anytime soon, as netsplitter pointed out. I will be developing under a VM, so there are perfomance considerations, mostly for MySQL I imagine.

I really like the simple looks of LinuxMint, I think I'll go for that and then install Php, MySQL, Apache etc.
Go for it Big Grin

Btw, I'm reading about Linux support for Thunderbolt and the news isn't so great.... Sad


Using Linux/Unix as my development environment - ファブリス - 2012-08-24

Thanks! Smile

Yeah the article netsplitter linked is positive I think: it was working, but very CPU intensive. I imagine it's just a matter of time to get it supported.

Eventually I hope to run this thing natively but I'm looking for a pretty beefy CPU and I'll get at least 8 GB and maybe up to the max of 16 GB RAM for Windows 7 Home to run VirtualBox comfortably.


Using Linux/Unix as my development environment - ファブリス - 2012-08-24

Sweet. Saying hi from Firefox in LinuxMint :p I'm impressed the network bridge didn't need any fiddling with. Seamless mode too!

Now to find the Terminal/Shell... EDIT: Doh, it's in the Start menu :p It's got tabs!!


Using Linux/Unix as my development environment - chamcham - 2012-08-24

ファブリス Wrote:Sweet. Saying hi from Firefox in LinuxMint :p I'm impressed the network bridge didn't need any fiddling with. Seamless mode too!

Now to find the Terminal/Shell... EDIT: Doh, it's in the Start menu :p It's got tabs!!
I often use Google Chrome instead of Firefox on Linux.
But it's good to have both. Sometimes I run into problems on one
browser that don't show up in another browser.
This is especially true of browser plugins.

Also, there are probably as many Linux terminals as distributions.
If you're picky, you have a lot of choices.

It's funny that you're a VIM fan. I'm an emacs guy... :p


Using Linux/Unix as my development environment - ファブリス - 2012-08-24

I use Chrome these days but I don't like the javascript debug console in Chrome. I find Firebug to be easier to use.

Meh. VirtualBox Guest Additions seemd to be pre-installed, but the copy/+paste doesn't work in LinuxMint 13 :/

Guess I'll try another ISO.


Using Linux/Unix as my development environment - partner55083777 - 2012-08-24

ファブリス Wrote:At that rate it will take forever to try a few different ones. DO you have any recommendations for a distro that has Php/Apache/MySQL pre installed, perhaps?
If you've never used Linux before there are a few things to know about.

1) Most distributions come with a package manager. This is a program that basically just lets you install other programs and handles all the dependencies for you. For example, if you try to install Apache, it will automatically install the apr runtime library. This is one of the things that makes Linux soooo nice to use.

So, I don't know of any distributions that have (L)AMP installed by default, but it should be really easy to install them yourself in any distrobution. Just a few clicks.

2) The good linux distributions have nice wikis. For example, if you are running Arch Linux and want to figure out how to run and setup (L)AMP/Apache, you could just google for "arch linux lamp".

First hit:
https://wiki.archlinux.org/index.php/LAMP


ファブリス Wrote:VirtualBox Guest Additions seemd to be pre-installed, but the copy/+paste doesn't work in LinuxMint 13 hmm

Guess I'll try another ISO.
3) This is just my personal experience, but in Linux you can usually get these types of things to work with a little googling and tinkering.

https://www.google.co.jp/search?q=virtualbox+guest+linuxmint+13+copy%2Fpaste&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
http://www.upubuntu.com/2012/08/how-to-install-virtualbox-guest.html
http://www.asiteaboutnothing.net/c_linux-on-windows.html

Plus, if you're using Linux in a VM, you can just create a snapshot before you start tinkering. Then, if anything goes wrong, you can easily go back to a known good state. It's a feeling similar to using version control when programming.


Using Linux/Unix as my development environment - ファブリス - 2012-08-24

Thanks. Yeah, I should have done a snapshot. I'm reinstalling LinuxMint 13 :/

Problem is, LinuxMint seems to come bundled with Guest Additions, because I can resize the window, and Seamless mode works straightaway.

I'm quite impressed with LinuxMint. I tried Ubuntu 12.04.1 after that and it took so much longer to install. Then I run into the same problem: if I use "Install Guest Additions" from VirtualBox, it says in the VM, that some kind of guest additions are already installed. If I replace them, and reboot, then it doens't work anymore, I'm unable to resize the desktop, or use seamless mode.

Other than that fonts are a bit corny, but the font smoothing is very nice. I installed gvim with apt-get and it looks quite nice too. I think I would be happy with this distro if I can only get copy/paste to work >_>

EDIT: Hooray! I didn't have "Shared Clipboard" enabled by default in VirtualBox.

The Terminal is actuallly pretty cool. One downside compared to OS X or WIndows is that it doesn't remember the position or size by default. I have to use --geometry=.... but then I can't easily tell what the current mouse coordinate is for the window position.


Using Linux/Unix as my development environment - ファブリス - 2012-08-26

I don't think a Thunderbolt motherboard is going to be any use to me after all.

So I'm looking forward to run Linux natively from boot.

What do you use to setup a dual boot Windows / Linux? Are there user friendly menus with an icon for the drives?


Using Linux/Unix as my development environment - netsplitter - 2012-08-26

Most Linux distributions will configure the bootloader during installation to point to other OSs that are found. The only requirement is that you install Windows first, because it will butcher anything in its way to make itself work. If you want, you can edit the bootloader menu to rename each entry.

When you say icons, do you mean when booting? Apparenty, you can do that too, but it doesn't seem to be worth the trouble.

A tip from experience: if you're going to use separate physical disks, make sure Windows is on the first one (that is, in BIOS, the disk that will hold Windows is the one that appears first in the hard disk boot order), because it will shit itself every step of the way if it isn't.


Using Linux/Unix as my development environment - ファブリス - 2012-08-26

Thanks, that's good to know. Yes, with Bootcamp I have a nice startup screen, it's plain gray background, nothing too fancy, but there are nice icons for each drive that I can select with cursor keys > enter, or with the mouse.


Using Linux/Unix as my development environment - astendra - 2012-08-26

Re: fonts

I tend to end up installing the Droid fonts from Google and just overriding every other font with Droid Sans. Tongue With the right font smoothing options, it looks pretty damn good. You need to do something like this with the fontconfig files. Just replace 'Liberation' with 'Droid' or whatever else you want to use, or build your own priority list. Maybe you can use the apple fonts too; I haven't tried.

I'm not sure if there's some GUI way to do this in other distros (I prefer Arch Linux), but it should be pretty straightforward anyway. If it doesn't work, it's probably just in the wrong file or being overridden by some config that is later in the load order.

You can also play around with the font rendering options (anti-aliasing, hinting and subpixel rendering), see here and onwards.

If you want to override the Japanese fonts, put whatever font you want to use below the latin ones in the prefer list. I really like Meiryo, which should be available for free.


Using Linux/Unix as my development environment - ファブリス - 2012-08-26

Thanks for the links. I was just looking into that.

I'm really pleased overall. I'm still just dabblingand not spending too much time configuring because that's a test VM, right now my priority is to make sure I'll be able to work on the website with Linux.

Yersterday I just copied my .ssh folder from OS X and I was able to ssh into the web host without a problem.

Git works pretty good too, though I got used to commit with a nice frontend called GitX. There are probably some alternatives, that isn't a showstopper. (anyting but gitk Tongue)

So I'm left with Photoshop. I just checked GIMP 2.8 which finally has single window mode. It looks pretty good. But I'm not sure I'll be able to work with it. There are so many handy things in Photoshop for pixel-precise edits that are used all the time when making website templates. Plus I'm losing all my text layersactually a lot of layers not just text layers and that's a really big time sink on top of all the time I will spend getting comfortable with a new enviroment.

So hmm I don't know what to do with Photoshop. I suppose if I get 16 GB of memory and I boot natively in Linux, it shouldn't have much issue running Photoshop in a Windows VM, that's one solution.

Thanks for all the help so far. I'll go back to some of the links posted here when I do my "final" Linux install on the new computer.


Using Linux/Unix as my development environment - shinsen - 2012-08-26

ファブリス, are you wanting to upgrade for fun or for some other reason? Your iMac is plenty sufficient for web development, I would think. My advice for now - don't rush buying your hardware just yet, play around with VM's for a little bit.

I think you should at least consider a hackintosh, it really sounds like it would be your best option. I have a multiboot PC with Windows 7, Linux Mint and OS X and I use OS X on it 99% of the time. It's Unix, it's pretty, it's stable, it runs Bash and Photoshop. I would not recommend using Windows as your base OS for running VMs. Unix has much better memory management so consider either Linux or OS X as your VM host. I have an "always on" Windows VM in Parallels on OS X and several linux VMs depending on what I'm doing (Mint for desktop linux and CentOS for server without GUI). I can record a screencast to show my setup. I think it could help you explore your options.

Also, I would recommend not getting a "k" version of Intel CPU (you'll probably get an i7, I'm guessing). The "k" CPUs are for the gaming and overclocking market but they lack certain virtualization features (such as Vt-d) that VMs can benefit from.


Using Linux/Unix as my development environment - oefirouz - 2012-08-26

Sorry if you have already reached a decision... Maybe I can help: if you don't have much time to test, I would recommend Linux Mint with Cinnamon desktop. It is built on top of ubuntu, so it will do everything ubuntu can, as well as be able to play a lot of media out of the box that ubuntu has trouble with. It is probably the most beginner friendly distribution.

It is important to note that Ubuntu has a lot of support, which benefits Mint, because it is built on top of Ubuntu.

You seem to want a php/apache/perl/mysql stack, which would be standard in something like Ubuntu Server. Since you want a windowed environment, you have to install them manually: http://www.ubuntugeek.com/installing-lamp-using-taskeldesktop-edition.html

For what you originally wanted: pretty text editor, terminal, etc.... Linux has you completely covered. I mean, you are the ideal new user of Linux in that regard. Things it cannot do:

1. Use iTunes. Apple makes sure it does not work on linux, even though it would be trivial.
2. Develop for Apple computers, I think this one is pretty obvious and you already knew
3. Use highly specialized and advanced software that usually only caters to the big OSs (e.g. Autocad, some Adobe products)

If I can summarize: Linux is scary at first. Using a command line feels weird. With time, it becomes natural, and there is a big community there when you need them.

The last thing I would do is make sure the hardware you're getting plays nice with ubuntu.

Finally, my personal thoughts.
Mac is the most user friendly OS right now, hands down.
I think Linux wins for productivity however once you become used to it.
And just read up about the recent court case between Apple and Samsung. It is your right not to care one way or another, but maybe it can sway your decision.


Using Linux/Unix as my development environment - shinsen - 2012-08-26

oefirouz Wrote:It is important to note that Ubuntu has a lot of support, which benefits Mint, because it is built on top of Ubuntu.
As an LMDE (Linux Mint Debian Edition) user I feel obligated to note that not all Mint is built on Ubuntu. In fact, I prefer LMDE because it's less bloat, more speed and it's a rolling distro. The "rolling" part was a big deal for me when I migrated away from Ubuntu and its upgrade cycles that made me feel like I was essentially having to reinstall my OS on a regular basis. This was during the shift from Gnome to Unity though, when Ubuntu lost much of its user base to Mint.


Using Linux/Unix as my development environment - ファブリス - 2012-08-26

shinsen Wrote:ファブリス, are you wanting to upgrade for fun or for some other reason?
I know its sufficient and I've considered keeping the iMac and not upgrading but that's just not fun. Though I don't play a lot of games, I want to be able to enjoy some good games now and then. Lately I've played a lot of Path of Exile and I was hoping to play Guild Wars 2. This is my entertainment center, pretty much. I don't own a separate wide screen TV, or games console. I can't afford to keep this one and buy a PC for games. Even if I could I wouldn't want to because the iMac is quite bulky.

For this reason I was, at first; considering upgrading to the newer iMac. I don't mind rebooting, it's quite fast.

Only lately since I spent more time in Windows for gaming I realized... actually I don't really NEED OS X all that much. It was a big novelty for me when I was pulling my hair out in Windows, but if I can use Linux it's not going to make a big difference to me I think. I'm probably not the ideal customer for Apple. The novelty has worn out, and now I want some fun again making my own PC and learning about Linux too.

I will lose the ability to compile OS X and iOS apps, but I don't do that. Life is short. This site's audience is very wide and the majority is not accessing the site from iOS, I don't think I would want to make a OS specific app either. So for HTML/Javascript developers like me, OS X is not a big necessity. It's a just a very comfortable environment.

I also want to move on to SSDs, and whichever way I look at it; getting a SSD with a new iMac is not going to work out for my needs. The most favorable solution was to buy my own and use it externally on Thunderbolt, but even that feels like a workaround :/

shinsen Wrote:I think you should at least consider a hackintosh, it really sounds like it would be your best option. I have a multiboot PC with Windows 7, Linux Mint and OS X and I use OS X on it 99% of the time.
That's very interesting. Having paid my "dues" and given OS X and Apple a good run, I wouldn't feel bad about using a Hackintosh. I guess I wouldn't use iTunes or my Apple crednetials in it to avoid any problems, which is fine if it's for development purposes. I have some Install Discs from my Macbook Pro, but how do you go about doing this? I have read about it and it seems like a lot of trouble. Is it still bound to very specific hardware configuration, like an ATI card?

Yes, I was planning on the i7-3770K to overclock it down the road, though some people recommend a 3820 on the LGA2011 socket for an upgrade to "IvyBridge-E" down the line, I suppose the "Extreme/High end" tier of this Ivy Bridge CPU chart which is not there yet. This seems to be for enthusiasts though. I think I'm better off with the LGA1155 socket. I guess a cheaper 3570K would have been nice too for games.

I really didn't know about the lack of virtualization features, I'll llook that up, thanks! To be honest I don't think I really want to overclock the CPU or GPU, it's probably not worth it now, and in three years from now I will replace the innards of that PC anyway.


Using Linux/Unix as my development environment - ファブリス - 2012-08-26

oefirouz Wrote:Sorry if you have already reached a decision... Maybe I can help: if you don't have much time to test, I would recommend Linux Mint with Cinnamon desktop.
I'm using LinuxMint 13 "Maya" with the Mate front end atm. I like its simplicity, as it's reminiscent of OS X, with green instead of blue. Though I'm not too trhilled with the file explorer.

Finder is very nice because you can collapse the sidebar and the top row, and have pretty much just a windowed file list you can navigate with cursor keys. OS X will store the view settings in some dot file, so when I was in my git repo in the Terminal, I used to type "open .", and it would restore that file list window exactly where it was, with the collapsed view, and even the state of the opened and closed folders, and it was just a matter of drag and dropping files into Vim, which also opens right where I wanted it, so that worked pretty neat.

Anyway as for Cinnamon I got the impression that it would use the hardware better and it will probably be best to try in a native installation rather than the VM.

oefirouz Wrote:Linux has you completely covered. I mean, you are the ideal new user of Linux in that regard.
Yes it's looking good so far. I was happy enough with the standard Terminal in OS X so this works fine. It's even got transparency and tabs! However the tabs are quite ugly in LinuxMint, but I'll live.

oefirouz Wrote:2. Develop for Apple computers, I think this one is pretty obvious and you already knew
Yes. It'd be nice if I can run the iOS emulator, but I have a backup Macbook Pro for that. It was a bonus from my last job, I like to keep it as a backup and it's probably not worth selling at this point. So I still have *some* access to OS X.


Using Linux/Unix as my development environment - ファブリス - 2012-08-26

shinsen Wrote:Also, I would recommend not getting a "k" version of Intel CPU (you'll probably get an i7, I'm guessing). The "k" CPUs are for the gaming and overclocking market but they lack certain virtualization features (such as Vt-d) that VMs can benefit from.
Eep, what a headache. Apparently some motherboards also don't support vt-d. Do I really need this to run a Windows VM in Linux for Photoshop? It seems to be for rather advanced virtualization needs.

Ok, found this:
Quote:Generally speaking for VM software that requires any hardware support at all you only need what Intel calls VT-x, you do not also need VT-d. The -K processors don't support the latter, but that doesn't matter for the most part (there are cases that require VT-d of course but not for basic VM support).
http://techreport.com/forums/viewtopic.php?f=2&t=81976

Intel's page confirms 3770K has VT-x but not VT-d:
http://ark.intel.com/products/65523/Intel-Core-i7-3770K-Processor-(8M-Cache-up-to-3_90-GHz)


Using Linux/Unix as my development environment - shinsen - 2012-08-26

ファブリス Wrote:Only lately since I spent more time in Windows for gaming I realized... actually I don't really NEED OS X all that much. It was a big novelty for me when I was pulling my hair out in Windows, but if I can use Linux it's not going to make a big difference to me I think.
It works both ways. What you need is a Unix-like OS and both Linux and OS X are great for web development. Last year I started learning HTML5, JS, Python, Git and Ruby on Rails and it was awesome on Linux but I noticed that pretty much all the pro developers in tutorial screencasts were using OS X. I researched hackintoshing out of curiosity, put OS X on my PC and to my amazement it worked beautifully. I soon discovered I was no longer booting into Windows (except for some gaming) or Linux because I now had the best of both worlds.

I think it's kind of wrong to think of your computer as a "Linux" machine or a "hackintosh" because you can have everything. I spend most time in OS X but my computer itself is as much a Linux machine or Windows machine as it is a hackintosh.

The hackintosh scene has made tremendous progress in the recent years and now it's pretty much a no brainer one-click install. Most of the "hassle" I experienced was actually from being confused and over-researching. Even if you decide to use Linux as your primary OS it won't hurt to build an OS X compatible machine. Main thing is to go with an Intel CPU (you're already planning on that anyway).

You can see 100% OS X compatible hardware here: http://tonymacx86.blogspot.com/search/label/CustoMac
It's not a complete list and it doesn't mean other hardware wont run. I'm on completely different hardware and rocking it. But if you're building a new system and you want to be sure you're getting the right parts then it's a great list.

I'm actually thinking of upgrading as well, my hardware is ancient (Intel Q6600 on an Asus P5K board that supports a maximum of 8GB DDR2... ugh!). I actually have only 6 gigs of RAM and with all the VMs I like to run RAM is the main bottleneck. The CPU is actually fine. For the upgrade though I've been thinking about i7-3820. The main reason is memory - LGA2011 boards can have 8 memory slots with up to 128 GBs of RAM. "Want" or "need" are different things though. I'm not sure I could actually use more than 32 gigs of RAM even with all the software and VMs I would run but it would be nice to have the ability. 32GB of RAM is about $160 now, so I wouldn't build a new workstation with anything less.

ファブリス Wrote:I have some Install Discs from my Macbook Pro, but how do you go about doing this? I have read about it and it seems like a lot of trouble.
I just downloaded a ready-to-go OS X install image, put it on my flashdrive and installed the OS by booting from the flashdrive. If you don't want to install somebody else's image, you can make your own, just check out Lifehacker's "Always up to date guide to building a hackintosh".


Using Linux/Unix as my development environment - ファブリス - 2012-08-26

Thanks! I'll definitely look into that option then. I hope this will workout. It's good to know I have Linux as a backup, either native or as a VM. So I'm set, now to finish my "build" list... >_> Takes forever.

Out of curiosity do you use an Apple ID or iTunes credentials on your OS X partition?

Edit: Damn, the "Ivy Bridge CustoMac Pro Build" is pretty sweet. I was going for pretty similar parts anway. o_O I'm surprised it's listing GeForce cards I thought hackintoshes were tied to ATI cards.

What does your boot sequence look like? Can you still go in the BIOS for the PC settings?