Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

Install CentOS 6.

7 minimal

Setelah install setting dulu network dengan IP static

## Configure eth0

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
IPADDR=192.168.1.44
NETMASK=255.255.255.0

Setting Default Gateway

# vi /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=centos6
GATEWAY=192.168.1.1

## Restart Network Interface


#

service network restart

Configure DNS Server

# vi /etc/resolv.conf

nameserver 8.8.8.8 # Replace with your nameserver ip


nameserver 192.168.1.1 # Replace with your nameserver ip
Install CentOS WebPanel

Prerequisites for CentOS Web Panel

 Set Proper & fully qualified Hostname


 Set Static IP
 fresh installation of CentOS/RHEL/CloudLinux 6.x
 32 bit Operating System requires minimal of 512 MB RAM
 64 bit Operating System requires minimal of 1024 MB RAM (recommended)
 CWP doesn’t has an uninstaller and we need to reinstall the server

1) Update server packages

First update your server packages to latest version and install wget package which is used download the files
from web.

[Install wget]
# yum -y install wget

[Update your system packages to latest]


# yum -y update

[Reboot the server]


# shutdown -r now

2) Install CWP

First update your server packages to latest version and install wget package which is used download the files from web.

[CWP Installer with MySQL version 5.1]


# cd /usr/local/src
# wget http://centos-webpanel.com/cwp-latest
# sh cwp-latest

[CWP Installer with MARIA-DB 10.1.10]


# cd /usr/local/src
# wget http://centos-webpanel.com/cwp-latest
# sh cwp-latest -d mariadb

If you face any error while downloading the above link, then use below one.

# wget http://dl1.centos-webpanel.com/files/cwp-latest

Initiate the CWP installation and wait, it will take hardly 30 mins, so sit back and have a cub of coffee.CWP successfully
installed, just not the MysQL password and reboot the server.
First thing first, install CWP and login to CWP dashboard as root or a user with root privilege via http://your-
ip:2030

1. Setup Nameservers
Name servers (NS) are often called DSN servers, every web site has two name servers to which it is pointed.
Setting up NS must be done at both domain registrar and hosting account (server-end). In CWP you can define
your default NS by going to DNS Functions >> Edit Nameservers IPs. Enter your desired Nameservers and
put your server’s IP next to each followed by clicking Save Changes button. See illustration below:

Once done, you’ll see this message:

Now do not forget to register those two NameServers (NS) to your domain registrar. Consult directly to your
domain registrar if you confused on how to set it up.

2. Setup Shared IP
This is very needed. However if you forgot this step then you’ll not be able to host your websites on your
server. Yet, even you typed your VPS IP on browser, it will load nothing / inaccessible. This step is also
necessary if you have two or more free IPs on your sever so you can define any specific IP of your server to use
with ant other users (think as Shared hosting).

Go to CWP Settings then Edit Settings.


Enter your current server IP or free unused IP. Leave Apache port to 80 by default because we don’t have
Varnish activated yet. Do not forget to enter your valid email address in the Root Email field.

After clicking the Save Changes button, you’ll see a message similar to this:

3. Setup A Hosting Package


A hosting package is basically just like a web hosting plan you see in many providers. A hosting package
contains limitations to resources like Disk space, Bandwidth quota, number of domains / subdomains allowed,
etc. Still in CWP, go to Packages and Add a Package. Next, give that package a name and define several
limitations followed by clicking the Create button.:
Once done, you’ll just see a message saying Data Updated!

4. Create a User Account


Think your root user (admin) is an account to access WHM so it has ability manage all cPanel accounts (user).
Now, create a user account for your own. You’ll use that user to add your domains /websites on your hosting
server. Go to User Accounts menu then click New Account. Fill in all necessary fields and options.
Enter your main domain in the Domain field. You may change other options or simply leave as it is (default).
Once done, click the Create button. In the next page, you’ll see a custom Virtual Hosts file generated for that
domain followed by account details.

That’s it. Now each time you want to add new website as new domain or addon domain, you can choose
whether to create new account or simply use your newly created account.

5. Install Softaculous
This is optional but I believe you and your users may need it. Softaculous, a one-clik script installer. You can
install this popular script installer software in CWP with only one click-away. Just go to Script Installer >
Script Manager > then click the Install Softaculous button.

You’ll then see this message:


Installing Softaculous in background (check back in 5-10 minutes if softaculous is
1installed, log file: /var/log/softaculous-installer.log)
2If the installation fails, you can try to install it manually using command:
/usr/local/src/install.sh --quick

If you refresh your browser and the installation is done, you may notice new menu added in the bottom left
corner:

That’s all what I think few basic configs for newly installed CWP. Any suggestion? Do not hesitate to tip me.

Upgrade MySQL 5.1 to MySQL 5.5 on CentOS 6.7

1. Confirm your version of MySQL is CentOS 6.7 default

Type in the following to confirm that you have CentOS 6.7 default of MySQL 5.1 installed:

rpm -qa | grep mysql

Output should look similar to the following:

mysql-server-5.1.73-5.el6_6.x86_64
mysql-libs-5.1.73-5.el6_6.x86_64
mysql-5.1.73-5.el6_6.x86_64

Everything looks good, moving on!


2. Install and activate the REMI and EPEL RPM Repositories

If you have not done so already, install and activate the REMI and EPEL repositories;

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm && rpm -


Uvh epel-release-latest-6.noarch.rpm

wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm && rpm -Uvh remi-


release-6*.rpm

Now to enable the REMI repository globally:

nano /etc/yum.repos.d/remi.repo

Under the section that looks like [remi] make the following changes:

[remi]
name=Remi's RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

Type CTRL-O to save, and CTRL-X to exit

2. Update MySQL from 5.1 to 5.5


Simply type in the following:

yum -y update mysql*

Once that’s done, we can verify:

rpm -qa | grep mysql

And we should see something similar to the below:

mysql-5.5.45-1.el6.remi.x86_64
compat-mysql51-5.1.54-1.el6.remi.x86_64
mysql-libs-5.5.45-1.el6.remi.x86_64
mysql-server-5.5.45-1.el6.remi.x86_64
Install Samba on CentOS 6.0/6.1/6.2/6.3/6.4/6.5
To install the samba package,enter the following command:

# yum install samba samba-client samba-common

Check the version of installed samba software by using this command:

# smbd --version

Check Samba version

Configure the samba service, so that, it will start automatically at boot time:

# chkconfig smb on
# chkconfig nmb on

Add these Iptables rules, so that samba will work perfectly:

# iptables -I INPUT 4 -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
# iptables -I INPUT 5 -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
# iptables -I INPUT 6 -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
# service iptables save

Backup the smb.conf file, then delete it and create the new one:

# cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
# rm /etc/samba/smb.conf
# touch /etc/samba/smb.conf
# nano /etc/samba/smb.conf

Add these lines, in your smb.conf file (or change it according to your requirement):

#======================= Global Settings =====================================


[global]
workgroup = WORKGROUP
security = share
map to guest = bad user

#============================ Share Definitions ==============================


[nama_user_webroot]
path = /home/sesuai_nama_user/public_html
browsable =yes
writable = yes
guest ok = yes
read only = no
Save the smb.conf file and restart the service:

# service smb restart


# service nmb restart

Tambahkan samba user dari user yang sudah ada

# smbpasswd –a namausernyadisini

New SMB password: ********


Retype new SMB password:********

You might also like