Now I will try for a bit of explaining how to set up a web server using webmin on CentOS, for those of you who want to save costs, webmin is a solution for you, but if you have more funds, use the cpanel is a solution that is easier to set up a web server.
The steps to install webmin on CentOS is as follows:
1. Install Webmin (if you have money rental CPanel / WHM more comfortable and easy to use as the beginning). Webmin is used to manage servers easily without having to always type the command in a shell. Check the latest Webmin RPM at webmin official website.
Login to shell use Putty or other programs that support and secure.
1 2 3 4 5 6 7 8 9 10 11 |
yum -y install perl-Net-SSLeay cd /tmp wget http://prdownloads.sourceforge.net/webadmin/webmin-1.530-1.noarch.rpm rpm – i webmin-1.530-1.noarch.rpm /etc/init.d/webmin start /usr/libexec/webmin/changepass.pl /etc/webmin admin <strong>new_password</strong> |
2. Open a browser go to: http://yourIP:10000 and then Login with username admin and password in accordance with new_password.
3. Install Apache
Click the Server-> Apache Webserver. There is a section labeled “Click here to have it downloaded and installed using YUM.”
Click there, going to install the Apache web server quickly and automatically.
Click the Start button after confirming a successful installation.
4. Install MySQL
Click the Server-> MySQL Database Server. There is a section labeled “Click here to have it downloaded and installed using YUM.”
Click there and going to install the MySQL Server on the web server quickly and automatically.
Click the Start button after confirming a successful installation.
5. Install PHP5
Back to Putty and enter the following command.
1 |
yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml |
1 |
/etc/init.d/httpd restart |
6. PHP Test
Create a PHP file and test whether all that we’ve successfully installed and running well.
1 |
vi /var/www/html/index.php |
Log in vi text editor. To start writing the letter i type the key once and the bottom the words “INSERT”
Type
1 |
Press ESC
:w ENTER
:q ENTER
7. Return to the browser and go to http://yourIP/
If you see the display info from PHP then all the above installation has been completed successfully.
Take a break or go directly to the installation of Bind DNS and Virtual Host settings
8. Install Bind DNS
Back to the Webmin pages. Go to the menu server-> Bind DNS. There are papers “Click here to have it downloaded and installed using YUM.”
Click there and to install the Bind will quickly and automatically. Once completed there is a choice answers, select the answer number 2 or another number, which means “Used to control the Internet and the Download Zone.” Then press the Start button.
9. Setting domain name
Assumed to have registered a domain name: asep.us
Register ns1.asep.us and ns2.asep.us given to a dedicated IP. Register at the domain registrar where you have registered domain. After that point asep.us name servers to ns1.asep.us and ns2.asep.us
10. Back to page Webmin
Click the Server-> Bind DNS
Click the “Edit Config Files” and add the following to it and press SAVE
1 2 3 4 |
zone “asep.us” { type master; file “asep.us.hosts”; }; |
11. Back to Shell. Create a new file as an example the number 6 with name asep.us.host in /etc/
1 |
vi /etc/asep.us.hosts |
File content
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
$TTL 86400 @ IN SOA ns1.asep.us. server.asep.us. ( 2008081301 ; serial, todays date + todays serial # 28800 ; refresh, seconds 7200 ; retry, seconds 604800 ; expire, seconds 86400 ) ; minimum, seconds; asep.us. NS ns1.asep.us. asep.us. NS ns2.asep.us. ns1 A 123.123.123.123 ns2 A 123.123.123.123 asep.us. A 123.123.123.123 www A 123.123.123.123 ftp A 123.123.123.123 |
Replace server.asep.us accordance with the name server that gives a chance and 123.123.123.123 provided with a dedicated IP. Save and restart Bind
1 |
/etc/init.d/named restart |
12. Install Virtual Host.
Back to the Webmin menu and click Server-Apache WebServer – Global Configuratin.
Click on Edit Config Files. Add at the bottom section of this field
1 2 3 4 5 6 7 8 9 10 11 |
DocumentRoot /var/www/html/asepus ServerAdmin admin@asep.us ServerName www.asep.id ServerAlias asep.us DirectoryIndex index.html index.htm <a href="http://www.info-vijesti.com/">index</a>.shtml index.php Options all AllowOverride none LogLevel debug HostNameLookups off |
Save and restart Apache Server.
13. Creating Index file to asep.us
Go Putty. Create a new file like the example at number 6 with name of the index.php in the folder /var/www/html/asepus
1 2 3 |
cd /var/www/html mkdir asepus vi /var/www/html/asepus/index.php |
the content of file:
1 |
Save the file you just created.
14. Test all results.
Repeat step 7. If the browser’s appearance changed to the words “Welcome to ASEP.US” then everything above is 99% successful.
Enter in your browser https://www.asep.id/ or http://asep.us should display in the browser will still show the words “Welcome to ASEP.US”. If the exit “Server Not Found” do not rush to worried. The possibility of a new domain name gives a chance at number 9 and Bind DNS is still not resolved. Just wait for about 2-6 hours and try again. If after 24 hours was also “Server not Found”, then it’s time to worry about finding fault where.
Enjoy your Web Server.
How to Set Up a Web Server using Webmin on CentOS is still ignoring the various security holes that occur because the setting is still the standard PHP and MySQL. For security issue, Google has a lot of stories and articles.
Thanks you saved me I was stuck on how to save the phpinfo file, I didn’t know you had to click :w :q