This is How Easy the Configuration Service on VPS Linux Centos 6, 7

0
811

This is How Easy the Configuration Service on YOUR VPS Linux Centos 5, 6, 7. If you’ve got a VPS with Linux OS Centos. What else should you do? So that the website can be accessed, you need to install dns server, web server and mysql server first. The installation process is done via SSH. If the computer you are using Linux, please SSH through your terminal application with command: ssh root@ipserver.
config server vps centos linuxIf you Windows users please download first the application Putty you can search via Google. After signing in to the SSH server, do the first update on your server OS repo install process runs smoothly. Please type the command: apt-get update or yum update. Wait until the process is complete.

1. Setting the DNS Server
Do the installation process automatically by typing the command: yum install bind bind-chroot bind-libs bind-utils caching-nameserver
• setting named. conf
Type the command: nano/var/named/chroot/etc/named. conf
Then add/type setting below (replace domainku.com with your domain name):

zone “domain.com” IN {
type master;
file “domainku.db”;
};

If it is, Ctrl-X and then save
• zone settings
Type the command: nano/var/named/chroot/var/named/domain.db
Then add/type setting as below (replace the default server IP server IP 192.168.10.1 with you)

$ttl 38400
domain.com. IN SOA ns.domain.com. admin.domain.com. (
2007020400 ; Serial
10800 ; Refresh after 3 hours
3600 ; Retry after 1 hour
604800 ; Expire after 1 week
86400 ) ; Minimum TTL of 1 day
domain.com. IN NS ns.domain.com.
domain.com. IN MX 1 mx.domain.com.
domain.com. IN MX 5 mx2.domain.com.
www.domain.com. IN A 192.168.10.1
ns.domain.com. IN A 192.168.10.1
mrtg.domain.com. IN A 192.168.10.1
mx.domain.com. IN A 192.168.10.1
mx2.domain.com. IN A 192.168.10.1
mail.domain.com. IN CNAME mx.domain.com.

If it is, Ctrl-X and then save

• Setting resolv.conf
Type the command: nano/etc/resolv.conf
Change the nameservers to be: nameserver 127.0.0.1
Then Ctrl-X and then save
And Restart the service by running the command: service network restart
• Start DNS server
Run the command: service named start
In order for the DNS run when the startup process, run the command: chkconfig named also on

2. Setting the Webserver
For a webserver, there is some service that can be used. Here we put Apache. Do an automatic installation process by running the command: yum install-y php php-devel php-gd php-mbstring php-mcrypt php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl libxml2 libxml2-devel ImageMagick
Then start httpd service with the command:/etc/init.d/httpd start
In order for apache to run when the startup process, run the command: chkconfig httpd on many different levels – 235
check if the httpd has been running by accessing your server IP. If it succeeds, will perform the default page.

3. Setting the MySQL server
Do an automatic installation process by running the command: yum install-y mysql-the servermysql mysql-server mysql-devel
Then start the MySQL command:/etc/init.d/mysqld start
In order to make MySQL run when, startup process run: chkconfig mysqld on many different levels – 235
Setting your MySQL password: mysqladmin-u root password abcd
• Install PHP on your server
Type the command: yum install-y php php-devel php-gd php-mbstring php-mcrypt php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl libxml2 libxml2-devel ImageMagick
• Install phpMyAdmin to make it easier to manipulate the database
Please update repo according your PHP version, to download please type the command: wget http://packages.sw.be/rpmforge-release/URrpmforge-release-0.5.1-1.el5.rf.i386.rpm
Or: rpm-Uvh URrpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
Hanging with your Centos version 32 bit or 64 bit. type the command: uname-i to know your version of Centos.
Install phpMyAdmin with command: yum-y install phpmyadmin
Edit the file/etc/rc.conf with phpmyadmin type command: nano/etc/httpd/conf.d/phpmyadmin.conf
Delete the other and let its contents like below:

Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin

Then edit the file URconfig.inc.php with the command: nano/usr/share/phpmyadmin/config.inc.php
Then change the following line:

$cfg [‘ Servers ‘] [$i] [‘ auth_type ‘] = ‘ cookie ‘;
$cfg [‘ blowfish_secret ‘] = ‘ sdf934sdfgHijh98Y ‘;

On the cookies, turn into “http” and on such random fill blowfish_secret example above.
In httpd.conf add the following line:

< Directory “/usr/share/phpmyadmin” >
Order allow, deny
Allow from all
</Directory>

Set permision file with the command: # chmod-R g + w/var/www/html/phpmyadmin/
# chown-R apache apache./var/share/phpmyadmin/Kemudian restart httpd sevice with the command: service httpd restart

4. FTP server Settings
Download the installation file with the command: wget URftp://ftp.proftpd.org/distrib/source/proftpd-1.3.1.tar.gz
Extract the downloaded file: tar xzvf URproftpd-1.3.1.tar.gz
Do the configuration and install proftpd, with command-command: # cd proftpd-1.3.1
#./configure – prefix =/usr/local/proftpd
# make; make install
Go into the config file: nano/usr/local/proftpd/etc/proftpd.conf
Change some of the settings correspond to the settings below:

ServerName “ProFTPD Default Installation”
ServerType standalone
DefaultServer on
Port 21
Umask 022
MaxInstances 30
User nobody
Group nogroup
DefaultRoot ~
AllowOverwrite on
DenyAll

Then save the configuration.
Create usergroup nogroup with command groupadd: nogroup
Run an FTP server, with the command:/usr/local/proftpd/sbin/proftpd.
Create automatically start when the server is booted by editing the local rc. Type: nano/etc/rc.d/rc.local then add a the following line:/usr/local/proftpd/sbin/proftpd
Completed. Service-the service VPS you have now ready

NO COMMENTS

LEAVE A REPLY