A handy note for a system admin
Category: Server Administration
1. yum -y install squid
2. vi /etc/squid/squid.conf
3. Edit the config file as shown
acl CONNECT method CONNECT
# line 31: add ( define new ACL )
acl lan src 10.0.0.0/24
http_access allow localhost
# line 59: add ( allow defined ACL above )
http_access allow lan
# line 64: change
http_port 8080
# add at the last line
request_header_access Referer deny all
request_header_access X-Forwarded-For deny all
request_header_access Via deny all
request_header_access Cache-Control deny all
# add (specify hostname)
visible_hostname (proxy name)
# add (hide IP address)
forwarded_for off
4. service squid restart
5. chkconfig squid on
1. Install the nfs packages (nfs portmap)
yum install nfs portmap
2. Restart the services and enable at startup
service nfs restart
service portmap restart
chkconfig nfs on
chkconfig portmap on
3. Add entry to your nfs file(exports)
vi /etc/exports
4. Make the following changes just a sample is given change according to your requirements
/common 172.24.0.0/255.255.0.0(rw,sync)
5. Change SELinux context
setsebool -P samba_share_nfs=1
6. Restart nfs and portmap
You must now be able to access NFS
1. Install the packages required for running http server
yum install httpd
2. Restart the service and enable at boot up
service httpd restart
chkconfig httpd on
3. Create a Sample html file named index.html under /var/www/html
4. Go to your browser and type http://(ip-address)
5. Your http server must be up and running. The page you just created must appear.
1. Install the packages required for Samba
yum install samba
2.Restart the services and enable them at boot
service smb restart
chkconfig smb on
3. Edit the samba configuration file
vi /etc/samba/smb.conf
4. Make the following changes
(in the line containing)
WORKGROUP = EXAMPLE
hosts allow = 172.24. 127. (make sure your ip address/network address is included)
Add or edit the following lines depending on your requirement , am providing a sample here
[common]
path=/common (path that is exported for samba server)
browseable=yes (readable or not)
valid users= tony (give user names who can use this service)
5. Now issue the following commands in terminal
smbpasswd -a tony
(Give password)
chcon -R -t samba_share -t /common
service smb restart
testparm
6. To check whether your samba server is up or not
log on to another system and use smbclient //address/common -U tony
HTH