Tuesday, March 8, 2011

mount nfs no route to host

in fedora os

first open

vi /etc/exports

add bellow line
/home/USER_NAME/public_html 192.168.1.*(rw,async,no_root_squash)


exportfs -a -v

service nfs start

chkconfig nfs on

service portmap restart

chkconfig portmap on

service iptables stop

(if you want to iptables service permanently disable)

/sbin/chkconfig iptables off

then after mount nfs from other system bellow command

mount -o rw,async 192.168.1.(server id):/home/USER_NAME/web /home/USERS_NAME/MOUNT_DIR_NAME

auto mount in booting (server  dir local sys dir)

192.168.1.1:/home/keval/web /home/keval/kevalweb nfs defaults 0 0

==============================
if ssh login not work on fedora

then try commnad through

passwd username

Monday, March 7, 2011

mysql data copy

start mysql

> mysql -h localhost -u root -p

create user

mysql> create user 'user_name'@'localhost' identified by 'password';

create database

mysql> create database db_name

use database

mysql> use db_name;

copy data from file

mysql> \. /home/user_name/Downloads/my_db.sql

apache virtual host configuration

httpd.conf file setting

<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
#UserDir disabled

#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disabled" line above, and uncomment
# the following line instead:
#
UserDir public_html

</IfModule>

make file /etc/httpd/conf.d/vhost.conf


NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.test.local
DocumentRoot /home/USER_NAME/public_html/www.test.com
<Directory /home/USER_NAME/public_html/www.test.com>
AllowOverride All
Options FollowSymlinks
Order Allow,Deny
Allow From All
</Directory>
</VirtualHost>


commond prompt
chcon -R -t htppd_sys_content_t /home//public_html
setsebool -P httpd_enable_homedirs true

/etc/hosts file entry

127.0.0.1 www.test.local

how to see xml preview in browser php

xml preview view in browser $xml = new DOMDocument('1.0', 'UTF-8');                 $xml->preserveWhiteSpace = false; ...