How to setup a box and 3 machines as a web development environment for a small team - mysql

Extended title: How to setup a box with (Windows7 + Apache + VisualSVN + MySQL + PHP) and 3 machines with (MacOs/Windows7) and Dreamweaver CS5 as a web development environment for a small team
These are my thoughts. Please forgive my ignorance, I still don´t have completly clear all the concepts.
1. I need to setup a web development environment for a small team of 3 web developers. The staging and live environments will be in a remote server under an external hosting company (probably Amazon).
2. Our first project is a blog with Wordpress
3. I've installed XAMPP in the box and can be accessed like this (http://dev.company.com/xampp)
4. I've installed Wordpress and can be accessed like this (http://dev.company.com/blog)
5. I've installed VisualSVN in the box and can be accessed like this (http://dev.company.com:8080/svn)
6. I don´t know how to import files for the first time to my repositories in the box (c:/repositories/blog)
7. VisualSVN includes Apache. I don´t know if I should turn off the Apache of XAMPP or if should install another version of VisualSVN without Apache
8. I don't know if I should keep my repositories at C:\repositories or c:\xampp\htdocs.
9. I've read something about hooks? to copy the files from the repositories to the htdocs? Can anybody explain this process?
10. Would it be a good option to keep all the files always in the box? or it is a better option to check out the files to the machines?
11. When setting up Dreamweaver to connect to the SVN Server, do I have to point to the trunk, branch or the name of the repository? Do I have to setup a different connection for each branch?
12. How can we include images and PSD's in the repositories?

When we start a new project we usually just checkout files on clients and commit the changes to the server when finished editing. This way people can just edit files on their own machine (without other users slowing stuff down).
Can't you just do a Linux install for the webserver (CentOS or something like that?). Windows 7 seems so heavy / unfitted for webdevelopment server.
We usually keep the repo out of the webroot.
XAMPP really???
Just my two cents...

It's strongly not recommended to use Apache HTTP server bundled to VisualSVN Server for anything else than Subversion server. So you have to install VisualSVN Server and XAMPP.
Just keep repositories in C:\Repositories. If you move them to htdocs all repository will be accessed for everyone who have access to XAMPP.
Common practice is to checkout working copy to htdocs folder, configure permissions to deny access to .svn and then run svn update in post-commit hook in VisualSVN Server.

Related

Should I install MariaDB to my git repo, or locally / individually to all development computers?

I am starting work on a website that will use MariaDB for storing information (no sensitive information), and would like to keep everything in my git repo.
Originally, I planned on installing MariaDB to the separate computers that I plan to develop on (my desktop and laptop), but decided that it may be easier to store all of MariaDB (the program and the databases) in the git repo, so that one would just need to clone the repo and run MariaDB from the repo just like they would run Node, but I have not found any information on how to do this.
My questions are (1) should I install MariaDB and its databases to my git repo, instead of installing MariaDB in /usr, and the database in /var/lib/mysql, and (2) how would one do that?
Instead of attempting to put a mariadb runtime environment inside your version control, consider using docker to describe how to configure an appropriate mariaDB installation. I use makefiles atop that to contain the commands I use to build and run the docker but you coould just as easily use a shell script. Finally, provide a dataabase load script that loads your test database from a text file within the repo.
using docker to describe runtime environments for your application and dependencies is awesome. It strikes a great balance between having an incomplete git repo, and having to put binaries and database data in your version control. You wouldn't want to track changes to the underlying maria db files, anyway, so best not to commit them. You can build the docker containers you need on every workstation you use without much trouble, your automation around creating them provides a mechanism to ensure consistency, and by loading a database with the correct test data every time you develop your app, you'll have a better development process and less schema and data related changes. It works great, I do nothing but docker driven development these days.

Copy ALL sites from remote server to local server Ubuntu & Filezilla

Hey all,
I'm new to linux and still learning and I've searched and haven't been able to find the exact same issue anywhere......
I have a CentOS remote server hosting approximately 60 websites. Some just html, others custom scripts, and mostly wordpress.
I want to backup ALL the sites to my local Ubuntu 16.04.1 lamp stack server.
I am using Filezilla and I'm assuming it's not downloading the the /var/www folder because of permissions, but again, I'm new and don't know much.
Questions:
Do I need to change some settings in Filezilla?
Can I download them with terminal but in bulk?
I do understand I will have to grab all the databases and install them locally, separately, but are there any programs that could help automate this process, paid or free?

Switching between developer environment Windows/Ubuntu

I have a PC with a dual boot: Win 8.1 and Ubuntu 14.04 and I have some project in PHP & mySql and sometimes I need to develop under ubuntu (but I usually prefer Windows) but I need to share the files and db's between the two os.
In share I mean if I change some php files or rows in the database that must be visible in both OS. Is it possible?
Extra thing: The most beautiful thing would be if I could get the mercurial in this thing.
Liquibase for proper versioning of DB-changes in both OS
Mercurial in both OS
External Mercurial hosting (Bitbucket?) for intermediate repository and backup
Good editor or IDE, in which you can configure EOL-style (in order to have same EOL in Windows and Linux, different by default)
Code in active OS, commit changes to local Mercurial, push to remote.
Before starting work in another OS - pull collected changes from remote

How to deploy a laravel project?

Like the question says How I should deploy a laravel project? that is already on github.
Do I need to install laravel whit the composer on the web server or just copy the whole directory of my proyect that have the folders app,public,vendor and the other files?
It depends on your server. If you hava full access to server (such as vps or even dedicated), it's good to install composer there and do laravel installation use Composer, allow you to easily manage your project later. Otherwise, yes, you have to copy all files including vendor directory to your server.
Note, if you're going to deploying to shared server which you have no full access to, you probably want to create fresh laravel installation (production version of your project) with --prefer-dist and --no-dev locally first. It'll reduce application file size.

create and restore a mysql db using a setup project (installer) in VS.Net

What is the best practice for creating an installer for a winform application.
The application is supposed to install the following without connecting to internet.
.Net Framework 3.5sp1
MySQL Server
My SQL Connector
Restore Mysql db
Update Config file with the MySQL uname/pwd.
I have all the msi files for installing the above mentioned items. But am wondering about the best practice to create the installer.
Thanks in advance,
Hi I came up with a similar situation. Firstly you should have .NET framework offline installer which can be downloaded from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=992cffcb-f8ce-41d9-8bd6-31f3e216285c. I assume you are using visual studio installer. There are couple of choices but I prefer to copy the offline .NET installer to the setup projects output directory and from requirements on target machine tab I set the install URL property of .NET framework the exact name of offline setup file. As described in the figure.
So the installer does not try to connect to a remote computer to download .NET framework and install it however I think it is more appropriate that it connects to a Microsoft server and installs it. Anyways the next step is to configure the MySQL server. MySQL is really generous for me since they support a fully documented noinstall files. You can find the document here: http://dev.mysql.com/doc/refman/5.5/en/windows-install-archive.html
Using a noinstall zip archive you can copy the dbengine core files to any folder on the clint machine. And change the configuration parameters of MySQL. You can name the MySQL service anything you want. Start the the service and create tables. You can do all of this stuff from custom actions tab of the setup project choosing the appropriate script files or you can write code for it. The beautiful thing is that your customer does not need to know that he/she is installing a database engine on the target machine. I hope this helps. Thanks.