LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trying to get my own server running for website (https://www.linuxquestions.org/questions/linux-newbie-8/trying-to-get-my-own-server-running-for-website-4175455404/)

dadadoodads 03-24-2013 05:17 PM

Trying to get my own server running for website
 
Okay, I remember CHMODing files via FTP clients many years ago, the last time I had my own website, but hosted on someone elses server. I remember installing PHP scripts and junk like that. But the running the server is new to me and a little more complicated than I expected.

I got Ubuntu Server 32 bit on an old machine, and it's installed and seems to work fine.

My first goal was to get it to where I could connect with my user name and password via Smart FTP and disable anonymous FTP. But I came to find... I couldn't even figure out how to edit files... look at them... all in the same place that didn't first involve learning lots of commands to edit files at the command line.... edit files I'm not even really familiar with...

So then I looked up getting a GUI and found out from some forums that wasn't the most secure idea. So...

Now I'm at a point where I'm overwhelmed by... basically I need to learn how to do all of the computer's most basic functions before I can dream to actually do what I would do if I didn't suffer the handicap of not knowing how to do it.

So my first question is... should I be learning Unix with a GUI on a desktop and not a server, so that I can actually do things right on the server once I know a lot more?

Or otherwise... without running a GUI (for security reasons), what is the best way to view and edit files.

I looked around in vi

I apt-getted vsftpd but can't figure out how to edit the .conf
It seems I would "a" append, or insert lines of code, but what if these lines already exist? What's a simple way to just... look at the file. I get that MS_Word takes forever to load, but notepad really doesn't, and not being able to view the file I'm editing is not really... well, if it is some kind of a perk, it's beyond me. But I'm sure there is a system to doing this I just don't understand yet.

Well, then I couldn't figure out how to get out of the help file on vi and q wasn't doing anything.

Advice basically is what I'm asking for.

eSelix 03-24-2013 07:15 PM

If you are unfamiliar with "vi" just install another editor, I recommend you to install "mc" package. It is text mode file manager with "normal" editor ("mc-edit" - F4 key). There is also pico and nano editors. About your question I don't think that learning GUI give you advantage with console commands. Just install more intuitive (for begginers) file manager and editor and you can do what you want. And one more helpfull command is "man" a manual for most installed commands.

chrism01 03-24-2013 07:20 PM

1. Linux tutorial http://rute.2038bug.com/index.html.gz

2. vim home page http://www.vim.org/ - Docs http://www.vim.org/docs.php
vim is 'vi improved' and in fact on Linux the vi cmd is normally aliased to vim, so you actually get vim.
You can get the real vi in eg /bin/vi, but I wouldn't bother; vim is better.

vi/vim is a modal editor ie you're either in cmd mode or text edit mode. When in doubt, hit Esc key once (or twice to be sure..) and that'll put you back in cmd mode (default when you open a file).

Use 'i' to start inserting text at current position. (Like *nix cmds, its case sensitive)

In cmd mode, cursors keys should work, in some cases also Page-Up/down will work as well.
vi/vim is a very powerful and quick editor and very lightweight. Just takes a little practice, but you only really need to know a few cmds, especially if you are using a GUI eg from your desktop, as you can do copy/paste from there instead of inside vim.

vi has been the default built-in editor on almost all forms of *nix both commercial (Solaris, HP-UX, AIX), as wel as *BSD ssytems and Linux for many years.
Definitely worth getting to know the basics; a real server is unlikely to have a GUI ...


HTH & Welcome to LQ :)

273 03-24-2013 07:24 PM

I like nano for text editing and i think it's installed by default nowadays. It's nowhere near as powerful as the likes of vi but it is very easy to use.
If you don't need FTP then I would suggest setting up SSH instead and using SFTP for any transfers as it is more secure waht with the password not being transmitted in cleartext and the possibility of using public key cryptography instead of passwords. SSH is also the best way I know of to work on a remote server.

chrism01 03-24-2013 07:29 PM

Yeah, second the advice re ssh/scp instead of FTP. You can even use sftp (ftp code within ssh tool) that some GUI ftp clients like filezilla can understand.


All times are GMT -5. The time now is 04:48 PM.