Category: UNIX\Linux


This is a note for myself and share my experience to my colleagues.

In this case, we have two server running Sun Solaris 9 and Sun Solaris 10. We call it v250 and v245.

Now we need to add one harddisk into v250 and share it to v245 by NFS. And it should be also be accessing by other MS windows workstation by SMB.

The server name will be show on the following command before the # character.

1) Input the new harddisk to the slot 7 on v250 server and startup machine.

2) run command “/usr/sbin/devfsadm” & “/usr/sbin/devfsadm -C” to renew.

3) run command “format” and the harddisk “2. c0t11d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>” was the one we just input.

v250 # format
Searching for disks…done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@1d,700000/scsi@4/sd@0,0
1. c0t9d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@1d,700000/scsi@4/sd@9,0
2. c0t11d0 <SUN72G cyl 14087 alt 2 hd 24 sec 424>
/pci@1d,700000/scsi@4/sd@b,0
4) get the usr partition number by “partition” under FORMAT MENU, and the filesystem  /dev/dsk/c0t11d0s6 was the space we can use in this case.
5) run newfs command to create a filesystem on /dev/rdsk
v250 # /usr/sbin/newfs /dev/dsk/c0t11d0s6
newfs: construct a new file system /dev/rdsk/c0t11d0s6: (y/n)? y
/dev/rdsk/c0t11d0s6:    142820160 sectors in 14035 cylinders of 24 tracks, 424 sectors
69736.4MB in 1404 cyl groups (10 c/g, 49.69MB/g, 6016 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 102224, 204416, 306608, 408800, 510992, 613184, 715376, 817568, 919760,
Initializing cylinder groups:
………………………
super-block backups for last 10 cylinder groups at:
141861248, 141963440, 142065632, 142167824, 142270016, 142372208, 142474400,
142576592, 142678784, 142780976,

6) mount the harddisk on system

v250 # cd /

v250 # mkdir newharddisk

v250 # vi /etc/vfstab

Add a new line:

/dev/dsk/c0t11d0s6       /dev/rdsk/c0t11d0s6      /newharddisk     ufs     7       yes     -

v250 # mount -a

7) share it by samba

v250 # vi /etc/sfw/smb.conf

Add new entry:

newharddisk

path = /newharddisk

writable = yes

create mode = 666

directory mode = 777

only user = no

public = yes

guest only = no

# /etc/init.d/samba stop

# /etc/init.d/samba start

8 ) share it by NFS

v250 #/usr/sbin/share -F nfs -o rw,anon=0 /newharddisk

v250 # more /etc/dfs/sharetab

/newharddisk      -       nfs     rw,anon=0

v250 server configuration completed.

9) Access newharddisk by NFS from v245

v245#mkdir /newhardiskonv250

v245# vi /etc/vfstab

add a new line:

v250:/newharddisk   –    /newhardiskonv250   nfs    yes   yes   bg

v245# mount -a

Win7 system access Mac OSX 10.4 Samba

WIN7 & WIN Vista was not able to access the samba (file share) on Mac OSX 10.4 (10.5 fixed).  But now, nikonz show me a solution as  below:

For your win7 laptop/pc, now it can access OSX 10.4 server by changing the security option as below: (Best answer from nikonz by :http://www.tomshardware.com/forum/75-63-windows-samba-issue )
Goto:
Control Panel – Administrative Tools – Local Security Policy – Local Policies – Security Options  :
Change:
Network security: LAN Manager authentication level
“Send LM & NTLM responses “
Change:
Network security: Minimum session security for NTLM SSP  (server & client)
Disable Require 128-bit encryption

To do a test after changed, please access your OSX10.4 by \\your-IP-address

Cheer!

MaxCapture Linux恢复下载(新床)

由于tf2009.com的国外主机开始禁止提供ISO文件下载,MaxCapture Linux的下载路径将由2010年开始移至国内主机tf2011.com,并以拆包方式提供,请各位下载后运行MaxCapture.part1.rar来还原ISO文件。

ISO文件的MD5校验码为:http://www.tf2011.com/download/maxcapture/MaxCapture_MD5.txt

各RAR分包下载地址如下:

http://www.tf2011.com/download/maxcapture/MaxCapture.part1.rar
http://www.tf2011.com/download/maxcapture/MaxCapture.part2.rar
http://www.tf2011.com/download/maxcapture/MaxCapture.part3.rar
http://www.tf2011.com/download/maxcapture/MaxCapture.part4.rar
http://www.tf2011.com/download/maxcapture/MaxCapture.part5.rar
http://www.tf2011.com/download/maxcapture/MaxCapture.part6.rar
http://www.tf2011.com/download/maxcapture/MaxCapture.part7.rar

sudo installation on Solaris 9

1) download pkgutil_sparc.pkg from http://blastwave.network.com/csw/pkgutil_sparc.pkg

