TE.SOMATH CLASS: A SNA2010-073
Create Partition
How to Creat RIAD0
Configure Joomla
Create Partition
1 You should have Hard Disk that want to create partition
2 List or to show Disk
# fdisk ( ls -l /dev/sd* )
3 Create partition
# fdisk /dev/sdb1 (sdb1 = name your hard disk)
4 Type m to show print this menu
5 Type n add new partition
6 Type e choose extended or p primary
7 Type 1 ( 1 - 1044)
8 Type P to show your disk that you create
9 Type w to wirte Disk
10 Type Partprobe to restart
11 Format your partition
# mkfs.ext2 /dev/sdb1
12 Create folder name Data in your Desktop
# md /root/Desktop/ Data
13 Mount your Disk
# mount /dev/sdb1 /root/Desktop/Data
Note if we want to Unmount we use command
# umount /dev/sdb1 /root/Desktop /Data
-------------------------------------------------------------------------------------
2 List or to show Disk
# fdisk ( ls -l /dev/sd* )
3 Create partition
# fdisk /dev/sdb1 (sdb1 = name your hard disk)
4 Type m to show print this menu
5 Type n add new partition
6 Type e choose extended or p primary
7 Type 1 ( 1 - 1044)
8 Type P to show your disk that you create
9 Type w to wirte Disk
10 Type Partprobe to restart
11 Format your partition
# mkfs.ext2 /dev/sdb1
12 Create folder name Data in your Desktop
# md /root/Desktop/ Data
13 Mount your Disk
# mount /dev/sdb1 /root/Desktop/Data
Note if we want to Unmount we use command
# umount /dev/sdb1 /root/Desktop /Data
-------------------------------------------------------------------------------------
Create Quota on LVM
1 We have Hard Disk 3
***5 GB
***4 GB
***6 GB
2 We should to create partition ech other
3 Create LVM
# PVCreate /dev/hdd1/dev/hda2/dev/hdb3
# Vgcreate 73root/dev/hdd1/dev /dev/hda2/dev/hdb3
# vlcreate -L +5GB -n Data1 73root
# mkfs.ext3 /dev/73root /Data1
# lvscan
wait have more---------------------
***5 GB
***4 GB
***6 GB
2 We should to create partition ech other
3 Create LVM
# PVCreate /dev/hdd1/dev/hda2/dev/hdb3
# Vgcreate 73root/dev/hdd1/dev /dev/hda2/dev/hdb3
# vlcreate -L +5GB -n Data1 73root
# mkfs.ext3 /dev/73root /Data1
# lvscan
wait have more---------------------
How to Creat RIAD0
1 Mack Sure you are have 2 Hard Disk
2 Create partition on 2 Hard Disk
3 Create RIAD 0 that use Cammand
# mdadm - creat --verbose /dev/md0 --level=stripe --raid -devices=2 /dev/sdb6 /dev/sdc5
Note: sdb6 = Name your Hard Disk
sdv5 = Name your Hard Disk
4 use Command to Check
# mdadm --detail /dev/md0
5 Format it type Command
# mkfs.tex3 /dev/md0
6 Mount it but we should to choose plase that we mount store it
# mount /dev/md0 /root/Desktop
-----------------------------------------------------------------------
2 Create partition on 2 Hard Disk
3 Create RIAD 0 that use Cammand
# mdadm - creat --verbose /dev/md0 --level=stripe --raid -devices=2 /dev/sdb6 /dev/sdc5
Note: sdb6 = Name your Hard Disk
sdv5 = Name your Hard Disk
4 use Command to Check
# mdadm --detail /dev/md0
5 Format it type Command
# mkfs.tex3 /dev/md0
6 Mount it but we should to choose plase that we mount store it
# mount /dev/md0 /root/Desktop
-----------------------------------------------------------------------
How to Create RIAD1
1 Mack sure you are have 2 or 3 Hard Disk
2 Create partition 2 or 3 Hard Disk
3 Use Command Crete Raid 1
# mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/ sdb1 /dev/sdc1
4 Use Command to show it
# mdadm --detail /dev/md0
5 Format it
# mkfs.tex3 /dev/md0
5 Mount it
# mount /dev/md0 /root/Desktop
----------------------------------------------------------------
Command Create RIAD5
# /sbin/ndadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1
--------------------------------------------------------------
2 Create partition 2 or 3 Hard Disk
3 Use Command Crete Raid 1
# mdadm --create --verbose /dev/md0 --level=mirror --raid-devices=2 /dev/ sdb1 /dev/sdc1
4 Use Command to show it
# mdadm --detail /dev/md0
5 Format it
# mkfs.tex3 /dev/md0
5 Mount it
# mount /dev/md0 /root/Desktop
----------------------------------------------------------------
Command Create RIAD5
# /sbin/ndadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1
--------------------------------------------------------------
Configure Joomla
1 Introduction of Joola Joomla is a free open source content management system
for publishing content on the World Wide Web and intranets as well as a Model-view.
Joomla is a continuation of the work of the Development Team that unanimously resigned
form the Mambo project in August 2005.
2 Installation
a. service
i. Apache2
1. apache2
2. apche2-example-pages
3. apche2-prefox
ii. Mysql
1. mysql
2. mysql-client
3. mysql-devel
4. php-mysql
iii. php
1. php5
2. php-mysql
3. hph-zlib
3 Create databases
==> Create databases for user bye command like this.
#mysqladmin –u root –p password 123
And then when we create already we will see Enter password so we don’t put password we should enter.
Login to databases bye command like this.
#mysql –p
And after type password that create databases before.
Show databases bye command like this.
# show databases;
Create databases for Joomla bye command:
#create database joomla;
Create folder name Joomla in path /srv /www/htdocs/Joomla bye command:
#md /srv/www/htdocs/Joomla
4 Copy file Joomla_1.0.14-RC1-Full_pack put in path /srv/www/htdocs/Joomla bye command:
# cp /root/Desktop/Joomla_1.0.14-RC1-Full_pack.tar /srv/www/htdocs/Joomla
Go to path /srv/www/htdocs by command:
Go to path /srv/www/htdocs by command:
# cd /srv/www/htdocs
Extra packet Joomla by command:
Extra packet Joomla by command:
# tar -xvf Joomla_1.0.14-RC1-Full_pack ,tar
To ensure the wwwrun user and www group (used by Apache) have access to these files type with command like this:
# chown –R wwwrun.www /srv/www/htdocs
# chmod –R 744 /srv/www/htdocs
5 Edit file for need to modify the /etc/php5/apache2/php.ini configuration file
to ensure the settings are correct for Joomla that type command like this.
# vi /etc/php5/apache2/php.ini
Line that we should correct are :
Line that we should correct are :
Line 86 display_errors = off change to display_errors = on
Line 107 magic_quotes_qpc = off change to mangic_quotes_qpc = on
Line 358 display_errors = off change to display_errors = on
Restart some service ·
rcapache2 restart
rcmysql restart
rcnetwork restart
6 Open firefox and then access web that type on address bar
IP machines /Joomla Ex 172.16.1.2/joomla
and then click nest
Click next Click continues
And this step put information like this
and after click Next Click Ok
On the step 2 put users name and then click next
On the step 3 put your mail and password for loin URL that put like this
and click Next to continues
On the step 4 this step that you renumber for user name and password for loin
And then click administration Login to This result
Configure moodle
---------------------------------------------------------------------------------------------------
Configure moodle
1 Introduction of moodle
Moodle is afree and open source e-learning software platform all so know as acourse Managemnet system (CMS)
or learning Management system (LMS) or virtual learning Environment. Moodle is designated to help educators create online course with opportunities for rich interaction.
2 Installation services
==> apache
- apache2
- apache2-example-pages
- apache2-perfork
==> php5
- php5-mysql
- php5
==> mysql
- mysql
- mysql-client
- mysql-devel
3 Create password for Databases
# mysqladmin -u root -p password 1234
4 Login to databases
# mysql -p
5 Create databases name moodle
# create databases moodle;
6 Show databases that we create
# show databases;
7 Copy file moodle-latest-18.tar to /srv/www/htdocs
# cp moodle-tatest-18.tar /srv/www/htdocs
8 Go to path /srv/www/htdocs
# cd /srv/www/htdocs
9 Extrat moodle-latest-28.tar
# tar -xvf moodle-tatest-18.tar
10 Go to path /moodle and then we change file config-dist.php to config-php
# cd moodle
# cp config-dist.php config.php
11 Edit file config.php
# vim config.php
12 Change line 53-54
-
$CFG->dbuser = 'root' ; //your databases username
$CFG - >dbpass = '1234' //your databases password
Line 70
$CFG - > wwwroot = ' http://172.16.1.2/moodle'; (ip machin)
Line83
$CFG -> dirroot = '/srv/www/htdocs/moodle'; ( path of moodle )
Line 99
$CFG-> dataroot = '/srv/www/moodledata';
11 Create directory name moodledata in path /srv/www and then give permisson
# md /srv/www/moodledata
# chmod 777 /srv/www/moodledata
12 Restart some services
# rcapache2 restart
# rcmysql restart
# rcnetwork restart
13 Access web
Moodle is afree and open source e-learning software platform all so know as acourse Managemnet system (CMS)
or learning Management system (LMS) or virtual learning Environment. Moodle is designated to help educators create online course with opportunities for rich interaction.
2 Installation services
==> apache
- apache2
- apache2-example-pages
- apache2-perfork
==> php5
- php5-mysql
- php5
==> mysql
- mysql
- mysql-client
- mysql-devel
3 Create password for Databases
# mysqladmin -u root -p password 1234
4 Login to databases
# mysql -p
5 Create databases name moodle
# create databases moodle;
6 Show databases that we create
# show databases;
7 Copy file moodle-latest-18.tar to /srv/www/htdocs
# cp moodle-tatest-18.tar /srv/www/htdocs
8 Go to path /srv/www/htdocs
# cd /srv/www/htdocs
9 Extrat moodle-latest-28.tar
# tar -xvf moodle-tatest-18.tar
10 Go to path /moodle and then we change file config-dist.php to config-php
# cd moodle
# cp config-dist.php config.php
11 Edit file config.php
# vim config.php
12 Change line 53-54
-
$CFG->dbuser = 'root' ; //your databases username
$CFG - >dbpass = '1234' //your databases password
Line 70
$CFG - > wwwroot = ' http://172.16.1.2/moodle'; (ip machin)
Line83
$CFG -> dirroot = '/srv/www/htdocs/moodle'; ( path of moodle )
Line 99
$CFG-> dataroot = '/srv/www/moodledata';
11 Create directory name moodledata in path /srv/www and then give permisson
# md /srv/www/moodledata
# chmod 777 /srv/www/moodledata
12 Restart some services
# rcapache2 restart
# rcmysql restart
# rcnetwork restart
13 Access web
-------------------------------------------------------------------------------------------------
Configure Virual Host
Configure Virual Host
1 Create folder in path /srv/www/htdocs/
example:
# md /srv/www/htdocs/boycist
2 And then go to path /srv/www/htdocs
# cd /srv/www/htdocs
3 Copy file index.html to path /boycist
# cp index.html /srv/www/thdocs/boycist
4 Go to path /etc/apache2/vhost.d/
# cd /etc/apache2/vhost.d
5 Copy file vhost.templet to boycist.conf
# cp vhost.templet boycist.conf
6 Edit file boycist.conf
# vim boycist.conf
7 Rename some pornt
Line 15-16-17
- <VirtualHost www.boycist.com : 80>
- SeverAdmin www.boycist.com
- ServerName www.boycist.com
Line 22
- DocumentRoot /srv/www/htdocs/boycist
Line 32
- UseCanonicalName On
Line 93
- < Directory " /srv/www/htdocs/boycist/">
8 And then we save this file
9 Access web open firefox
# firefox &
http:// www.boycist.com
example:
# md /srv/www/htdocs/boycist
2 And then go to path /srv/www/htdocs
# cd /srv/www/htdocs
3 Copy file index.html to path /boycist
# cp index.html /srv/www/thdocs/boycist
4 Go to path /etc/apache2/vhost.d/
# cd /etc/apache2/vhost.d
5 Copy file vhost.templet to boycist.conf
# cp vhost.templet boycist.conf
6 Edit file boycist.conf
# vim boycist.conf
7 Rename some pornt
Line 15-16-17
- <VirtualHost www.boycist.com : 80>
- SeverAdmin www.boycist.com
- ServerName www.boycist.com
Line 22
- DocumentRoot /srv/www/htdocs/boycist
Line 32
- UseCanonicalName On
Line 93
- < Directory " /srv/www/htdocs/boycist/">
8 And then we save this file
9 Access web open firefox
# firefox &
http:// www.boycist.com
------------------------------------------------------------------------------------
Configure Webmin
Configure Webmin
1 Instoduction of webmin
2 Instal packet webmin
# rpm -ivh /root/Desktop /webmin-1.390.noarch.rpm
3 Access webmin
# firefox &
http://localhost:10000
4 Login webmin
==> UserName: root
==> password : 1234 ( Password of machin login to )
2 Restart rcxinetd
# rcxinetd restart
3 Access web
http://192.168.1.1:901
-----------------------------------------------------------------------------------------------------------
- Ctrl+C
- openssl genrsa -des3 -out /tmp/webmail.key -rand
/tmp/random 1024
- openssl req -new -x509 -key /tmp/webmaiserver.key
-out /tmp/webmail.crt
- cp /tmp/accounting.key /etc/apache2/ssl.key/
- cp /tmp/accounting.crt /etc/apache2/ssl.crt/
- rm /tmp/webmail*
- chmod 400 /etc/apache2/ssl.key/accounting.key
2 Edit file /etc/apache2/vhost/webmailserver.conf and wirte some point
<VirtualHost webmailserver.soamth.com:443>
ServerName webmailserver.somath.com
ServerName webmailserver.somath.com:443
SSLEngine on
SSLCipherSuite ALL:!ADH: !EXPORT56:RC4+RSA:+HIGH:+MEDIUM:LOW:+SSLv2:+EXP:eNULL
SSLCertificateFile /etc/apache2/ssl.crt/webmailserver.crt
SSLCertificateFile /etc/apache2/ssl.key/webmailserver.key
3 Access web and Request Certificate
https://webmailserver.somath.com
4 Click on Accept this certificate temporarily for this session
5 Click Ok
6 Click OK
--------------------------------------------------------------
2 Instal packet webmin
# rpm -ivh /root/Desktop /webmin-1.390.noarch.rpm
3 Access webmin
# firefox &
http://localhost:10000
4 Login webmin
==> UserName: root
==> password : 1234 ( Password of machin login to )
-------------------------------------------------------------------------
Configur DNS
Configur DNS
1 Instal packet DNS
# yast -i bind
2 Edit file /etc/named.conf
# vim /etc/named.conf
line 114-145-146-147
zone " somath.con" in {
type master;
file " master/somath.com.zone" ;
};
zone " 73.168.192.in.addr.arpa" in {
type master;
file " master/192.168.73.zone" ;
};
3 Save this file
4 Go this path
# cd /var/lib/named/
5 Copy 2file to location master and then rename ti
# cp localhost.zone master/somath.com.zone
# cp 127.0.0.zone master/192.168.73.zone
6 Edit this file that we copy the moment
# cd master
# vim somath.com.zone
$ITL 1W
somath.com. IN SOA Ratana.somath.com. hostmaster.somath.com. (
42 ; serial (d. adams)
2D ; efresh
4H ; retry
6W ; expiry
1W ; minimum
somath.com. IN NS Ratana.somath.com.
somath.com. IN A 192.168.73.1
Ratana IN A 192.168.73.1
# vim 192.168.73.zone
$ITL 1W
73.168.192.in-addr.arpa. IN SOA Ratana.somath.com. hostmaster.somath.com. (
42 ; serial (d. adams)
2D ; refresh
4H ; retry
6W ; expiry
1W ; minimum
73.168.192.in-addr.arpa. IN NS Ratana.somath.com.
1 IN PTR somath.com.
1 IN PTR Ratana
7 Edit file /etc/hosts
# vim /etc/hosts
Line 23
192.168.73.1 Ratana.somath.com Ratana
8 Restart some services
# rcnamed restart
# rcnetwork restart
9 Test DNS
# nslookup somath.com
# nslookup 192.168.73.1
# yast -i bind
2 Edit file /etc/named.conf
# vim /etc/named.conf
line 114-145-146-147
zone " somath.con" in {
type master;
file " master/somath.com.zone" ;
};
zone " 73.168.192.in.addr.arpa" in {
type master;
file " master/192.168.73.zone" ;
};
3 Save this file
4 Go this path
# cd /var/lib/named/
5 Copy 2file to location master and then rename ti
# cp localhost.zone master/somath.com.zone
# cp 127.0.0.zone master/192.168.73.zone
6 Edit this file that we copy the moment
# cd master
# vim somath.com.zone
$ITL 1W
somath.com. IN SOA Ratana.somath.com. hostmaster.somath.com. (
42 ; serial (d. adams)
2D ; efresh
4H ; retry
6W ; expiry
1W ; minimum
somath.com. IN NS Ratana.somath.com.
somath.com. IN A 192.168.73.1
Ratana IN A 192.168.73.1
# vim 192.168.73.zone
$ITL 1W
73.168.192.in-addr.arpa. IN SOA Ratana.somath.com. hostmaster.somath.com. (
42 ; serial (d. adams)
2D ; refresh
4H ; retry
6W ; expiry
1W ; minimum
73.168.192.in-addr.arpa. IN NS Ratana.somath.com.
1 IN PTR somath.com.
1 IN PTR Ratana
7 Edit file /etc/hosts
# vim /etc/hosts
Line 23
192.168.73.1 Ratana.somath.com Ratana
8 Restart some services
# rcnamed restart
# rcnetwork restart
9 Test DNS
# nslookup somath.com
# nslookup 192.168.73.1
--------------------------------------------------------------------------------------
Samba Join with Domain 2003
1 Install packet samba
2 Time ( Correct time between sure and windows )
3 Vim /etc/ resolve.conf
** search somath.com
** nameserver 192.168.1.1
4 yast -> network service -> window domain membership
** Domain or workgroup: 192.168.1.1
** and then select Also use SMB information for Linux
Authentication and select Create home directory on login
** Finish -> it will put password 2003 ( administrator )
1 Install packet samba
2 Time ( Correct time between sure and windows )
3 Vim /etc/ resolve.conf
** search somath.com
** nameserver 192.168.1.1
4 yast -> network service -> window domain membership
** Domain or workgroup: 192.168.1.1
** and then select Also use SMB information for Linux
Authentication and select Create home directory on login
** Finish -> it will put password 2003 ( administrator )
Samba access from web:
1 vim /etc/xinetd.d/swat
# SWAT is the samba web administartor tool
service swat
{
socket type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/swat
# only_frin = 127.0.0.1
log_on_faukyre +=USERID
# disabke = yes
}
# SWAT is the samba web administartor tool
service swat
{
socket type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/swat
# only_frin = 127.0.0.1
log_on_faukyre +=USERID
# disabke = yes
}
2 Restart rcxinetd
# rcxinetd restart
3 Access web
http://192.168.1.1:901
-----------------------------------------------------------------------------------------------------------
build samba as domain controller
1. vim
/etc/samba/smb.conf :
[global]
netbios name = linux
workgroup = linux.com
security = user
logon script = %U.bat
domain master = Yes
os level = 65
local master = Yes
preferred master = Yes
domain logons = Yes
add machine script =
/usr/sbin/useradd -c Machine -d
/var/lib/nobody -s /bin/false %m$
--------------------------------------------------------------------------------------------------------
Configure https on mailserver
1Create Key
- Ctrl+C
- openssl genrsa -des3 -out /tmp/webmail.key -rand
/tmp/random 1024
- openssl req -new -x509 -key /tmp/webmaiserver.key
-out /tmp/webmail.crt
- cp /tmp/accounting.key /etc/apache2/ssl.key/
- cp /tmp/accounting.crt /etc/apache2/ssl.crt/
- rm /tmp/webmail*
- chmod 400 /etc/apache2/ssl.key/accounting.key
2 Edit file /etc/apache2/vhost/webmailserver.conf and wirte some point
<VirtualHost webmailserver.soamth.com:443>
ServerName webmailserver.somath.com
ServerName webmailserver.somath.com:443
SSLEngine on
SSLCipherSuite ALL:!ADH: !EXPORT56:RC4+RSA:+HIGH:+MEDIUM:LOW:+SSLv2:+EXP:eNULL
SSLCertificateFile /etc/apache2/ssl.crt/webmailserver.crt
SSLCertificateFile /etc/apache2/ssl.key/webmailserver.key
3 Access web and Request Certificate
https://webmailserver.somath.com
4 Click on Accept this certificate temporarily for this session
5 Click Ok
6 Click OK
--------------------------------------------------------------