Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Installing Dropbox on Centos 6

  • This topic is empty.
Viewing 15 posts - 76 through 90 (of 93 total)
  • Author
    Posts
  • #183122
    nixnerd
    Participant

    But I’m assuming it would be more than that. I would actually have to install git, correct?

    On your server? Yes. You would install it the same way you install any package:

    sudo yum update
    sudo yum install git
    #183123
    chrisburton
    Participant

    Ok. I updated and installed git. Now do I git clone? Traq said create a directory but what if I want the repo to be added into my /var/www/html directory?

    #183124
    __
    Participant

    Right. I know the very basics of SSH (logging in, starting/stopping/restarting apache/mysql, checking statuses and changing directories) and that’s it.

    Actually, the only part of that that is “ssh” is connecting to your server. After that, it’s the same as working on your own terminal. It’s just connected to a different computer.

    I just want my server to watch my repo and if there are changes, upload those changes to the server. I’m not sure what all that entails, whether I have install stuff just to give it a basic command to do this.

    That’s the “hooks” thing. That’s what this tutorial explained.

    #183125
    chrisburton
    Participant

    That’s the “hooks” thing. That’s what this tutorial explained.

    OK. A bit nervous to do this (don’t want to mess anything up — like last time). I’ll give that a shot.

    #183126
    __
    Participant

    what if I want the repo to be added into my public_html directory?

    cd to your public_html and do it there. The directory must be empty, however, or git will warn you.

    On the server, I usually do one repo that is not live (a “staging” repo, as it were, for last-minute-pre-launch testing, and as a local backup), and then clone/pull the “live” site from that. You don’t have to do it that way, but I personally like it.

    #183127
    nixnerd
    Participant

    @chrisburton BTW, you make a directory like this

    mkdir nameofdirectory

    #183129
    chrisburton
    Participant

    Git repositories have a folder called ‘hooks’. This folder contains some sample files for possible actions that you can hook and perform custom actions set by you.

    Git documentation define three possible server hooks: ‘pre-receive’, ‘post-receive’ and ‘update’. ‘Pre-receive’ is executed as soon as the server receives a ‘push’, ‘update’ is similar but it executes once for each branch, and ‘post-receive’ is executed when a ‘push’ is completely finished and it’s the one we are interested in.

    I believe post-receive is what I’m looking for?

    #183131
    __
    Participant

    yesyes

    #183148
    chrisburton
    Participant

    Just an FYI, I’m reading the tutorial before I actually do it. For reasons like this:

    If you scroll down to the Local Machine part, the author suggests to create a local repo….

    ** Local Machine
    Let’s create our local repository. You should change the path and name to whichever you choose. If you are on a VPS, just type:

    exit
    

    And create your repo:

    cd /my/workspace
    mkdir project && cd project
    git init
    

    But the thing is, I already have one setup when I started using Tower.

    If you scroll further down from that it talks about committing changes with messages…

    Let’s assume that we have some great work ready in this folder. We should do the usual steps of adding the files and commit with a message:

    git add .
    git commit -m "My project is ready"
    

    Just to remember, the dot after ‘git add’ means you are adding all files to stage. After ‘git commit’ we have ‘-m’ which means we will type a message. To complete, we just ‘push’ everything to the server. We use the ‘live’ alias that we used when setting the remote.

    git push live master
    Counting objects: 7, done.Delta compression using up to 4 threads.Compressing objects: 100% (7/7), done.Writing objects: 100% (7/7), 10.56 KiB, done.Total 7 (delta 0), reused 0 (delta 0)To ssh://[email protected]/var/repo/site.git* [new branch]      master -> master
    

    Here we tell Git to push to the ‘live’ remote on the ‘master’ branch. To understand more about branches and how to use it you can read this tutorial.

    Grr! Exactly what I wanted to stay away from on the command line. That’s what I have the Tower app for.

    #183150
    nixnerd
    Participant

    Exactly what I wanted to stay away from on the command line.

    Can I ask why exactly? I have found the command line to be the most powerful tool in all of computer science. It may seem awkward and first but I promise you… you will grow to prefer it. I literally don’t even use my traditional file manager anymore. VERY RARELY will I ever open it. Usually to look at photos. That’s about it.

    #183152
    chrisburton
    Participant

    Can I ask why exactly? I have found the command line to be the most powerful tool in all of computer science. It may seem awkward and first but I promise you… you will grow to prefer it. I literally don’t even use my traditional file manager anymore. VERY RARELY will I ever open it. Usually to look at photos. That’s about it.

    I come from a design background so I’m used to a GUI of some sort. It’s just a bit too much to dive into OOP, git and the command line. Perhaps down the road but not right now. And in the case that I do screw something up, that’s just more time wasted that I don’t really have.

    I think I’ll feel more comfortable using dploy.io at this stage.

    #183154
    nixnerd
    Participant

    I think I’ll feel more comfortable using dploy.io at this stage.

    Fair enough. I can respect it. I wasn’t able to “visualize” what I was doing in the command line for a long time… so I definitely get it.

    Besides, it’s actually good to have a wide variety of workflows on these forums so we can better assist newcomers… the ones that actually stay.

    #183158
    chrisburton
    Participant

    @Joe_Temp

    I’m just glad Chris added a chat to the sidebar so we can now avoid off-topic comments that may confuse people (e.g. php web app discussion).

    #183159
    nixnerd
    Participant

    I’m just glad Chris added a chat to the sidebar

    WHAT?!?! I saw the ad and had no clue it was something for us. Sweet!

    php web app discussion

    Yeah, that thread is epic.

    #183162
    chrisburton
    Participant

    Ok. It’s all working now with dploy.io automatically. This is not to say that I don’t appreciate all the help and suggestions, I’m just not at the point to want to learn an additional subject. I hope you guys can understand this (I know you do, Joe).

Viewing 15 posts - 76 through 90 (of 93 total)
  • The forum ‘Other’ is closed to new topics and replies.