1 SMB
Linux under SMB configuration commands to connect using SMB: Smbclient//192.168.128.1/sharetoday to between Linux and Linux and Windows to each other to transfer files, can be used FTP, a moment, decided to use the SMB to try, because the time is relatively short, so can only write down a portion of the command and content, small remember:) One, the use of the environment: Two Linux servers, one installed RHAS3 U3 (IP:192.168.0.31), a Red flag Server version 4 was installed.1(IP:192.168.10.1), the others are Windows servers, and Windows2000 server is installed. Share 192 with other machines.168.0Rhhhome directory on. 31 For example: Second, start samba on Linux server: (The following operations are in 192.168.0execute on. 31)1by default, the SMB service is stopped, and SMB is started first. Start the SMB Service: Service SMB start2, set the SMB share directory: VI/etc/samba/smb.conf, add the folder you want to share at the end: [Rhhhome]; share name path=/home/rhh; shared folder path writeable=Yes, can write guest OK=Yes; Allow guest access3, set up SMB User: Login with root, smbpasswd-a rhh; increase the SMB user, and prompt to set the password smbpasswd–x rhh; Remove the SMB user three, connect to the SMB server on the client: (The following operations are in 192.168.10. 1) There are two ways to connect to an SMB share: Smbclient and Smbmount1, smbclient: After connecting the Operation method and FTP landing basically the same smbclient-L [url=file://210.72.226.193/]192.168.0.31[/url]To view shared resources, you will see a"Rhhhome"shared directory smbclient [url=file://210.72.226.193/notes]//192.168.0.31/rhhhome[/url]-U rhh; connect the SMB shared directory, and the command usage for uploading and downloading files after entry is similar to FTP. For example:Getxxxxx; Download a file put xxxxx; Upload a file Mget*download all files under current directory tar C Test.tar notes/Pack all the files in the Notes directory2, Smbmount: Recommended Use-Convenient mkdir/mnt/smbtmp; Build mount point for shared files Smbmount//192.168.0.31/rhhhome/mnt/smbtmp-o rhh; mount share directory, mount will be able to enter the/mnt/smbtmp operation on the remote host on the shared directory. smbumount/mnt/smbtmp; umount shared directory3, use the hostname instead of the IP address to connect: VI/etc/samba/Lmhosts, join the host name and IP mapping relationship: For example: Join a row192.168.0.31RHAS3 The IP addresses in all commands above can be replaced with RHAS3. Iv. sharing Windows files under Linux: Add a user name that can be accessed in the permissions of the Windows shared folder. Use the smbclient and Smbmount commands above. Five, Windows access to the Linux shared folder: In the run enter "\ \192.168.0.31To open the shared folder.
View Code
2 Apache Mysql PHP
1install Apache, PHP, MySQL, and PHP to connect MySQL library components. Yum-y install httpd php mysql mysql-server php-MySQL2installing Apache extended yum-Y Install httpd-manual mod_ssl Mod_perl mod_auth_mysql3Installing the PHP extension Yum-y install php-gd php-xml php-mbstring php-ldap php-pear php-Xmlrpc4installing the MySQL extension yum-y install Mysql-connector-odbc mysql-devel libdbi-dbd-MySQL5Configure boot-up service #/sbin/chkconfig httpd on [setting Apache server httpd service boot] #/sbin/Service httpd start [Start httpd Service, independent of Boot start] #/sbin/service mysqld start [Start mysqld service, not related to boot boot] Description: Apache configuration file is/etc/httpd/conf, modules on/usr/lib/.httpd The PHP configuration file under the/etc/php.d/and/etc/php.iniphp modules on/usr/lib/php/.modules under6bind domain name in/etc/httpd/conf/An example is provided in the httpd.conf configuration file: # VirtualHost example:# almost any Apache directive could go into a VirtualHost container.# the F Irst VirtualHost Section isUsed forrequests without a known# server name.##<virtualhost *: the># ServerAdmin [email protected]-host.example.com# DocumentRoot/www/docs/dummy-host.example.com# ServerName Dummy-host.example.com# errorlog Logs/dummy-host.example.com-error_log# Customlog Logs/dummy-host.example.com-Access_log common#</VirtualHost>so the binding domain name can be configured with the example provided. Description: After MySQL is installed by default, the root password is empty. Create Root administrator: Mysqladmin-U root Password123456several important directory database directories for Linux MySQL/var/lib/mysql/configuration file/usr/share/MySQL (mysql.server command and configuration file) related commands/usr/bin (mysqladmin mysqldump, etc command) startup script/etc/rc.d/init.d/(startup script file for MySQL directory)7Create MySQL remote access create user to use Remote connection grant all privileges on*. * To'zhz'@'%'Identified by'Root'with GRANT OPTION; the first zhz represents a user name,%indicates that all computers can be connected, or you can set an IP address to run the connection, and the second root indicates a password. Executes flush privileges; The command immediately takes effect for the user querying the database (see the following indicates that the creation of a new user succeeded) SELECT DISTINCT CONCAT ('User:" ", User," "@" ", host," ";') as query from Mysql.user;/etc/init.d/MySQL Stop/etc/init.d/mysql start
View Code
3 FTP
1, check the installation VSFTPD software using the following command #rpm-qa |grep VSFTPD can detect if the VSFTPD software is installed, and if it is not installed, install it using the Yum command. Quickly build FTP server under Linux platform2, start the service using VSFTPD software, mainly includes the following commands: Start FTP command #service vsftpd start stop ftp command #service vsftpd stop restart FTP command #service vsftpd Rapid setup of FTP server under Restartlinux platform3, VSFTPD configuration files for FTP are three main, located in/etc/vsftpd/directory, respectively: Ftpusers the file is used to specify that those users cannot access the FTP server. User_list the default account that the file uses to indicate that the ftpvsftpd.conf vsftpd Master profile is not accessible by default4, take the anonymous user as an example, we remove the configuration file vsftpd.conf inside the following anon_upload_enable=yesanon_mkdir_write_enable=The # number in front of the Yes two entry allows the anonymous user to be configured to upload and download files. Remember to restart the service after modifying the configuration file. Quickly build FTP server under Linux platform5Create a directory set to writable $ sudo mkdir/var/ftp/Write$sudo chmod-R777/var/ftp/write
View Code
Install MySQL apache PHP SMB