posted
So I have an Ubuntu box and aside from current difficulties ssh into it I hope to host a website/domain on it, one example is hosting my own little Wiki on it for the collaborative Alternate History timeline me and King of Men are padding through in our Epic RP RTS campaign "There Will Be War" that will take us roughly 1-2 years to complete.
posted
What are you asking? Just if it's possible to host a domain name from your home internet connection? Yes. It is, I do it. It only costs about $15 a year too if you buy your domain name from the right place.
I wouldn't recommend using Ubuntu though. Ubuntu's an awesome desktop or laptop distro. But not the best server distro. Or at least it wasn't last I checked. Straight up Debian is generally better for web servers.
How good are you with command line linux? Are you willing to learn it? If you're not willing to learn command line, probably shouldn't start your own server. Go find a hosting site that has a nice GUI set up for you. If you're hosting a web server that uses PHP, MySQL (as wikis do), Apache, SSH, etc... you're gonna have to get pretty comfortable with the command line and with editing configuration files. If you're willing to learn it then setting up, configuring and maintaining your own web server is a great way to get comfortable with the command line. But if you're not ready to struggle through learning to command line, do it another way.
Editted to remove unnecessary snark. Man I need to fix my snark filter. Sorry Blayne, my initial post was way more harsh than need be.
Posts: 3295 | Registered: Jun 2004
| IP: Logged |
posted
Touching ssh: I haven't tried recently, but two weeks ago I was able to ssh in just fine. It's running emacs that gives me trouble.
Posts: 10645 | Registered: Jul 2004
| IP: Logged |
Blayne Bradley
unregistered
posted
nowadays it says connection refused which puzzles me.
Ild say i spent about a year learning Unix Networking and Bash scripting from Putty, I can make bash scripts with sed, grep, and gawk.
IP: Logged |
posted
Nice, then you're all set for command line. It'll take you a while to learn the config files, but you oughta be able to pick em up.
As for ssh, have you checked your firewall? Are your server, your pinhole and your client all going for the same port? And is it the right ssh port (22 I think).
Posts: 3295 | Registered: Jun 2004
| IP: Logged |
Blayne Bradley
unregistered
posted
yup dlink says 22 is open but doing 'canyouseeme.org' it doesnt see it opened.
IP: Logged |
posted
Do you have a software firewall on your server machine? You'll have to open a hole in that as well.
Posts: 3295 | Registered: Jun 2004
| IP: Logged |
Blayne Bradley
unregistered
posted
no software firewall i know of.
IP: Logged |
posted
Interesting. And you're running Ubuntu? Okay I don't think you actually have the sshd (the ssh server) installed. You may have had it installed at one point, but it doesn't seem to be there any more. So here's one way to fix it. Go to Synaptic package manager and do a search for OpenSSH Server. Install it and reboot. SSH should then be working. You should see what I posted above when you ps aux | grep ssh. The sshd is the actual SSH server.
Actually another thing you could do is go to /etc/init.d. You ought to see an "ssh" there. If you do, you already have the ssh server installed, it's just not running for some reason. Try restarting. If it doesn't automatically start, just try reinstalling. There's probably a way to get it to autostart again if it's not, but I can't think of it off the top of my head. Reinstalling should do the trick and it's easier (plus it updates it for you). If it restarts on reboot you're all set. Alternately if it's there and not restarting on reboot you could just:
code:
sudo /etc/init.d/ssh start
To start it manually. And just resign yourself to manually restarting it every time you reboot.
Posts: 3295 | Registered: Jun 2004
| IP: Logged |
posted
Is the ISP blocking 22 for some reason?
Posts: 2437 | Registered: Apr 2005
| IP: Logged |
Blayne Bradley
unregistered
posted
I can't tell, by ISP you mean the company that sells us the internet? I'll call them up.
IP: Logged |
Blayne Bradley
unregistered
posted
According to videotron they do not block anything, theyre job is to provide internet service nothing more nothing less they do not moderate its usage beyond charging us if we go 100 gb above our limit.
IP: Logged |
posted
Have you checked ps aux | grep ssh since you installed the ssh package? Have you restarted the system since you install the ssh package?
Posts: 3295 | Registered: Jun 2004
| IP: Logged |
Blayne Bradley
unregistered
posted
ive restarted, ill redo the cmd after calling dlink.
IP: Logged |
quote: ashkore@ashkore-ubuntu:~$ sudo apt-get install openssh-server [sudo] password for ashkore: Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: openssh-client Suggested packages: libpam-ssh keychain rssh molly-guard The following packages will be upgraded: openssh-client openssh-server 2 upgraded, 0 newly installed, 0 to remove and 210 not upgraded. Need to get 904kB of archives. After unpacking, 0B of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://ca.archive.ubuntu.com gutsy-updates/main openssh-server 1:4.6p1-5ubuntu0.2 [248kB] Get:2 http://ca.archive.ubuntu.com gutsy-updates/main openssh-client 1:4.6p1-5ubuntu0.2 [657kB] Fetched 904kB in 1s (480kB/s) Preconfiguring packages ... (Reading database ... dpkg: ../../src/filesdb.c:564: findnamenode: Assertion `(*pointerp)->name[0] == '/'' failed. E: Sub-process /usr/bin/dpkg exited unexpectedly
posted
KoM: there aren't enough home *nix users who feel the need to SSH into their home computers to be noticeable in subscription churn for most ISPs, much less influence ISP policy.
Does that happen if you try again?
Also, have you been keeping your system up to date otherwise?
Posts: 15770 | Registered: Dec 2001
| IP: Logged |
quote:Originally posted by fugu13: KoM: there aren't enough home *nix users who feel the need to SSH into their home computers to be noticeable in subscription churn for most ISPs, much less influence ISP policy.
Yeah, although it would likely be different if they tried to block outgoing ssh. At any rate, that was just the first thing that came to mind when Blayne said that he was pretty sure that everything was open at his end, but applications outside of the network didn't see anything.
Posts: 2437 | Registered: Apr 2005
| IP: Logged |
Blayne Bradley
unregistered
posted
or inside, i try to log on using a lan ip and I get the unreachable error.
IP: Logged |
Blayne Bradley
unregistered
posted
WHAT! Ido not understand.
Okay so I reran the program as instructed it successfully installedopen ssh and restarted it.
Before that port 22 was closed.
Now it is open now everything works.
Iam confuzzled. How did the open-ssh deamon effect port 22?
IP: Logged |
posted
Blayne, there was nothing listening on port 22 until you installed SSH. If there's nothing listening on a port, you can't connect to that port.
The first time you tried installing the server there was some error, which looks to be intermittent based on a search, which is why I advised you to try installing again.
As for the ls, read the message. It told you the problem. It doesn't understand the LS_COLORS environment variable. I bet the variable starts with 'do' right now.
Tell us what you see when you type echo $LS_COLORS . Then see if you can figure out how to fix it by doing a google search.
Posts: 15770 | Registered: Dec 2001
| IP: Logged |
posted
Blayne, what did you do to that poor machine? Bigger problems? You maybe wanna mention them rather than mentioning each little symptom one at a time?
Also, these errors you're getting tell you something. Work on your googlefu. Often if you enter the errors you get into google someone else has had the problem and posted how to fix it.
And yeah, the port wasn't closed. But you can't ssh onto your machine unless you have an ssh server running. That's a good thing, cause other wise any old hacker could get into your machine through any old port and play merry hell with it. It's the same that if you don't have Apache running, it doesn't matter if you have html files in your /var/www directory. You won't be able to see them if you go to your machine from a web browser.
Posts: 3295 | Registered: Jun 2004
| IP: Logged |
Blayne Bradley
unregistered
posted
the bigger problem was getting port 22 working as I like to do alot of work from school.
I googled up ls: unknown prefix do ls: unparsable value for LS_COLORS environment variable
and I do not get anything useful, on one hand it is either a rootkit on one extreme or something else on the other.
IP: Logged |
posted
You know what an environment variable is, right? Try reading the error. It tells you that it can't parse the LS_COLORS environment variable.
So, the first thing you should do is take a look at that environment variable, which you'd do by typing what I told you to. When you notice 'do' in it, you'll understand that the first part of the error is just the specific problem matching the more general one.
Since you know the LS_COLORS environment variable has a bad value, the next thing to do is figure out what a good value is. Google for LS_COLORS. You can find numerous links in the first page that have various possibilities and suggestions. Then you can try one or several by setting the LS_COLORS environment variable and trying ls again.
However, there's still one part to the 'mystery'. How did the LS_COLORS variable get set to the wrong value in the first place, and how to make sure it gets set to a useful value in the future? I'll give you a hint of sorts about that, and I know you're smart enough to follow up: where are environment variables commonly set for bash?
You are not a simple automaton. Trouble shooting involves noticing error structure that you can understand. I know you've been taught what an environment variable is, and the basics of working with them.
Btw, you weren't 'getting port 22 working', you were getting sshd working. It just happens to be on port 22. That's just a convention.
Posts: 15770 | Registered: Dec 2001
| IP: Logged |
Blayne Bradley
unregistered
posted
so far I did echo $LS_COLORS and it spat out a whole lot of stuff however there was no "do" in it.
I tried doing 'dircolors' and running what it outputted but that didn't work either.
After some quick googleing I found:
alias ls='ls --color' LS_COLORS='di=34:fi=0:ln=31:pi=5:so=5:bd=5:cd=5:or=31:mi=0:ex=35:*.rpm=90' export LS_COLORS
gets me what I want but if I log off and log back on it doesnt save it the settings.
IP: Logged |
posted
That's one of the most common ones. Perhaps take a look in there to see if LS_COLORS is already being set, and see what happens if you put the commands you ran in at the end.
Posts: 15770 | Registered: Dec 2001
| IP: Logged |
Blayne Bradley
unregistered
posted
.bash_profile doesn't seem to exist...
i try putting it into .bashrc but that didnt seem to work.
IP: Logged |
Blayne Bradley
unregistered
posted
okay I created my own bash profile file added the commands and now it works I can now officialy start work on creating a webpage.
IP: Logged |
Blayne Bradley
unregistered
posted
Alright well my Linux server works just fine though there seems to be a billion and a half apps that are missing like gcc.
Okay so what do I need to make a web server/domain thingy?
I think I need to install PHP and Apache but I am hitting a wall installing Apache.
What are all the various packages I need to properly install PHP and Apache?
IP: Logged |
posted
How are you trying to install things? Use package management. Stop even trying to use the command line, since that seems to cause you trouble. The GUI in Ubuntu is good. Search for apache and install the apache2 package. You will also want libapache2-mod-php5.
Posts: 15770 | Registered: Dec 2001
| IP: Logged |
posted
And if you're stuck with the command line use aptitude instead of apt-get. It's a command line equivalent to the nice gui package manager. Let's you search packages and such.
Posts: 3295 | Registered: Jun 2004
| IP: Logged |
posted
Well, I can log in now, but emacs still segfaults.
Posts: 10645 | Registered: Jul 2004
| IP: Logged |
Blayne Bradley
unregistered
posted
Well I do ./configure it blew up, I had to apt-get about 80 megs of packages before it would complete but when i try make its explodes.
IP: Logged |
posted
What are you trying to install that isn't in the repositories? And yeah you'll need to install a full build system since it's not part of the base install.
Posts: 1621 | Registered: Oct 2001
| IP: Logged |
Blayne Bradley
unregistered
posted
code:
Fetched 193B in 23s (8B/s) Reading package lists... Error! E: Problem parsing dependency Depends E: Error occurred while processing slapd (NewVersion1) E: Problem with MergeList /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_gutsy-security_main_binary-i386_Packages E: The package lists or status file could not be parsed or opened.
when I try to do apt-get update I get this.
IP: Logged |
posted
I don't know why you'd be installing slapd at all. That's an ldap server. If you've borked with installing software on your own too much instead of using proper package management, it will probably be easier to recover by reinstalling than by unraveling what you've done.
What happens if you do apt-get install apache2?
Posts: 15770 | Registered: Dec 2001
| IP: Logged |
Blayne Bradley
unregistered
posted
Reading package lists... Error! E: Problem parsing dependency Depends E: Error occurred while processing slapd (NewVersion1) E: Problem with MergeList /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_gutsy-security_main_binary-i386_Packages E: The package lists or status file could not be parsed or opened.
I get this. which was why someone on the ubuntu mirc suggested apt-get update.
IP: Logged |