How to install WEB server in Linux
For Http Server packages to be install
1)httpd-manual
2)httpd-2
3)http-tools
After mounting cdrom install packages then edit below the files;
Make a directory with domain name
(com) mkdir (space) /var/www/html/amitava.com
Make a html file in amitava.com directory
(com) cat >(space) /var/www/html/amitava.com/index.html [Insert html code ]
<html>
<body bgcolor=”red”>
Test Page
</body>
</html>
Save and exit
Set permission for that directory amitava.com
(com) chmod(space)777 (space) /var/www/html/amitava.com
For all files and folder permission
(com) chmod(space)777 (space) /var/www/html/amitava.com/*.*
Edit apache configuration file
(com) vi (space) /etc/httpd/conf/httpd.conf [Go to the end of the file and write]
<Virtual host (domain ip):80>
(tab) DocumentRoot(space) /var/www/html/amitava.com
(tab) ServerName (space) www.amitava.com
</virtual Host>
Active this service
(com) chkconfig (space) httpd (space) on
Now restart the service
(com) service httpd restart
How to install ftp server
Packages to installed for FTP server
1)vsftpd-2
After installing vsftpd-2 package check pub folder is empty or not.
(com) cd (space) var/ftp/pub
(com) ls (space) –l
Create files for download in pub folder
Cat (space) > (space) myftpfile.txt
Set permission for this file
(com) chmod (space) 777 (space) myftpfile.txt
Now restart service
For Upload server create upload folder
# madir (space) /var/ftp/uploads
Now configure vsftpd file
Vi (space) /etc/vsftpd/vsftpd.conf [Go to “anonymous-enable=yes” and remove # before it]
[Go to “anon-upload-enable=yes” and remove # before it then immediate after the line write
Anon-umask=077]
[Go to “chown-uploads=yes” remove #] after this line [chown-username=daemon] save and exit
Set permission for uploads directory
# chmod (space) 777 (space) /var/ftp/uploads
Restart service service (space) vsftpd (space) restart
Active this service
# chkconfig (space) vsftpd (space) on
How to configure Data Server
For data server packages to be installed
1) Samba-3
2) Samba-client
3) Samba-common
4) Samba-swa (For redhat 5)
After installation all packages create samba group
(com) groupadd (space) samba group name
Create samba shareable directory
(com) mkdir (space) / samba shareable directory name
Create a samba user and samba password
(com)adduser (space) user name
(com) smbpasswd (space) –a (space) user name
Put samba shareable directory into the samba group
(com)chgrp (space) samba group name (space) / samba shareable directory name
Set permission for this directory
(com) Chmod (space) 777 (space) / samba shareable directory name
Put samba user in samba group and modify its logging shell
(com) Usermod (space) –G (space) samba user group name (space) samba user name
(com) usermod (space) –s (space) /sbin/nologing (space) samba user name
Now Edit samba configuration file
(com) vi (space) /etc/samba/smb.conf
[ See global Setting Workgroup (space) =(space) windows pc workgroup
Host allow (space) = (space) 127. (space) 192.168.1. ]
Go to end of the file and copy [public] section with details and pest after last line
[public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = +staff
Edit like below:
[matrimony] ———————- Display name
path = /home/Directoey name
public = yes
writable = yes
browseable = yes
printable = no
valid user = User name
create mask = 0770
write list = Group name
Then save and exit .
Now restart “smb & nmb” services
And on the “smb & nmb” services
(com)chkconfig (space) smb (space) on
(com)chkconfig (space) nmb (space) on