[Legion Leak] How To Set Up a Web Server on CentOS 07-28-2013, 06:47 PM
#1
This post is leaked from the premium section of "Legion" on the competing hack forum. There will be 5 new leaks a day. There may be some format problems due to UTF8 character encoding.
(07-22-2013, 09:46 AM)~Tom~ Wrote:
I will show you how to set up a Web Server on CentOS
There will be 3 parts
Installing MySQL
Installing Apache
Installing PHP
Installing MySQL.
1. First you'll want to login as root and type
Code:yum install mysql mysql-server
2. You'll want to configure Apache so that it's added to start up and will start up on boot.
Code:chkconfig --levels 235 httpd on
3. Now you'll want to start MySQL.
Code:/etc/init.d/mysqld start
4. Now to make sure you're MySQL is a little secure you'll want to set a password.
Code:mysql_secure_installation
Now you will get a load of text on screen. First of it will ask you :
Spoiler:
Enter current password for root (enter for none): Just enter your current root password
After you get the password correct you should be greeted with something like this
1.Set root password? [Y/n]
2.New password:
3.Re-enter new password:
1.You'll want to start by pressing "y" and enter
2.Now for new password you'll want to pick a secure password no one will know.
3.Re-enter the password the same as the first time and you should be greeted with:
Password updated successfully!
Reloading privilege tables..
... Success!
Next on screen will be
Remove anonymous users? [Y/n]
You'll want to enter "Y" and press enter.
This will remove the default user which is added when setting up MySQL. It's mainly used for testing and such.
Then you will be prompted with:
Remove test database and access to it? [Y/n]
You'll want to press "Y" and then the enter key.
This will remove the database which once again is set up by default for testing purposes.
Now you'll want to make sure that all changes just made take effect.
Reload privilege tables now? [Y/n]
You'll want to press "Y" and then the enter key.
MySQL is now installed and a little more secure.
Installing Apache.
You'll only need one command to install Apache as it's actually a CentOS package.
Now you'll want to make sure Apache starts on boot.Code:Yum install httpd
Now you'll want to start up ApacheCode:chkconfig --levels 235 httpd on
Code:/etc/init.d/httpd start
which if done correctly will bring up a blue screen similar to this:
Something worth noting
Apache's default root directory is /var/www/html
The configuration file is /etc/httpd/conf/httpd.conf.
Additional configuration files directory: /etc/httpd/conf.d/
Installing PHP.
PHP is probably the easiest thing you'll install.
It's a CentOS package therefore it can be simply installed by:
Code:yum install php
Now restart Apache
Code:/etc/init.d/httpd restart
To test it you can install nano by typing
Spoiler:
Code:yum install nano
Once that is done enter:
Now copy and paste this code:Code:nano /var/www/html/info.php
Now go to serveriphere/info.php eg ( 127.0.0.1/info.php)Code:<?php echo"It works"; phpinfo(); ?>
If successful you'll be greeted with something like this:
Note mines will be different due to the fact I did that on my LocalHost.
PHP is now installed.
I didn't have a CentOS server to carry this out on so I can't provide screen shots if someone wants to let me use one then I'd be happy to update it. I'm also going to update it more when I get back.















![[Image: ieq6viOQ6szdE.gif]](http://i.minus.com/ieq6viOQ6szdE.gif)
![[Image: 3Ic3C.png]](http://puu.sh/3Ic3C.png)
![[Image: 3ILHv.jpg]](http://puu.sh/3ILHv.jpg)
![[Image: 3ILUH.png]](http://puu.sh/3ILUH.png)
![[Image: F4Z9Dqw.png]](https://i.imgur.com/F4Z9Dqw.png)
![[+]](https://sinister.li/images/modern/collapse_collapsed.png)


