Summary of YUM (1) Local CD for YUM source (2) useful source (3) commonly used software installation commands (Gcc, PHP, MySQL, Nginx) (4) FAQs
(1) Use Local CD as the YUM SourceOn a server that cannot access the Internet, you can use the installation disc as the source. To enjoy the convenience of yum. 1. Create a mount directory and mount the installation disk to this directory. As the YUM source's search directory mkdir/media/disk mount/dev/cdrom/media/disk2. create your own configuration file vi/etc/yum. repos. d/xclyum. repo [xclyum] name = My YUM Server baseurl = file: // media/disk/Server/gpgcheck = 0 enabled = 1
3. Change the name of the original system source file to make the new file take effect. Otherwise, find the old one. Taking Oracle Linux as an example: cd/etc/yum. repos. d mv public-yum-ol6.repo public-yum-ol6.repo.back 4. Verify yum update
(2) useful sources1. If you are not using Oracle Linux, but want to install Oracle, Oracle provides some good sources. You can download it at http://public-yum.oracle.com/
2. If it is attached below CentOS this source is very good cd/etc/yum. repos. dmv CentOS-Base.repo CentOS-Base.repo.savewget http://centos.ustc.edu.cn/CentOS-Base.repo
(3) Common Software Installation commands1. install yum-y install Gcc yum-y install gcc-c ++ 2.php, install MySQL and Nginx, start the service command, and set it to boot automatically.
A. Nginx Server
Yum install nginxservice nginx startchkconfig -- levels 235 nginx on
B. MySQL database yum install mysql-server MySQL-develservice mysqld startchkconfig -- levels 235 mysqld on
C. install php and required components so that PHP supports MySQL, FastCGI mode yum install php lighttpd-fastcgi php-cli php-mysql php-gd php-imap php-ldap php-odbc php-pear php -xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy php-common php-devel php-fpm php-pear php-pecl-memcache php-pdoservice php-fpm startchkconfig -- levels 235 php-fpm on
(4) FAQsProblem 1: yum is locked
[Root @ ol64 ~] # Yum listLoaded plugins: refresh-packagekit, securityExisting lock/var/run/yum. pid: another copy is running as pid 2906. another app is currently holding the yum lock; waiting for it to exit...
It seems that another process is being executed. However, it is useless to restart the system. The processing method is a bit unconventional:
Rm-f/var/run/yum. pid
That's all.
In another case, yum is currently running, but to stop it, you can use the following method to kill the yum process: ps-A | grep yum | grep-v grep | awk '{print $1}' | xargs kill-9
This method does not cause yum lock problems. Ctrl + c is often interrupted.
Problem 2: The Source is clearly matched, but the downloaded package version does not match.
It may be that the previous incorrect configuration has been cached. Clear the cache and then do it. Yum clean all
MAIL: xcl_168@aliyun.comBlog: http://blog.csdn.net/xcl168