Wednesday, March 2, 2011

subversion control on linux

Нилээн юм болж байж subversion on linux тохируулж сурлаа хүүүүүүүүү

эхлээд linux software дотроос subversion install хийнэ
тэгээд энэ доод талын кодуудыг бичиж өгнө дөө зарим хэрэгцээгүйг нь бичих шаардлагагүй
 алгасчаарай.

useradd -d /home/resources/svn -s /bin/false -g svn svn
 1074  cd svn
 1075  dir
 1076  mkdir auth
 1077  mkdir repos
 1078  dir
 1079  cd repos/
 1080  cd..
 1081  touch auth/svn_passwdfile
 1082  cd auth/
 1083  dir
 1084  cd..
 1085  dir
 1086  chown root:www auth/svn_passwdfile
 1087  chmod 640 auth/svn_passwdfile
 1088  htpasswd2 auth/svn_passwdfile user1
 1089  htpasswd2 auth/svn_passwdfile user2
 1090  vi /etc/sysconfig/svnserve
 1091  svnadmin create repos/project1
 1092  chown -R svn:svn repos/project1/
 1093  cat repos/project1/conf/passwd
 1094  vi /opt/lampp/etc/extra/httpd-vhosts.conf
 1095  /etc/rc.d/lampp startapache
 1096  vi /opt/lampp/etc/extra/httpd-vhosts.conf
 1097  /etc/rc.d/lampp startapache
 1098  a2enmod dav
 1099  dir
 1100  a2enmod --help
 1101  vi /opt/lampp/etc/subversion.conf
 1102  vi /opt/lampp/etc/httpd.conf
 1103  /etc/rc.d/lampp restart
 1104  /etc/init.d/svnserve restart
 1105  /etc/init.d/svnserve svnserve -d -r /srv/svn/repos/mvc/restart
 1106  svnserve -d -r /srv/svn/repos/mvc/
 1107  svnserve -d -r /home/resources/svn/repos/project1/
 1108  /etc/init.d/svnserve stop
 1109  svnserve -d -r /home/resources/svn/repos/project1/
 1110  /etc/init.d/svnserve start
 1111  /etc/init.d/svnserve stop
 1112  svnserve -d -r /home/resources/svn/repos/
 1113  /etc/init.d/svnserve start
 1114  /etc/init.d/svnserve stop
 1115  svnserve -d -r /home/resources/svn/repos/project1/
 1116  /etc/init.d/svnserve start
 1117  passwd svn
 1118  /etc/init.d/svnserve
 1119  /etc/init.d/svnserve force-reload
 1120  /etc/init.d/svnserve stop
 1121  svnserve -d -r /home/resources/svn/repos/project1/
 1122  /etc/init.d/svnserve start
 1123  cat auth/svn_passwdfile
 1124  vi repos/project1/conf/passwd
 1125  vi repos/project1/conf/authz
 1126  vi repos/project1/conf/svnserve.conf
 1127  /etc/init.d/svnserve stop
 1128  svnserve -d -r /home/resources/svn/repos/project1/
 1129  /etc/init.d/svnserve start
 1130  mc
 1131  history

Sunday, February 27, 2011

lampp installing proftpd and phpmyadmin configuration on linux

Доор бичсэн дарааллаар хэрэгжүүлбэл http://localhost/ ажиллах болно

1. cp /(mounted flash disk or url)/lampp.tar /opt

2. tar -xvf lampp.tar

3. /opt/lampp/etc/extra/httpd-lampp.conf edit as (Allow from 127....... .etc to "Allow from all")

4. cp /opt/lampp/lampp /etc/rc.d

5. chkconfig lampp on

6. /etc/rc.d/lampp restart


Нэмэхэд root@localhost> nmap 127.0.0.1 гэж шалгавал
http open 80 gej garch irvel zov boljee gesen ug


Proftpd -g ajiluulahdaa:


/opt/lampp/etc dotorhi proftpd.conf файлыг доор бичсэн байдлаар засчих

vi proftpd.conf
shift+i
zasaad daraa ni
esc
shift+q
wq
enter

# To really apply changes reload proftpd after modifications.
AllowOverwrite on
AuthAliasOnly on

# Choose here the user alias you want !!!!
UserAlias user1 boroo

ServerName            "Boroo ftp server"
ServerType             standalone
DeferWelcome            on

MultilineRFC2228 on
DefaultServer            on
ShowSymlinks            off

TimeoutNoTransfer 600
TimeoutStalled 100
TimeoutIdle 2200

DisplayChdir                    .message
ListOptions                    "-l"

RequireValidShell         off

TimeoutLogin 20

RootLogin             off

# It's better for debug to create log files ;-)
ExtendedLog             /var/log/ftp.log
TransferLog             /var/log/xferlog
SystemLog            /var/log/syslog.log

#DenyFilter            \*.*/

# I don't choose to use /etc/ftpusers file (set inside the users you want to ban, not useful for me)
UseFtpUsers off

# Allow to restart a download
AllowStoreRestart        on

# Port 21 is the standard FTP port, so you may prefer to use another port for security reasons (choose here the port you

want)
Port                21

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 8

# Set the user and group that the server normally runs at.
User                  nobody
Group                 nogroup

# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask                022    022

PersistentPasswd        off

MaxClients 8
MaxClientsPerHost 8
MaxClientsPerUser 8
MaxHostsPerUser 8

# Display a message after a successful login
AccessGrantMsg "welcome !!!"
# This message is displayed for each access good or not
ServerIdent                  on       "you're at home"

# Lock all the users in home directory, ***** really important *****
DefaultRoot ~

MaxLoginAttempts    5

#VALID LOGINS
<Limit LOGIN>
AllowUser boroo
DenyALL
</Limit>

<Directory />
Umask 022 022
#AllowOverwrite off
    <Limit WRITE READ MKD STOR DELE XMKD RNRF RNTO RMD XRMD>
    AllowAll
    </Limit>
</Directory>



phpmyadmin -g
1. hooson password toi nevterch orood root iinhee pass ig solino

2. daraa ni  doorhi codiig /opt/lampp/phpmyadmin/config.inc.php -darj huulaad hadgalj /etc/rc.d.lampp reload hiine

<?php

$cfg['blowfish_secret'] = 'xampp1234567890'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

$i = 0;
$i++;

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
?>

file copy and mount from usbflash disk on suse linux

ер нь бол хараар тодолсон хэсгийг бичээд зөв ажиллана


on openSUSE 11.4

[boroo@localhost]$ su
Password:
[root@localhost]# mkdir /mnt/usbflash <- this created a directory in the mnt folder

[root@localhost mnt]# mount /dev/disk/by-label/flashname /mnt/usbflash <-this is the command to mount flash card reader

[root@localhost mnt]# ls usbflash <-this listed all the info in my usb flash card and this was the output:
bootex.log dns.bmp games and keys LinuxDocs01.21.04 pc's
dns2.bmp Documents LinuxDistributions_eBay my pics programs

then i just copied this to my home folder and i was done!

[root@localhost mnt]# umount /dev/disk/by-label/flashname /mnt/usbflash <-this unmounted my usb flash card
umount: /dev/sda1: not mounted
[root@localhost mnt]# exit
[imdeemvp@localhost mnt]$

Saturday, February 26, 2011

Nmap is network tool, mc is filesystem tool installing on linux

login as su on linux bash

installing nmap tool

1 cnf nmap
2 zypper install nmap
3 y is continue
4 nmap -sS 127.0.0.1 to port scan

installing mc tool

1 cnf mc
2 zypper install mc
3 y is continue
4 mc