LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Configure a server through shell (https://www.linuxquestions.org/questions/linux-newbie-8/configure-a-server-through-shell-761027/)

odendaal1 10-10-2009 02:53 PM

Configure a server through shell
 
Good day,

I have just rented a dedicated server from my hosting provider which needs to be set up.

I was provided with an ip address where I can open a connection to the server through Putty. I can connect as root but have no idea what to do.

Could someone please point me in the right direction, I need to have this set-up as a web server with php and MySQL. I also need to be able to configure the php.ini for the specific application as well as have port 8888 open on the firewall to communicate with an external service provider.

I am a complete newbie and any help would be greatly appreciated. All I know is that it is a Fedore 9 installation. I have done yum install httpd and yum install php.

Thanks in advance.

Elv13 10-10-2009 05:23 PM

Installing software is defferent from distribution to distribution, which one do you use? RedHat, SUSE? DEBIAN? And what version?

Installing on debian look like:
apt-get install php5 mysql apache

on RedHat:
yum install php5 mysql apache

On SUSE:
zipper install php5 mysql apache

MS3FGX 10-10-2009 05:23 PM

Do you have any Linux experience to start with? You have a lot of learning ahead of you if you don't know the command line and are trying to setup a server for the first time.

odendaal1 10-11-2009 01:35 AM

Sorry, the server is running Fedora 9. I unfortunately have absolutely zero Linux experience and I realise the learning curve will be steep but there is no other alternative. At least this forces me to gain some Linux skills that I have wanted to gain for some time now.

odendaal1 10-11-2009 03:11 AM

Ok, it seems as though php MySQL and Apache have all been set up on the box. If I understand things correctly I need to set up a virtual host which will point to a folder on the server, then I need to configure the DNS to point to the virtual host, create a FTP account to the data folder and upload the files.

So, i will create /var/www/pleasehelp folder and upload the files in there. I will then create a virtual host called www.pleasehelpmenow.co.za which points to that folder.

I will also need to be able to send and recieve mail on this domain.

jmc1987 10-11-2009 03:55 AM

You can install php, mysql, apache, using yum. You should have rented a vps that you can rebuild when you break it through a control panel since you have no experience. That would save you a few $. Any ways I would suggest you to use cpanel (http://www.cpanel.com) is a paid solution but its great for web hosting. You download their install script and simplay run
Code:

# sh latest
After it finishes reboot and go to https://yourip:2087 and it will take you through setting up your server

It will install mysql, php, perl, apache, and other good stuff. It would be best for a first user in my opinion.

Alternative
http://www.howtoforge.com/perfect-se...10-ispconfig-3 for 32bit on fedora 10
http://www.howtoforge.com/perfect-se...64-ispconfig-2 for 64bit on fedora 11

This is a tutorial that may help you. Never actually used these ones in particular.

Good luck

unSpawn 10-11-2009 04:43 AM

WTF?
 
Come FSCKIN ON Elv13, MS3FGX and jmc1987!

How can you waste time posting instructions when the essentials aren't dealt with properly?:
Quote:

Originally Posted by odendaal1 (Post 3714804)
I can open a connection to the server through Putty. I can connect as root

Quote:

Originally Posted by odendaal1 (Post 3714804)
a complete newbie

Quote:

Originally Posted by odendaal1 (Post 3714804)
Fedore 9

Please point the OP to GNU/Linux basics first. TIA

jmc1987 10-11-2009 04:49 AM

Quote:

Originally Posted by unSpawn (Post 3715228)
Come FSCKIN ON Elv13, MS3FGX and jmc1987!

How can you waste time posting instructions when the essentials aren't dealt with properly?:




Please point the OP to GNU/Linux basics first. TIA


Very true he should atleast get a book on linux. I started out with The complete Reference Linux sixth Edition.

Now if you was referring to me "how can you waste time posting instructions" Because I understand that alot of people think linux is going to be easy starting out which it can be if you start at the right level. I just help others as other help me.

unSpawn 10-11-2009 05:39 AM

Quote:

Originally Posted by jmc1987 (Post 3715236)
Very true he should atleast get a book on linux. I started out with The complete Reference Linux sixth Edition.

Good! That could address the "complete newbie" part. (Often people also point to Rute or the Fedora Wiki.) Still missing two key topics though.


Quote:

Originally Posted by jmc1987 (Post 3715236)
if you start at the right level.

Yes, it will be. But with all due respect "the right level" isn't installing the "AMP" part in LAMP. True, that may be the most straightforward and direct answer to the OP's questions but more experienced LQ members please look beyond that for the bigger picture. Newbies are prone to making all the wrong decisions because they often will focus on what they want instead of what they need.

* Everyone knows Fedora is on a very short release cycle (http://fedoraproject.org/wiki/LifeCycle/EOL). That is important to know for the OP because running a EOL'ed (meaning: unmaintained, unsupported, vulnerable) release means more (unnecessary) risks and more maintenance. Knowing this the OP has the choice to opt for another release or distribution (or provider). Not knowing it means having yet another easy target on the 'net which affects all of us.

** More importantly the OP indicates logging in as root over SSH. If you have any practical experience at all you will know configuring/hardening the server is the first issue to address, not running services. As part of that the OP should:
- not mess with configuration without understanding the implications,
- not disable SELinux,
- add an unprivileged user account, set a strong password (and change it regularly), and properly chage the account,
- review and configure other accounts in use,
- install Sudo and configure it to allow the unprivileged user to perform tasks requiring root privileges,
- configure the unprivileged user to use SSH with pubkey auth instead of passwords,
- configure /etc/hosts.deny and /etc/hosts.allow to only accept SSH connections from his management IP or range,
- configure the firewall do the same or install fail2ban or equivalent (see http://www.linuxquestions.org/questi...tempts-340366/),
- configure /etc/ssh/sshd_config to deny root logins (and see http://www.linuxquestions.org/questi...51#post3710051 and down),
- install and configure a filesystem integrity checker,
- install Logwatch and actually read emailed reports to keep tabs on things.
(Also see: http://rkhunter.wiki.sourceforge.net/SECREF)


In short GNU/Linux is all about performance, versatility and providing services in a continuous, stable and secure way. A GNU/Linux machine is coveted by many because of its power. Especially with newbies we should help OP's ensure the power remains theirs. And that requires looking at the bigger picture. I hope by now you understand what I mean.


All times are GMT -5. The time now is 09:11 PM.