2) install pkgutil_sparc.pkg by command : “/usr/sbin/pkgadd -d pkgutil_sparc.pkg”

3) setup DNS by /etc/hosts: “64.79.150.209   blastwave.network.com”

4) update catalog by command : “/opt/csw/bin/pkgutil -U”

5) install sudo by command : “/opt/csw/bin/pkgutil -i sudo”

6) modify sudoer by command “vi /opt/csw/etc/sudoers”

7) Run sudo command by command “/opt/csw/bin/sudo”

此秘笈均为本人的经验总结,已经在多台Red Hat Enterprise Linux 4上实战成功,特和大家一起分享:

1)确认Red Hat Enterprise Linux 4内各旧软件包的版本
以“rpm -q 软件包名” 得到如下:
httpd-2.0.52-28.ent
mysql-4.1.7-4.RHEL4.1
php-4.3.9-3.1
package libxml is not installed
gd-2.0.28-4
gd-2.0.28-4.4E.1
perl-5.8.5-12

2)下载以下软件包(下不到的人可以找我要):
MySQL-server-standard-5.0.24-0.rhel4.x86_64.rpm
MySQL-client-standard-5.0.24-0.rhel4.x86_64.rpm
MySQL-devel-standard-5.0.24-0.rhel4.x86_64.rpm
MySQL-shared-standard-5.0.24-0.rhel4.x86_64.rpm
libxml2-2.6.23.tar.gz
httpd-2.0.59.tar.gz
gd-2.0.33.tar.gz
php-5.1.4.tar.gz
并放到服务器/tmp下面

3)开始安装,基本按下面指令逐行输入即可:
cd /tmp
rpm -e mysql-4.1.7-4.RHEL4.1.i386 –nodeps
rpm -e mysql-server
rpm -e mysql-devel
rpm -Uvh MySQL-server-standard-5.0.24-0.rhel4.x86_64.rpm –nodeps
rpm -ivh MySQL-client-standard-5.0.24-0.rhel4.x86_64.rpm
rpm -ivh MySQL-devel-standard-5.0.24-0.rhel4.x86_64.rpm
rpm -ivh MySQL-shared-standard-5.0.24-0.rhel4.x86_64.rpm
vi /etc/my.conf
关闭#basedir=/var/lib
mkdir /var/run/mysqld
chown mysql.mysql /var/run/mysqld
/sbin/service mysql start

tar -zxvf libxml2-2.6.23.tar.gz
cd libxml2-2.6.23
./configure
make
make tests
make install

tar -zxvf httpd-2.0.59.tar.gz
cd httpd-2.0.59
./configure
make
make install
vi /usr/local/apache2/conf/httpd.conf
增加:
AddType application/x-httpd-php .php
DocumentRoot “/usr/local/apache2/htdocs”
DirectoryIndex index.html index.html.var index.php

vi /etc/rc.d/rc.local
增加:
/usr/local/apache2/bin/apachectl start
(因为旧的Apache在安装Mysql 5后会无法使用)

PHP需要重新编译:
tar -zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure
make install

cd /usr/lib64
cp -p libpng12.a ../lib
cp -p libpng.a ../lib
cp -p libpng.so ../lib

tar -zxvf php-5.1.4.tar.gz
cd php-5.1.4
./configure –prefix=/usr/local/php5 –with-apxs2=/usr/local/apache2/bin/apxs –with-config-filepath=/usr/local/php5 –disable-debug –enable-ftp –enable-inline-optimization –enable-magic-quotes –enable-mbstring –enable-mm=shared –enable-safe-mode –enable-track-vars –enable-trans-sid –enable-wddx=shared –enable-xml –with-dom –with-gd –with-gettext –with-mysql=/usr/lib64/mysql –with-regex=system –with-xml –with-zlib –with-mysqli=/usr/bin/mysql_config
make
make install

cp php.ini-dist /usr/local/php5/lib/php.ini

vi /usr/local/php5/lib/php.ini
include_path = “.:/usr/local/php5/lib/php”

/etc/init.d/mysql restart
/usr/local/apache2/bin/apachectl restart

好了,到此就完成所有工作了。

Powered by WordPress | Theme: Motion by 85ideas.