β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦ PHP4 COM function (windows version) : FULL
PART 3
instagram.com/UndercOdeTestingCompany
"; #Another
way to get the version
$ testversion = com_get ($ word-> application, version);
print" Version using Com_get (): $ testversion
"; #Make
it visible
$ word-> Visible = 1;
# creates a new file
$ Word-> Documents-> the Add ();
# write character
$ Word-> Selection-> TypeText ( "This IS the Test A ...");
# save
$ word-> documents [1] -> the SaveAs ( "Useless test.doc");
# close
$ Word-> the Quit ();
>?
Just take a few minutes to read this program and refer to Word's OLE technical documentation, you will learn almost all the operations you need in your own program.
MS Excel function using PHP's COM
γγAs the example above, like Word, you should learn this example also refer to the documentation for Excel Visual Basic Editor Object Browser.
#Open workbook and its sheet,
#This example uses a spreadsheet that is SOLVSAMP.XLS that comes with Excel installation
$ workbook = "C: Program FilesMicrosoft officeOfficeSamplesSOLVSAMP.XLS";
$ sheet = "Quick Tour"; #Instance
a Component object
$ ex = new COM ("Excel.sheet") or Die ("Did not connect"); #Get
program name and version
print "Application name: {$ ex-> Application-> value}
";
print " Loaded version: {$ ex-> Application-> version}
Written by UndercOde
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦ PHP4 COM function (windows version) : FULL
PART 3
instagram.com/UndercOdeTestingCompany
"; #Another
way to get the version
$ testversion = com_get ($ word-> application, version);
print" Version using Com_get (): $ testversion
"; #Make
it visible
$ word-> Visible = 1;
# creates a new file
$ Word-> Documents-> the Add ();
# write character
$ Word-> Selection-> TypeText ( "This IS the Test A ...");
# save
$ word-> documents [1] -> the SaveAs ( "Useless test.doc");
# close
$ Word-> the Quit ();
>?
Just take a few minutes to read this program and refer to Word's OLE technical documentation, you will learn almost all the operations you need in your own program.
MS Excel function using PHP's COM
γγAs the example above, like Word, you should learn this example also refer to the documentation for Excel Visual Basic Editor Object Browser.
#Open workbook and its sheet,
#This example uses a spreadsheet that is SOLVSAMP.XLS that comes with Excel installation
$ workbook = "C: Program FilesMicrosoft officeOfficeSamplesSOLVSAMP.XLS";
$ sheet = "Quick Tour"; #Instance
a Component object
$ ex = new COM ("Excel.sheet") or Die ("Did not connect"); #Get
program name and version
print "Application name: {$ ex-> Application-> value}
";
print " Loaded version: {$ ex-> Application-> version}
Written by UndercOde
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦ Introduction to OpenLDAPOPENLDAP is a very powerful tool for accessing network resources.
instagram.com/UndercOdeTestingCompany
π¦ ππΌππ πππΈβπ
Introduction to OpenLDAPOPENLDAP is a very powerful tool for accessing network resources.
1) Download: ftp // ftp.OpenLDAP.org / pub / OpenLDAP / openldap-release / openldap-1.2.10.tgz
2) find it very useful after installation.
Unzip it first:
#tar xzvf $ ver_ldap.tgz
3) and compile and install:
#. / Configure --prefix = $ ldap --enable-dns --enable-cldap --enable-ldapd --enable-wrappers --enable-phonetic- -enable-passwd --enable-shell
#make depend
#make
#make install
4) Modify the configuration file:
add in / etc / profile:
PATH = "" "" $ "" "" PATH: $ ldap / bin: $ ldap / sbin : $ ldap / libexec
CPLUS_INCLUDE_PATH = "" "" $ "" "" CPLUS_INCLUDE_PATH: $ ldap / include
LD_LIBRARY_PATH = "" "" $ "" "" LD_LIBRARY_PATH: $ ldap / lib
LIBRARY_PATH = ""
5) export PATH CPLUS_INCLUDE_PATH LD_LIBRARY_PATH LIBRARY_PATH MANPATH
in /etc/rc.d/rc.local
su root -c `` $ ldap / libexec / slapd -f $ ldap / etc / openldap / slapd.conf ''
6) recompile PHP and bring The parameter --with-ldap = $ ldap makes PHP support openLDAP.
After recompiling and installing, your WEBSERVER will really support openLDAP. I will introduce the wonderful application of openLDAP in the future! !! !!
7) Download: ftp // ftp.OpenLDAP.org / pub / OpenLDAP / openldap-release / openldap-1.2.10.tgz
I find it very useful after installation.
Unzip it first:
#tar xzvf $ ver_ldap.tgz
and compile and install:
#. / Configure --prefix = $ ldap --enable-dns --enable-cldap --enable-ldapd --enable-wrappers --enable-phonetic- -enable-passwd --enable-shell
#make depend
#make
#make install
8) Modify the configuration file:
add in / etc / profile:
PATH = "" "" $ "" "" PATH: $ ldap / bin: $ ldap / sbin : $ ldap / libexec
CPLUS_INCLUDE_PATH = "" "" $ "" "" CPLUS_INCLUDE_PATH: $ ldap / include
LD_LIBRARY_PATH = "" "" $ "" "" LD_LIBRARY_PATH: $ ldap / lib
LIBRARY_PATH = ""
9) export PATH CPLUS_INCLUDE_PATH LD_LIBRARY_PATH LIBRARY_PATH MANPATH
in /etc/rc.d/rc.local
su root -c `` $ ldap / libexec / slapd -f $ ldap / etc / openldap / slapd.conf ''
10) recompile PHP and bring The parameter --with-ldap = $ ldap makes PHP support openLDAP.
After recompiling and installing, your WEBSERVER will really support openLDAP. I will introduce the wonderful application of openLDAP in the future! !! !!
Written by UndercOde
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦ Introduction to OpenLDAPOPENLDAP is a very powerful tool for accessing network resources.
instagram.com/UndercOdeTestingCompany
π¦ ππΌππ πππΈβπ
Introduction to OpenLDAPOPENLDAP is a very powerful tool for accessing network resources.
1) Download: ftp // ftp.OpenLDAP.org / pub / OpenLDAP / openldap-release / openldap-1.2.10.tgz
2) find it very useful after installation.
Unzip it first:
#tar xzvf $ ver_ldap.tgz
3) and compile and install:
#. / Configure --prefix = $ ldap --enable-dns --enable-cldap --enable-ldapd --enable-wrappers --enable-phonetic- -enable-passwd --enable-shell
#make depend
#make
#make install
4) Modify the configuration file:
add in / etc / profile:
PATH = "" "" $ "" "" PATH: $ ldap / bin: $ ldap / sbin : $ ldap / libexec
CPLUS_INCLUDE_PATH = "" "" $ "" "" CPLUS_INCLUDE_PATH: $ ldap / include
LD_LIBRARY_PATH = "" "" $ "" "" LD_LIBRARY_PATH: $ ldap / lib
LIBRARY_PATH = ""
5) export PATH CPLUS_INCLUDE_PATH LD_LIBRARY_PATH LIBRARY_PATH MANPATH
in /etc/rc.d/rc.local
su root -c `` $ ldap / libexec / slapd -f $ ldap / etc / openldap / slapd.conf ''
6) recompile PHP and bring The parameter --with-ldap = $ ldap makes PHP support openLDAP.
After recompiling and installing, your WEBSERVER will really support openLDAP. I will introduce the wonderful application of openLDAP in the future! !! !!
7) Download: ftp // ftp.OpenLDAP.org / pub / OpenLDAP / openldap-release / openldap-1.2.10.tgz
I find it very useful after installation.
Unzip it first:
#tar xzvf $ ver_ldap.tgz
and compile and install:
#. / Configure --prefix = $ ldap --enable-dns --enable-cldap --enable-ldapd --enable-wrappers --enable-phonetic- -enable-passwd --enable-shell
#make depend
#make
#make install
8) Modify the configuration file:
add in / etc / profile:
PATH = "" "" $ "" "" PATH: $ ldap / bin: $ ldap / sbin : $ ldap / libexec
CPLUS_INCLUDE_PATH = "" "" $ "" "" CPLUS_INCLUDE_PATH: $ ldap / include
LD_LIBRARY_PATH = "" "" $ "" "" LD_LIBRARY_PATH: $ ldap / lib
LIBRARY_PATH = ""
9) export PATH CPLUS_INCLUDE_PATH LD_LIBRARY_PATH LIBRARY_PATH MANPATH
in /etc/rc.d/rc.local
su root -c `` $ ldap / libexec / slapd -f $ ldap / etc / openldap / slapd.conf ''
10) recompile PHP and bring The parameter --with-ldap = $ ldap makes PHP support openLDAP.
After recompiling and installing, your WEBSERVER will really support openLDAP. I will introduce the wonderful application of openLDAP in the future! !! !!
Written by UndercOde
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦ How to set up a basic OpenLDAP Server full by Underc 0de
>how to install and set up OpenLDAP centralized within a company's e-mail address book server for client queries. Basically, OpenLDAP is also used in many other areas, like centralized user account authentication servers, but email address book queries are the most commonly used.
instagram.com/UndercOdeTestingCompany
π¦ ππΌππ πππΈβπ :
1) go to www.openldap.org download the latest openldap package, follow the steps to compile and install, and then click Run:
#tar cvfz openldap-stable-20010524.tgz
#cd openldap-2.0.11
# / the configure.
#Make the depend
#make
#make test
#make install
2) My operating environment is redhat 6.1. If no errors are encountered, the LDAP daemon slapd is installed by default in the directory / usr / local / libexec; the configuration file is in the directory / usr / local / etc / openldap / and put various OpenLDAP tools
ldapadd, ldapdelete, ldapmodify, ldapmodrdn, ldappasswd, ldapsearch in the directory
3) / usr / local / bin, and the runtime database in / usr / local / var / openldap-ldbm.
π¦ Settings
1) Change the configuration file /usr/local/etc/openldap/slapd.conf
and add the following line after the include /usr/local/etc/openldap/schema/core.schema line to include all the schemes.
include /usr/local/etc/openldap/schema/corba.schema
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
include / usr / local /etc/openldap/schema/java.schema
include /usr/local/etc/openldap/schema/krb5-kdc.schema
include /usr/local/etc/openldap/schema/misc.schema
include / usr / local / etc / openldap / schema / nadf.schema
include /usr/local/etc/openldap/schema/nis.schema
include /usr/local/etc/openldap/schema/openldap.schema
2) "ldbm database definitions" in file slapd.conf Partially change the corresponding
suffix, the rootdn line is as follows
database ldbm
suffix "o = yourdomain, c = us"
rootdn "cn = root, o = yourdomain, c = us"
rootpw secret
directory / usr / local / var / openldap-ldbm
> has a variety of formats you can use, here I use o = yourdomain, c = us to indicate the format of your company domain name and country or region rootdn after installation, the default is cn = Manager, changing to root here is completely your own preference, which is in line with the tradition that root has the highest permissions in Unix / Linux.
3) Now you can start slapd and run / usr / local / libexec / slapd.
You can consider adding / usr / local / bin and / usr / local / libexec to the search path, which is added to the PATH line in
/ etc / profile
:
PATH = "$ PATH: / usr / X11R6 / bin: / usr / local / bin: / usr / local / libexec "
so you only need to type slapd after the next login.
4) Test whether the ldap server is working properly.
Run the following command to check if there is corresponding output.
#ldapsearch -x -b "o = yourdomain, c = us" "(objectclass = *)"
5) Edit the .ldif text file and use ldapadd to add records to the LDAP database.
The content of the file is as follows:
dn: o = yourdomain, c = us
objectclass: dcobject
objectclass: organization
o: yourdomain
dc: yourdomain
DN: CN = jephe Wu, yourdomain = O, C = US
objectClass: inetOrgPerson
CN: Wu jephe
Sn: Wu
mail: jephe_wu@yourdomain.com
...... More Users ......
1) and so on, is added per Personal records enter this file. Note that the object type inetorgperson must have at least cn and sn. Here we use three definitions: cn, sn, and mail. This is sufficient for our email address book function. You can also define things like mobile, homephone, pager ... and so on.
2) Then use the following command to add the above .ldif file into the LDAP database
#ldapadd -x -D "cn = root, o = yourdomain, c = us" -w secret -f
"yourldiffilename"
Note: the first part of the above file " dn: o = yourdomain, c = us "is required, otherwise you cannot add data. Replace "yourdomain" above with your company's domain name.
3) Set Outlook Express to allow LDAP server to query email addresses.
π¦ How to set up a basic OpenLDAP Server full by Underc 0de
>how to install and set up OpenLDAP centralized within a company's e-mail address book server for client queries. Basically, OpenLDAP is also used in many other areas, like centralized user account authentication servers, but email address book queries are the most commonly used.
instagram.com/UndercOdeTestingCompany
π¦ ππΌππ πππΈβπ :
1) go to www.openldap.org download the latest openldap package, follow the steps to compile and install, and then click Run:
#tar cvfz openldap-stable-20010524.tgz
#cd openldap-2.0.11
# / the configure.
#Make the depend
#make
#make test
#make install
2) My operating environment is redhat 6.1. If no errors are encountered, the LDAP daemon slapd is installed by default in the directory / usr / local / libexec; the configuration file is in the directory / usr / local / etc / openldap / and put various OpenLDAP tools
ldapadd, ldapdelete, ldapmodify, ldapmodrdn, ldappasswd, ldapsearch in the directory
3) / usr / local / bin, and the runtime database in / usr / local / var / openldap-ldbm.
π¦ Settings
1) Change the configuration file /usr/local/etc/openldap/slapd.conf
and add the following line after the include /usr/local/etc/openldap/schema/core.schema line to include all the schemes.
include /usr/local/etc/openldap/schema/corba.schema
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
include / usr / local /etc/openldap/schema/java.schema
include /usr/local/etc/openldap/schema/krb5-kdc.schema
include /usr/local/etc/openldap/schema/misc.schema
include / usr / local / etc / openldap / schema / nadf.schema
include /usr/local/etc/openldap/schema/nis.schema
include /usr/local/etc/openldap/schema/openldap.schema
2) "ldbm database definitions" in file slapd.conf Partially change the corresponding
suffix, the rootdn line is as follows
database ldbm
suffix "o = yourdomain, c = us"
rootdn "cn = root, o = yourdomain, c = us"
rootpw secret
directory / usr / local / var / openldap-ldbm
> has a variety of formats you can use, here I use o = yourdomain, c = us to indicate the format of your company domain name and country or region rootdn after installation, the default is cn = Manager, changing to root here is completely your own preference, which is in line with the tradition that root has the highest permissions in Unix / Linux.
3) Now you can start slapd and run / usr / local / libexec / slapd.
You can consider adding / usr / local / bin and / usr / local / libexec to the search path, which is added to the PATH line in
/ etc / profile
:
PATH = "$ PATH: / usr / X11R6 / bin: / usr / local / bin: / usr / local / libexec "
so you only need to type slapd after the next login.
4) Test whether the ldap server is working properly.
Run the following command to check if there is corresponding output.
#ldapsearch -x -b "o = yourdomain, c = us" "(objectclass = *)"
5) Edit the .ldif text file and use ldapadd to add records to the LDAP database.
The content of the file is as follows:
dn: o = yourdomain, c = us
objectclass: dcobject
objectclass: organization
o: yourdomain
dc: yourdomain
DN: CN = jephe Wu, yourdomain = O, C = US
objectClass: inetOrgPerson
CN: Wu jephe
Sn: Wu
mail: jephe_wu@yourdomain.com
...... More Users ......
1) and so on, is added per Personal records enter this file. Note that the object type inetorgperson must have at least cn and sn. Here we use three definitions: cn, sn, and mail. This is sufficient for our email address book function. You can also define things like mobile, homephone, pager ... and so on.
2) Then use the following command to add the above .ldif file into the LDAP database
#ldapadd -x -D "cn = root, o = yourdomain, c = us" -w secret -f
"yourldiffilename"
Note: the first part of the above file " dn: o = yourdomain, c = us "is required, otherwise you cannot add data. Replace "yourdomain" above with your company's domain name.
3) Set Outlook Express to allow LDAP server to query email addresses.
> γqmail can replace the traditional Pop3 authentication of / etc / passwd through LDAP, in order to improve the efficiency of authentication and effectively support large-volume mail customers. In order to enable qmail to obtain LDAP support, it is necessary to add a LDAP authentication patch on the basis of qmail Package, it is best to use the new compressed package of qmail, specific operations use the following command:
γγ#rm -rf qmail-1.03
γγ#zip-zxvf qmail-1.03.tar.gz
γγ#gunzip qmail-ldap-1_03-20010301_patch.gz
γγ#cd qmail- 1.03
γγ#patch -p1 <../ qmail-ldap-1.03-20010501.patch
γγAfter the patch package is printed , you need to modify the qmail
π¦ Makefile to configure the corresponding LDAP information, as follows (here only explain what must be modified, the rest For options, please refer to the QLDAPINSTALL.TXT document):
γγ1) -LDAPFLAGS = -DCLEARTEXTPASSWORD
γγConfigure whether to use a clear text password in the LDAP directory.
γγ2) -LDAPLIBS =
γγLDAP interface library configured, in this case:
γLDAPLIBS = -L / usr / local / lib -L / usr / X11R6 / lib / modules -lldap -llber -lldap_r -lpthread -lresolv
γγ4) -SHADOWLIBS = -lcrypt -lshadow
γγ-SHADOWOPTS = -DPW_SHADOW
γγConfigure the password authentication method used.
γγAfter the Makefile settings are modified, recompile the qmail source file, then overwrite and install qmail, use the following command:
γγ#make setup check
install openldap
zip -zxvf openldap-2.07.tgz
cd openldap-2.07
./configure
make depend
make
make test
su root -c '' make install ''
such that openldap installation is completed
γCreate the corresponding LDAP support file under / var / qmail / control /:
γγ#cat ldapserver
γγ172.18.6.111
γγ#cat ldapbasedn
γγdc = longshine, dc = com
γγ#cat ldapobjectclass
γγqmailUser
copies qmail.schema to the corresponding directory of openldap
cp /usr/local/src/qmail/qmail-1.03/qmail.schema / usr / local / etc / openldap / schema /.
Edit the configuration file / usr / local / etc / openldap / slapd.conf)
database ldbm
suffix ""dc=longshine,dc=com""
rootdn ""cn=Manager,dc= longshine ,dc=""
rootpw secret
directory / usr / local / var / openldap-ldbm
add the corresponding shema file
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/nis.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
include /usr/local/etc/openldap/schema/qmail.schema
start SLAPD.
su root -c / usr / local / libexec / slapd in
order to detect whether openldap is running And configured correctly. You can execute the ldapsearch command to check. By default, ldapsearch is installed in / usr / local / bin / ldapsearch:
ldapsearch -x -b '' '' -s base '' (objectclass = *) '' namingContexts
should see
dn:
namingContexts: dc = longshine,
dc = com increases the initial population of the directory.
Is divided into two steps:
generating an LDIF file
running ldapadd
γγ#rm -rf qmail-1.03
γγ#zip-zxvf qmail-1.03.tar.gz
γγ#gunzip qmail-ldap-1_03-20010301_patch.gz
γγ#cd qmail- 1.03
γγ#patch -p1 <../ qmail-ldap-1.03-20010501.patch
γγAfter the patch package is printed , you need to modify the qmail
π¦ Makefile to configure the corresponding LDAP information, as follows (here only explain what must be modified, the rest For options, please refer to the QLDAPINSTALL.TXT document):
γγ1) -LDAPFLAGS = -DCLEARTEXTPASSWORD
γγConfigure whether to use a clear text password in the LDAP directory.
γγ2) -LDAPLIBS =
γγLDAP interface library configured, in this case:
γLDAPLIBS = -L / usr / local / lib -L / usr / X11R6 / lib / modules -lldap -llber -lldap_r -lpthread -lresolv
γγ4) -SHADOWLIBS = -lcrypt -lshadow
γγ-SHADOWOPTS = -DPW_SHADOW
γγConfigure the password authentication method used.
γγAfter the Makefile settings are modified, recompile the qmail source file, then overwrite and install qmail, use the following command:
γγ#make setup check
install openldap
zip -zxvf openldap-2.07.tgz
cd openldap-2.07
./configure
make depend
make
make test
su root -c '' make install ''
such that openldap installation is completed
γCreate the corresponding LDAP support file under / var / qmail / control /:
γγ#cat ldapserver
γγ172.18.6.111
γγ#cat ldapbasedn
γγdc = longshine, dc = com
γγ#cat ldapobjectclass
γγqmailUser
copies qmail.schema to the corresponding directory of openldap
cp /usr/local/src/qmail/qmail-1.03/qmail.schema / usr / local / etc / openldap / schema /.
Edit the configuration file / usr / local / etc / openldap / slapd.conf)
database ldbm
suffix ""dc=longshine,dc=com""
rootdn ""cn=Manager,dc= longshine ,dc=""
rootpw secret
directory / usr / local / var / openldap-ldbm
add the corresponding shema file
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/nis.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
include /usr/local/etc/openldap/schema/qmail.schema
start SLAPD.
su root -c / usr / local / libexec / slapd in
order to detect whether openldap is running And configured correctly. You can execute the ldapsearch command to check. By default, ldapsearch is installed in / usr / local / bin / ldapsearch:
ldapsearch -x -b '' '' -s base '' (objectclass = *) '' namingContexts
should see
dn:
namingContexts: dc = longshine,
dc = com increases the initial population of the directory.
Is divided into two steps:
generating an LDIF file
running ldapadd
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦Storage backup-usb hard drive on rh9Using a USB hard drive on rh9-
Special for old users :
This is verified on redhat9.0, you try it!
1) Test system:
#uname -a
i686 mobile hard disk is Keshuo hard disk box
2) View and modify /usr/src/linux-2.4.20-8/Makefie
to start the file The value of "EXTRAVERSION =XXXX" is changed to "EXTRAVERSION =-8".
It is very important to pay attention to this step, otherwise you will be prompted like me that the version does not match when you finally load it, you must rebuild the kernel! (Because I am 2.4.20-8, so I changed to -8).
3) Modify /usr/src/linux-2.4.20-8/drivers/usb/storage/unusual_devs.h to
find:
UNUSUAL_DEV( 0x05e3, 0x0702, 0x0000, 0x0001,
"EagleTec",
"External Hard Disk",
US_SC_SCSI, US_PR_BULK , NULL,
US_FL_FIX_INQUIRY ),
changed to the following form:
UNUSUAL_DEV( 0x05e3, 0x0702, 0x0000, 0x9999,
"EagleTec",
"External Hard Disk",
US_SC_SCSI, US_PR_BULK, NULL,
US_FL_FIX_INQUIRY | US_FL_MODE_XLATE | US_FL_START_STOP ),
4) Run the command
#cp /boot/config-2.4.20-8 /usr/src/linux-2.4.20-8/. config
#make mrproper (if you originally compiled the kernel, add this sentence)
#make oldconfig
#make dep
#make modules (this step is a long time)
5) Run
#cp /usr/src/linux-2.4.20 -8/drivers/usb/storage/usb-storage.o /lib/modules/2.4.20-8/kernel/drivers/usb/storage/ After
this step, you can connect the hard disk.
6) Execute:
#modprobe -r usb-storage
#modprobe usb-storage (if the previous Makefile file is modified correctly, this step will not go wrong)
Then you wait patiently for a while before running the next step.
7) fdisk -l Here you can see your hard disk. (My hard drive is /dev/sda1 and the USB drive is /dev/sdb1.)
8) Load
#mount -t vfat -o iocharset=cp936 /dev/sda1 /mnt/usb-hd
usb-hd is the directory I created first, you can use your own.
Now everyone should be able to use a USB hard drive!
Written by Undercode
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
π¦Storage backup-usb hard drive on rh9Using a USB hard drive on rh9-
Special for old users :
This is verified on redhat9.0, you try it!
1) Test system:
#uname -a
i686 mobile hard disk is Keshuo hard disk box
2) View and modify /usr/src/linux-2.4.20-8/Makefie
to start the file The value of "EXTRAVERSION =XXXX" is changed to "EXTRAVERSION =-8".
It is very important to pay attention to this step, otherwise you will be prompted like me that the version does not match when you finally load it, you must rebuild the kernel! (Because I am 2.4.20-8, so I changed to -8).
3) Modify /usr/src/linux-2.4.20-8/drivers/usb/storage/unusual_devs.h to
find:
UNUSUAL_DEV( 0x05e3, 0x0702, 0x0000, 0x0001,
"EagleTec",
"External Hard Disk",
US_SC_SCSI, US_PR_BULK , NULL,
US_FL_FIX_INQUIRY ),
changed to the following form:
UNUSUAL_DEV( 0x05e3, 0x0702, 0x0000, 0x9999,
"EagleTec",
"External Hard Disk",
US_SC_SCSI, US_PR_BULK, NULL,
US_FL_FIX_INQUIRY | US_FL_MODE_XLATE | US_FL_START_STOP ),
4) Run the command
#cp /boot/config-2.4.20-8 /usr/src/linux-2.4.20-8/. config
#make mrproper (if you originally compiled the kernel, add this sentence)
#make oldconfig
#make dep
#make modules (this step is a long time)
5) Run
#cp /usr/src/linux-2.4.20 -8/drivers/usb/storage/usb-storage.o /lib/modules/2.4.20-8/kernel/drivers/usb/storage/ After
this step, you can connect the hard disk.
6) Execute:
#modprobe -r usb-storage
#modprobe usb-storage (if the previous Makefile file is modified correctly, this step will not go wrong)
Then you wait patiently for a while before running the next step.
7) fdisk -l Here you can see your hard disk. (My hard drive is /dev/sda1 and the USB drive is /dev/sdb1.)
8) Load
#mount -t vfat -o iocharset=cp936 /dev/sda1 /mnt/usb-hd
usb-hd is the directory I created first, you can use your own.
Now everyone should be able to use a USB hard drive!
Written by Undercode
β β β ο½ππ»βΊπ«Δπ¬πβ β β β
β β β Uππ»βΊπ«Δπ¬πβ β β β
π¦APACHE CONFIGURATION :
[root@localhost opt]# tar zxvf apr-1.7.0.tar.gz -C /opt
[root@localhost opt]# tar zxvf apr-util-1.6.1.tar.gz -C /opt
[root@localhost opt]# tar zxvf httpd-2.4.25.tar.gz -C /opt
[root@localhost opt]# mv apr-1.7.0/ httpd-2.4.25/srclib/apr
[root@localhost opt]# mv apr-util-1.6.1/ httpd-2.4.25/srclib/apr-util
[root@localhost opt]# yum -y install gcc gcc-c++ make pcre-devel expat-devel perl
[root@localhost opt]# yum -y install zlib-devel /
[root@localhost httpd-2.4.25]# ./configure \
>--prefix=/usr/local/httpd \
>--enable-so--enable-rewrite\
>--enable-charset-lite\
>--enable-cgi
>--enable-deflate
[root@localhost httpd-2.4.25]#make
[root@localhost httpd-2.4.25]#make install
[root@localhost httpd-2.4.25]# cd /usr/local/
[root@localhost local]# cd httpd/
[root@localhost httpd]# cd conf/
[root@promote bin]# cp /usr/local/httpd/bin/apachectl /etc/init.d/httpd
[root@promote bin]# ls /etc/init.d
functions httpd netconsole network README
[root@promote bin]# vim /etc/init.d
[root@promote bin]# vim /etc/init.d/httpd
#!/bin/sh
#description:Apache is a World Wide Web server
[root@promote local]# chkconfig --add httpd
[root@promote /]# ln -s /usr/local/httpd/conf/httpd.conf /etc/httpd.conf
[root@promote local]# cd /usr/local/httpd/conf
[root@promote conf]# vim httpd.conf
Listen 192.168.75.134:80 /
#Listen 80
#ServerName www.kgc.com:80 //
[root@promote /]# ln -s /usr/local/httpd//bin/* /usr/local/bin /
/usr/local/bin
[root@promote /]# ls /usr/local/httpd//bin
ab checkgid htcacheclean httxt2dbm
apachectl dbmmanage htdbm logresolve
apr-1-config envvars htdigest rotatelogs
apu-1-config envvars-std htpasswd
apxs fcgistarter httpd
[root@promote /]# service httpd start
httpd (pid 66785) already running
[root@promote /]# httpd -t
Syntax OK
[root@promote /]# netstat -ntap | grep 80
tcp 0 0 192.168.75.134:80 0.0.0.0:* LISTEN 66785/httpd
tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 8031/dnsmasq
[root@promote /]#
[root@promote /]# iptables -F
[root@promote /]# setenforce 0
E N J O Y β€οΈππ»
@UndercodeTesting
β β β Uππ»βΊπ«Δπ¬πβ β β β
π¦APACHE CONFIGURATION :
[root@localhost opt]# tar zxvf apr-1.7.0.tar.gz -C /opt
[root@localhost opt]# tar zxvf apr-util-1.6.1.tar.gz -C /opt
[root@localhost opt]# tar zxvf httpd-2.4.25.tar.gz -C /opt
[root@localhost opt]# mv apr-1.7.0/ httpd-2.4.25/srclib/apr
[root@localhost opt]# mv apr-util-1.6.1/ httpd-2.4.25/srclib/apr-util
[root@localhost opt]# yum -y install gcc gcc-c++ make pcre-devel expat-devel perl
[root@localhost opt]# yum -y install zlib-devel /
[root@localhost httpd-2.4.25]# ./configure \
>--prefix=/usr/local/httpd \
>--enable-so--enable-rewrite\
>--enable-charset-lite\
>--enable-cgi
>--enable-deflate
[root@localhost httpd-2.4.25]#make
[root@localhost httpd-2.4.25]#make install
[root@localhost httpd-2.4.25]# cd /usr/local/
[root@localhost local]# cd httpd/
[root@localhost httpd]# cd conf/
[root@promote bin]# cp /usr/local/httpd/bin/apachectl /etc/init.d/httpd
[root@promote bin]# ls /etc/init.d
functions httpd netconsole network README
[root@promote bin]# vim /etc/init.d
[root@promote bin]# vim /etc/init.d/httpd
#!/bin/sh
#description:Apache is a World Wide Web server
[root@promote local]# chkconfig --add httpd
[root@promote /]# ln -s /usr/local/httpd/conf/httpd.conf /etc/httpd.conf
[root@promote local]# cd /usr/local/httpd/conf
[root@promote conf]# vim httpd.conf
Listen 192.168.75.134:80 /
#Listen 80
#ServerName www.kgc.com:80 //
[root@promote /]# ln -s /usr/local/httpd//bin/* /usr/local/bin /
/usr/local/bin
[root@promote /]# ls /usr/local/httpd//bin
ab checkgid htcacheclean httxt2dbm
apachectl dbmmanage htdbm logresolve
apr-1-config envvars htdigest rotatelogs
apu-1-config envvars-std htpasswd
apxs fcgistarter httpd
[root@promote /]# service httpd start
httpd (pid 66785) already running
[root@promote /]# httpd -t
Syntax OK
[root@promote /]# netstat -ntap | grep 80
tcp 0 0 192.168.75.134:80 0.0.0.0:* LISTEN 66785/httpd
tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 8031/dnsmasq
[root@promote /]#
[root@promote /]# iptables -F
[root@promote /]# setenforce 0
E N J O Y β€οΈππ»
@UndercodeTesting
β β β Uππ»βΊπ«Δπ¬πβ β β β